This page uses sample data to describe basic settings for fogs.
Fogs are set on the scene environment Properties panel of CreativeStudio.
The scene environment can set lights, fogs and cameras for each of several materials in a scene.
Note: Fog is a feature for blending a fog color with a fragment color depending on the distance from the camera. This can be used to express haziness in distant scenery.
Fog color is made to change based on the distance from the camera based on depth values representing depth information.
The following two methods can be used to create fog.
Use CreativeStudio to load the ToyBook sample data prepared in the following folder.
" %NW4C_ROOT%/SampleData/Graphics/Intermediate/ManualResource/TutorialToyBook/ToyBook.cres "
ToyBook uses a fog that uses the depth buffer.
In addition, created fogs are reflected in materials using fog settings found on the scene environment Properties panel.
Fog has been set for the following node in the loaded ToyBook sample data.
Use of fog has been enabled for the Tree node in ToyBook on the material Properties panel.
Select Tree in the Contents panel to open the material Properties panel.
Check the fog settings under General on the material Properties panel.
The Enable fog checkbox should be selected and the Fog number should be 0.
Fog number represents the number set for the fog on the scene environment Properties panel.
Note that if the Enable fog checkbox is not selected, fog settings will not be applied.
This section describes how to actually create a new fog that uses the depth buffer and how to set it for Toy_Book on the scene environment Properties panel.
On the CreativeStudio menu, select Create > Fog to create a new fog.
FogCtr2 is created on the Contents panel.
Select FogCtr2 displayed in the Contents panel to open the fog Properties panel.
Here, we will change the fog color to make changes due to fog in the sample data easier to see.
Note: Left-clicking on the color thumbnail displays a Color Picker pop-up that allows you to set the color.
Settings other than fog color are all the same as those used in the sample data.
For details on settings on the fog Properties panel, click Here.
This section describes how to set the fog created on the fog Properties panel on the scene environment Properties panel and apply it to a material.
Select SceneEnvironment1 displayed in the Contents panel to open the scene environment Properties panel.
The originally configured FogCtr1 is displayed on the scene environment Properties panel.
Add the newly FogCtr2 here.
Clicking the Add button under Fog settings displays the Add fog dialog box.
The number displayed is an automatically selected serial number. This number can be changed freely.
Here, leave the number unchanged.
Use the Fog pull-down menu and select FogCtr2.
Select FogCtr2 and press OK. The newly created fog will be added to the scene environment Properties panel.
Now, fog settings made on the scene environment Properties panel can be applied to the material.
Here, we will apply the fog (FogCtr2) set on the scene environment Properties panel to a material.
Since we are setting the fog to Tree of ToyBook, select the Tree material on the Contents panel.
The material Properties panel will appear when Tree is selected. Change the Fog number under General to 1.
The fog currently set will change to FogCtr2 once Fog number is changed to 1. Confirm that the fog color changes on the Preview panel.
This technique can be applied to create various different fogs ahead of time, allowing the fog settings for each material to be easily changed.
In addition, a multitude of fog settings can be easily shared within a project using sharing.
CONFIDENTIAL