Game Development Community

Torque 3D Beta 1 Bug - depth of field skybox issue

by Michael Putters · in Torque 3D Professional · 05/01/2009 (2:00 pm) · 7 replies

This happens when enabling depth of field (which looks kinda really bad compared to the videos shown earlier?) and there is some texcoord issue (I suppose) but only for the skybox:

www.dreamingprophet.com/t3dbugs/dofskybox.png

#1
05/01/2009 (2:28 pm)
I'm not sure what you're saying the issue is? It's blurring the sky because it's way past the focal distance. You can set the focal distance by calling dofposteffect.setfocaldistance( dist ) in the console. There are a couple of other parameters that aren't exposed at the moment for the near/far distances. The amount of blur currently isn't exposed.

Keep in mind that depth of field is something that you really need to tune to have it look right (i.e., just having it be constant and always on isn't really right*), and a lot of that is going to be game and scene specific. The current settings are the way they are mostly to show off the effect.

* - To get a better effect out of it, you could for instance do a raycast and set the focal distance based on where you're looking.
#2
05/01/2009 (2:40 pm)
If you check in the sky there is a line going from top right to bottom left...
And regarding the DOF focal based on where you're looking, I had the impression from the videos that it was already in there, or it's just not in the beta?
#3
05/01/2009 (2:58 pm)
The DoF is just a post effect. While it has a focal plane that can be changed dynamically its not been hooked up to any gameplay logic in the default demos.

The original video was shot in Gerhard's demo which did have this logic.

So one of the issues is that we should hook it up to at least one of the demos via script.
#4
05/01/2009 (3:00 pm)
Ohhh, now I see what you're referring to, yeah. I'm not sure what that is. I haven't seen it before. Question: Does the line there appear *only* in the sky? Or does it have a constant position in screen space as you look around?

Re focal distance etc., the current DoF isn't really completely *done* in terms of stuff that needs to be exposed etc. Also, the video was from TGEA with a custom implementation (set up to look good in that scene etc.) vs. my quick port of the shaders to T3D, so it's not the same setup at all. I do believe that in the video there was some code for setting focal distance based on what you're looking at. I exposed the setFocalDistance so that people can do stuff like that, but I didn't set up anything specific for doing it.
#5
05/01/2009 (3:03 pm)
It has a constant position in screen-space but I only see it where the sky is. And apparently it's a perfect diagonal... It's a bit noticeable just where the sky and anything else (terrain, whatever) are in contact (in screen-space that is) but I guess that's just the blur...
#6
05/04/2009 (4:58 pm)
Logged for further investigation.
#7
08/10/2009 (12:31 pm)
Resolved. Fixed as part of the general overhaul of DOF.