Game Development Community

dev|Pro Game Development Curriculum

Photogrammetry and Torque 3D: Week 3 -First Results!

by Ron Kapaun · 11/25/2014 (4:34 pm) · 32 comments

Photogrammetry and Torque 3D: Week 3 -First Results!

As many of you already know, I have been experimenting with a different way of producing models for game engines. I started off working with laser scanning and have since moved over to Photogrammetry. What is photogrammetry you might ask. Well, according to wikipedia photogrammetry is the science of taking measurements from photos and extracting exact positions for surface points. Sounds complicated and well, you would be correct in that assumption.

I was first introduced to this method of modeling when I purchased and played 'The Vanishing of Ethan Carter' created by 'The Astronauts'. They are a group of Polish game developers who split from Epic Games Poland aka 'People Can Fly' whom you may know from titles like 'Bulletstorm' and 'Painkiller' as well as ports for Gears of War. I enjoyed many of those games but, I can not ever recall being 'floored' by the visuals.

After playing the game, I started doing what I always do. Researching methods for how I could 'incorporate' more of the real world into my virtual worlds. Like I said, I already own the David Laser scanning system and it does really well for certain things. However, giant boulders and crazy dead trees and large areas of 'nature' are just not suited for scanning (at my price range anyway.)

ENTER PHOTOGRAMMETRY

The system that The Astronauts used to create most of the game assets in TVoEC was Agisoft PhotoScan. This is a neat little piece of software from a developer in Russia. I initially checked it out but, I was a tad 'sticker shocked' by the 'Pro' edition price. So I left and went back to my laser scans. I got involved in a conversation on one of my blogs here and found out I was mistaken. I did not need the 'pro' edition for what I wanted to do. I am not planning on measuring archeology sites or documenting the flow of rivers or any of that other crazy stuff. So I returned and found the Standard Edition for around $180 US Dollars. I tried it before I purchased it using a 30 day trial. I did 2 sets of 'scans' and I was SOLD.

So, I am currently learning Agisoft PhotoScan Standard Edition. You can see more about this nifty piece of software by following this link; www.agisoft.com. The concept is pretty simple, you take a series of photos of an object. Put those photos in the software and magically it produces a 3D model. Sounds simple, alas there is much more to it.

I started out with just my trusty 14 megapixel GE400X camera, a crap load of batteries and a dream. Needless to say, the equipment has grown a tad. I am still using the same camera but, now I drag along a bag with 'markers', tape, a solid tripod, a crap load+ of batteries, my trusty laptop and a bunch of SD cards, tape measure and laser line level and pointer (don't ask).

I had to re-learn photography. The closest I can compare photo-scan photography to would be texture photography. No harsh shadows (I live for cloudy days now), low ISO, no distance blur, no digital zoom, cut back on the Monsters (gotta have steady hands) etc. Then you have to walk around in circles taking photos (I mean that literally.... circles.) Some of the images below took anywhere between 50 and 120 individual shots, and I should have done more on many of them. At 14 megapixels per picture that is a TON of visual data. All those images eat up 16 gigs of ram on my development machine FAST. It's no joke, the software chews up ram like crazy, also I HIGHLY recommend a Geforce video card. They incorporated CUDA into the point cloud analyzing segment of the process and the GPU helps speed up the processing time GREATLY.

So, my first couple of simple experiments went ok. You can see some of the results below. These are all rendered in Blender using the Cycles Renderer.

3tdstudios.com/images/blogs/treeRock_01.jpg.
3tdstudios.com/images/blogs/Boulders_01.jpg.
3tdstudios.com/images/blogs/GoundRock_02.jpg.
Not bad but, how the heck do I get these high poly models into Torque? (Some of these are over 1/2 million polys ALONE.) Not only that but, I uninstalled 3D Studio Max and now I am ONLY using Blender. Well, BACK to the research. I have been experimenting and working out a solid workflow in order to make this happen. Alas, I have some results I am happy to show. Keep in mind these are experimental images and I just tossed them into my current build of T3D. The only major things I did to my build was incorporate Verve, the DirectX 9 Refactor, and a bunch of other little 'fixes and tweeks'. For the most part, it's stock T3D.

3tdstudios.com/images/blogs/screenshot_01.jpg.
3tdstudios.com/images/blogs/screenshot_02.jpg.
3tdstudios.com/images/blogs/screenshot_03.jpg.
3tdstudios.com/images/blogs/screenshot_04.jpg.
So, using NOTHING but Blender, Meshlab, and a TON of photos I am now able to produce these simple shots. (basically just to test the lighting and performance.) Heck, I even used the default tree just for leaf shadows. The maximum poly count is 2K for one model (that would be that little model with the dead tree growing out of the rock.) The lowest poly count is 250 (the path pieces) All of the models are also HEAVILY LODed. I am pleased so far with the results. It sort of reminds me of Crysis (the original) on Max setting for PC. The textures are still a bit muddy but, that is my workflow, NOT the system. Heck the original textures on the high poly models are actually true 4K images. You can zoom in and count grains of sand on those. So the texture problem is in my workflow. You will note some spots where they look almost 'smeared'. I think that is a bad "Object Cage' when baking the diffuse in Blender.

SO, WHAT IS NEXT?

Like I said, I am not thrilled with the texture quality on the low poly versions of these models. They could be better and once I get my brain more wrapped around Blender's 'cage' system for baking textures I am sure I can improve them even more. I am able to make really nice normal maps from the high poly models and project them onto the low poly model properly so, it has to be something with sample sizes or the cage is not properly aligned.

I started small, little rocks, twigs, ect. I moved up to objects (most are in the screen shots) that are slightly bigger than cars. Therefore, my next step is buildings. I think I have a system planned out that will allow me photo-scan the exterior and the interior of a building and merge them together. I will start with exteriors and interiors alone first, then move on from there. I also intend on mocking up a small interior project for testing with the Rift.

People/Humans, yep I am going to try photo-scanning a person. I am in the process of building a neat little rig that will allow for overlapping photos that can take photos from a set point on a set of outer rings that encircle the subject. This way I can use one camera to take the photo set. (Many large studios use multiple cameras and a geo-dome looking rig but, I am not that wealthy so, gotta make do.)

Basically, I need to build a HUGE library of this stuff. Thankfully, between my laptops, and my desktops I can have machines grinding on this stuff pretty much 24/7 for awhile.


IN CONCLUSION

Overall, I think this system of working will become my new 'norm'. Since the higher quality meshes are faster to produce, look better in the engine (in my opinion) and add the level of realism I have been after, I can't see going back to my old methods. Once I get a solid flexible work flow in Blender outlined, I will post it for everyone to read and review. (I may do a series of video tutorials on this whole process as well...I don't know yet. I am still pretty 'clunky' in Blender but, I should get more efficient as I go).

