(TS 3.2) Depth of Field... A How To

About Truespace Archives

These pages are a copy of the official truespace forums prior to their removal somewhere around 2011.

They are retained here for archive purposes only.

(TS 3.2) Depth of Field... A How To // TS6 and Older

1  |  

Post by MikeJoel // Dec 2, 2008, 9:31am

MikeJoel
Total Posts: 266
Here is a quick tutorial on DOF for 3.2 (now calm down… I know you've been waiting for this one.... :D).


Actual I did this to help out anyone who had a 3.2 question about DOF and for future references to DOF. I place it here because I lose things.


Depth of Field (for 3.2 but probably close to other versions)


DOF (depth of field) is used to simulate the natural blurring of object spaced further away from your point of focus. This effect can be created in many paint programs as a post rendering process, but this is a reference to doing this in TS 3.2.


The manual reads pretty clear:

“Depth of Field

The buttons in the Depth of Field section function as follows: The

on/off radio buttons enable and disable depth of field functionality

respectively. The Focus field is used to set the sharpness of the image.

Larger values result in images which are blurrier the further polygons

are from the focal point. The F. Dist field sets the distance from the

current eye/camera position to the focal point of the image. This

distance goes straight into the screen Z axis and follows the World

units. If the current frame has a Look At key, then the focal point

will be the axes of the object being looked at and the Focal Distance

field will be ignored.”


But I’ll go through it step by step.


After you create your scene add a camera and select the “Look At” button found in the button set next to the “Keyframe Editor”. Click the object you want to be the main focus*.


Now you are ready to render a DOF scene.

Select the camera you want to render the view from.

Right-Click the “Object Tool” button to bring up the “Object Info” window.

**Copy the value found the Z field on the Location row. This value will be used to set the point of focus.


I am assuming you have already adjusted all the rendering settings you want for the scene (by Right-Clicking the render button). Depending on the amount you plan to blur you may not need to use anti-alias, but it doesn’t matter to much if you do.


Now bring up “Render Scene to File” window.

In the lower (left side) of the window you will need to click the ON for Depth of Field (Motion Blur should be OFF).

Right across from this you will find the “Motion Blur/Depth of Field settings” area.


There are four fields to be adjusted:

Blur Length – This is used for the Motion Blur and not needed for DOF.

Depth of Focus – This will adjust how much blur should be used. The higher the number the more blurring.

F. Dist – This is the focal point of the scene (the area with the least amount of blur).

Blur/Depth Frames – This allows you to adjust the number of frames to be rendered. The more frames the smoother the blur. The fewer the frames the more “chunky” the blur.


Remember, that the blur effect is nothing more than TS using multiple renderings to compile one image. The more variation between the individual renderings the more blur. The more frames allowed to be rendered the smoother this blur will be.


Ok so put the Z value you copied from the camera (though it isn’t really needed as long as you used the “Look At”) into the F. Dist field.


In the “Depth of Focus” field enter 5 and in the “Blur/Depth Frame” field enter 12.



Now render to a file.

You will see TS render 12 frames. Each frame will be slightly rotated around the point of focus (F. Dist). The final rendering brings all the previous renders together to create the DOF image.



Experiment with values in the “Depth of Focus” and “Blur/Depth Frame” fields.





* Note: Another method might be to create a small cube and choose it as the subject of the “Look At” for the camera. This would allow you to quickly change your focus point with the camera automatically updating it’s position/angle. The cube can be made invisible before rendering.


** Note: If you are using a camera with the “Look At” as described you really won’t need to bother copying the camera’s Z value OR setting the F. Dist field when we “Render To File” because TS 3.2 will automatically use the Camera’s focus point (the object that is the subject of the “Look At” as the focus point).




Sample with Depth of Focus set to 5 and Blur/Depth Frames set to 12

16596



Sample with Depth of Focus set to 3 and Blur/Depth Frames set to 3

16597




NEXT WEEK: Tips and Tricks to MineSweep! Windows 2.1



(Wanted to give Bobbins a thanks for originally helping me out with understanding DOF)

Post by Jalm // Dec 2, 2008, 4:03pm

Jalm
Total Posts: 21
pic
Thank you Mike, I got it at last. :banana:


http://i299.photobucket.com/albums/mm300/chitojalm/dof.jpg

Post by MikeJoel // Dec 3, 2008, 4:21am

MikeJoel
Total Posts: 266
Nice work. Looking good.

Post by Jalm // Dec 3, 2008, 5:58pm

Jalm
Total Posts: 21
pic
Thank you.

Post by nowherebrain // Dec 6, 2008, 5:43pm

nowherebrain
Total Posts: 1062
pic
Alternately, I have a tut for tS6 that should work in tS3 as well. It is free on my site if you are interested.
Awportals.com is a privately held community resource website dedicated to Active Worlds.
Copyright (c) Mark Randall 2006 - 2021. All Rights Reserved.
Awportals.com   ·   ProLibraries Live   ·   Twitter   ·   LinkedIn