Game Development Community

Torque 3D Development - Depth of Field

by Brett Seyler · 02/22/2009 (11:11 pm) · 38 comments

68.233.5.139/~transfer/brett/header_blog_t3d_dev-1.png

Last week, we announced a major update to the Torque art pipeline: native Collada file loading. Today we're circling back to Gerhard Botha's work again to preview the Depth of Field shader (DoF) for Torque 3D.

The video below shows the full DoF functionality we expect to ship with Torque 3D. Each real-time variable parameter for the shader will be accessible in script, and perhaps in the editor interface as well. For this video though, commands were keybound as we're (still) not yet ready to show the new editor updates.

The lighting in this footage is also still far from complete. Gerhard is working with a hybrid of our new Torque 3D Advanced Lighting, and the older TGEA lighting. Pay attention to the notes in the video that precede the actual footage. The DoF shader has been exaggerated in a number of ways to better demonstrate the effect.


I've still yet to introduce you all to Ruan West, the man responsible for the art content in these videos we've used to show Gerhard's programming work. We'll talk to Ruan soon and hopefully learn something about how he creates such nice looking stuff in Torque. We'll also get his feedback on the new content pipeline for Torque 3D, and perhaps we'll have been able to reveal additional updates to Torque's content pipeline as well.

Gerhard still has a lot to show us too, of course. For a quick review in case you missed the Wetness & Precipitation blog where he was formally introduced, here's quick backgrounder on Gerhard and his work on Torque 3D.

68.233.5.139/~transfer/brett/gerhard2-rounded-bordered.png

Gerhard's Bio

"I am the head of software development in South Africa for an England based company developing software and hardware solutions for fatigue testing and structural analysis for the automotive and aerospace industries. My weekend hobby is the development of plugins for 3D Studio Max as well as the development of advanced gaming features and shaders for Torque. I am currently working on some AI and advanced shaders for Torque 3D which includes:

www.rustycode.com/matt/bp.jpg Screen Space shaders (Ambient Occlusion (SSAO), Bloom, Depth of field, Geometry smoothing. Motion blur)
www.rustycode.com/matt/bp.jpg GPU cloth dynamics.
www.rustycode.com/matt/bp.jpg GPU simulated water effects.
www.rustycode.com/matt/bp.jpg GPU soft particles.
www.rustycode.com/matt/bp.jpg GPU soft/rigid body dynamics.
www.rustycode.com/matt/bp.jpg Dynamically destructible objects.
www.rustycode.com/matt/bp.jpg Computational intelligence algorithms for AI usage.
www.rustycode.com/matt/bp.jpg Multi-pass deferred CustomMaterial shaders."



More development blogs to come. This is post #11.

Torque 3D development blogs:





About the author

Since 2007, I've done my best to steer Torque's development and brand toward the best opportunities in games middleware.

Page «Previous 1 2
#1
02/22/2009 (11:24 pm)
Looking good... is about all I have to say... um... yeah, excellent job! ;)
#2
02/23/2009 (4:46 am)
Interesting stuff. T3D looks better with each blog. :-)
#3
02/23/2009 (5:28 am)
Nice feature addition to T3D. Glad I didn't add yet to TGEA since its now in T3D..:)
#4
02/23/2009 (6:30 am)
Looking really great guys - love seeing some of the flashy new functionality being added to Torque 3D, are you all really pleased with how it's progressing?
#5
02/23/2009 (7:24 am)
Awesome! 'Nuff said.
#6
02/23/2009 (8:40 am)
Gerhard should make an engine of his own.
#7
02/23/2009 (9:39 am)
Odd...I'm not seeing any video above, just a blank space.
#8
02/23/2009 (10:06 am)
You might want to upgrade your adobe flash player (www.adobe.com)
#9
02/23/2009 (10:15 am)
Nice demo! Pretty pretty pretty!

On a side note, don't forget to change "aperature" to "aperture" in the text of the demo.
#10
02/23/2009 (10:17 am)
Love this video can't wait to see more.
#11
02/23/2009 (10:37 am)
Fantastic work, Gerhard.
#12
02/23/2009 (11:03 am)
Just a note to future designers...

In real life, I turn my head to a position and then can move my eyes to look anywhere in my field of view. The things I look at are clear.

In a game there might be a sign some distance off, but within my field of view. I shouldn't have to turn my head to make it less blurry. I'd look over there with my eyes and it would be focused.

It's the only beef I have with DoF in games. Why should I have to turn my head to get a clearer picture?

(Much like lens flare, these should be used as camera/cinema effects, not people effects.)
#13
02/23/2009 (11:11 am)
I do have the latest Flash player. No video... (Mac OS 10.5.6, Safari or Firefox)

#14
02/23/2009 (11:26 am)
Note on the video: I was having some problems with this too initially, and refreshing the blog helped. Since then, I haven't had a problem. As far as I can tell, it's a Vimeo snag, but we're looking into it to triple check it isn't a problem on our end.
#15
02/23/2009 (11:39 am)
@William

Not really true, just appears to be in focus. Humans have a 180 deg field of view with only about 140 deg of that usable for depth perception. This leaves about 40 deg that is not in clear focus.

If you want to program the camera to turn your eyes you can, then program another command for turning the head. But that's not practicle, so in games you generally just turn the camera and head. Just easier.

I like the idea of FOV. Because as a firearms instructor, this is very evident. If you don't believe me hold your finger at arms length in front of you and focus on your finger with your monitor behind it (or something to read). Then try and read the monitor behind it.. It's not in focus.... Your eyes are only focused on what you are looking at. You can see the text, but not to the detail of reading it. As noted in the video above, it's exaggerated for effect. Although I would use this, I would not to the level used in the demo. It should just be slight.

Now, if you are like me and have progressive lens glasses, you know very well about depth of field:).
#16
02/23/2009 (12:13 pm)
@Deborah: I've tried refreshing and using different browsers, still just a big blank space...

#17
02/23/2009 (12:21 pm)
What technique is used for blur? It's hard to see in the video. Multisampling or something more complicated?
#18
02/23/2009 (1:13 pm)
@Randy

My point is that you DO have about 140 degrees that you can look around in without turning your head.

In a game without DoF, I can look around the screen as though my eyes were looking around. I am able to "focus" on that spot (say, a player in the distance) because there is no blurring.

In a game with DoF, I have to turn my head _exactly_ toward the player to de-blur the distance, something I don't have to do in real life.
#19
02/23/2009 (1:14 pm)
That's awesome stuff for sure.

It reminds me of the Depth of Field pack that you can buy from Ubiq Visuals Store (www.garagegames.com/community/blogs/view/16229 for TGEA).



#20
02/23/2009 (1:17 pm)
The auto focus would be exceptionally nice used subtly for first person.
Sure the hell beats a set distance DOF, used just for effect.
Page «Previous 1 2