Depth of field... how's it done?

Miscellaneous Forums/General Discussion/Depth of field... how's it done?

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

In Myst 4 they used depth of field, on 2D images. :)
Most likely they cut the scene into 2d layers and was bluring everything in front of and behind the layer the player had in the middle of the screen. It worked rather nice I must say.

In a 3D scene you could add in some checks to see what is closest to the center of the screen (not what's in front of the player, what is close to a ray shot stright ahead)
Then you sort them according to some score system where an enemy is very important and a barrel is not as important, and that tree is not important at all. When this is done, use the object you have at the top as the focus point. That is at least something I will try to do next time I get some 3d programming motivation.