The last stage will be building a demo level in T3D/UnReal and Unity and video to show off what can be done. More to follow on this grand adventure. Thanks for reading and if you have any questions feel free to ask. I am by no means an expert but, I will try and help.

Ron
Page«First 1 2 Next»
#21
11/28/2014 (4:09 pm)
GamerX,

'CinemaT3D' is not yet consumer ready :-). I have a whole bunch of 'in-progress' shaders and other stuff working in it. Including my single bounce GI, a TON of shadow fixes/tweeks, as well as a bunch of community fixes etc. I even have inserted a bunch of my adjusted/modernized lens flares etc. I have a similar system to the 'fixes' recently submitted for the 'god rays', (I know, I should have stated the fixes and stuff more 'up front' to Chelaru when he asked but I think it's better to 'dive in' and learn than just get the code.) Heck, just check out my 'into the deep blue) video... you can see a huge number of 'tweeks' to the 'god ray' stuff in that.)

Anyway, I will release all this stuff when I get it stable enough to work on more than my development systems. (My personal 'standard' is when I get it working on my 'stock' laptop and my dev (aka desktop) system.) Hell, I will probably even release my new/ sorta new cloud system (freebie pack #1 video) at that time. I have TONS of stuff I am just not that keen to kick it out the door until I am ready to support and endorse it. At times, I wish more people took that attitude.

Ron
#22
11/29/2014 (5:44 am)
Ron
Just curious is 'CinemaT3D' based on Verve, or is it heavy modified version of it or something new?

I'm sure the community and myself will be looking forward in hearing more!
#23
12/01/2014 (6:33 am)
This is amazing! It's not simple to capture the beauty of nature just winging it, but with this you could literally show others what you've seen in person. Pretty cool.
#24
12/11/2014 (2:03 am)
What a great thread. Why wouldn't HD/UHD video work for this? Take video and use editing software to pull out individual frames? The thought is so obvious I have a feeling I've missed something.
#25
12/13/2014 (2:17 am)
Bobby,

The problem with using video is motion blur (heck any blur really) and depth of field can really mess up point cloud detection and generation. I will blog again soon and explain more. Also I have my 'baseline' research article available at; 3tdstudios.com/blog.html. It explains things in a bit more depth. Anyway, I hope to post a new blog on Monday.

Ron
#26
12/14/2014 (1:09 am)
@Ron
I wonder what your goals are with this, it looks like you are not developing a game or so.
#27
12/15/2014 (8:15 am)
@Duion,

Good question! I agree, it does not look like I am developing a game or anything. However, there is a bit of 'background' that I decided most people did not need to know. Back before my public melt down, I was trying to make a go of becoming a 'pro' environmental artist. My initial path was;
1. release some 'solid' demos using NOTHING but art I produced
2. toss out resumes and get indie and pro companies to view my videos and check out my website etc.
3. Nail down a 'pro' job (because hell, I am the best game artist in the world! right?)
4. live a life where I design worlds and love what I do all day!

The facts;
1. I am NOT the best artist in the world.
2. As an environmental artist, I do not get to 'pick' what I think should be built. In fact, unless I am a lead artist, I am stuck working with concepts and stuff that are approved by 'upper management'. No offense to all the great concept guys out there but, DAMN.... sometimes I take a look at a concept and think.... F*** Me, I have NO clue how to do this.
3. Here is the BIGGEST 'thing I discovered', There are 1000 to 1000000 better artists out there, attempting to do the exact same thing that I was trying to do.
4. Uhm, this is minor issue (now) but at the time it 'hit me' pretty hard.... If you release ANYTHING on the internet.. well you get pirates who basically rip off your stuff and open it up to anyone for free. Therefore, expect to 'lose' some money. The majority of developers and indies are honest and do a good job of paying for what they use. However, this is not a huge issue if you are making substantial amounts of money but, when you 'rely' on that little bit of income to 'close gaps' and all of the sudden it's not there... well, I think anyone would get a bit 'pissed'. In my case, I took it out on everyone and that was so wrong that I should basically give an apology to the entire internet.

So, I leave, I am done, I leave everything 'open source'.

I start getting emails and stuff from small teams and individual developers saying 'thanks for opening your stuff up'. In fact, it's quite a few emails, and my web site pops from 5 or 6 hits a day to 20, 40, even 100+ hits a day. Hell, I actually start 'cooling off' and interesting enough I start looking forward to getting these emails.

Continued in next post
#28
12/15/2014 (8:28 am)
Now, here is the 'problem'. I am not sure why but, I continue to develop and design my personal stuff. Basically, I did not 'leave' I just was not so public about what I am/was doing. Turns out, I am a pretty good 'researcher'. I really enjoy a challenge. So, I play a game and I think to myself 'How was that done'? I dive in and figure it out. I actually find that to be very rewarding.

Now, I figured out that I am just an artist and my techniques and everything are ALL based on stuff that past artists have figured out. So, I am still 'working' why not make my work and research available? I obviously prefer working this way. I can 'experiment' and figure out complex tasks and systems (aka workflows) and try to 'predict' the path of the future for indie devs.

So, I am a 'hobby' developer. I enjoy this role. When I 'discover' a new way to do things and, I figure out a way for non-artists and great game artists to work more 'efficiently', I am going to do my best to pass that info along. (Really, I can push out 10 to 15 HQ models a day... and I HAVE done it.) Honestly, I am NOT the first to think of Photogrammetry in games. I am just ONE of the first artists to see the value of it in T3D. So, I stand on the shoulders of giants but, as I do this, I pass what I learn on to all of you. I am 'in love' again, with my passion for making virtual places. I look forward to my 'free time' again so that I can experiment. I am a hobby artist. I will likely release a HUGE number of these 'real world' models for free under the public domain (CC0). Just because, it's cool. Yep, this stuff is pretty cool....

So, my goal is SIMPLE;

Pass on what I learn

I really love both positive and negative feedback

I don't 'freak out' based on 'comments' anymore

and I am here to help everyone that at least tries to make their dreams of game dev come true.

I don't think I will ever be 'famous or rich' by doing this. In fact, I have found that I am happier when I am NOT focused on that at all. It's funny but, those emails I got from grateful developers mean more to me now than a royalty check each quarter.

lastly, STOP HORRIBLE 'programmer Art?' in it's tracks :-)

Ron
#29
12/15/2014 (11:40 am)
Nice work, Ron! Keep doin' what yer doin'... I for one always enjoy reading about the stuff you do and try to see what I can take and apply to my own content creation pipeline.
#30
12/17/2014 (12:37 pm)
@Kevin,
Yep, that is the total idea, take what you can from my 'experiments' and leave the rest.

Ron
#31
12/27/2014 (12:50 am)
Ron I found T3D through a game called BeamNG Drive that has blown my mind and along with that came the maps involved with the game. I became interested in making maps to drive on and with that uncovered a massive love of creating virtual worlds. T3D has given me the absolutely attainable goal of doing that after years of self rejection. I visited your site in my wanderings to learn and was blown away by your ongoing story....it's so damn real! Following what you're doing is inspirational
in the very "acidic" world of trying get respect and recognition in the visual arts field.

Your posts are awesome and I look forward to your plans for the site, I imagine future tutorials on T3D will be very helpful.

Thank you for the response to the photogrammetry question and I find it an intriguing and exciting way to make an environment come to life.

Thanks, Bobby
#32
01/05/2016 (5:34 am)
This is very interesting,

How is the output, is it compatible with Blender and torque?
or Have to edit the?. Also i have searching web for an alternative.
Currently, i have found 123D Catch. Wikipedia has a list of alternatives
to Agisoft Photoscan. Also NASA Has an Open Source One.
I am providing above information for people who need to try Photogrammetry Thank you for sharing the information and those images.

EDIT: Nasa's Program is not for windows.
Page«First 1 2 Next»