With CreativeStudio lights and various material textures can be expressed using lookup tables.
Here, we will use sample data to introduce a method of creating materials for which lookup tables have been configured.
Note: For details on lookup tables, see the separate document Introduction to CTR Graphics.
Use CreativeStudio to load the LookupTableChess.cres sample data prepared in the following folder.
" %NW4C_ROOT%/SampleData/Graphics/Intermediate/ManualResource/TutorialLookupTable/LookupTableChess.cres "
When LookupTableChess.cres is loaded a lookup table set (Piece.MaterialLutset) and chess piece model of a knight (Piece) will be displayed in the Contents panel.
Note: The lookup table, LookupTable_1, is already included in LookupTableChess.cres.
Here, we will configure a Distribution 0 and Color lookup table for Specular 0 using the material Properties panel.
(1) Select the material (BlackKnightMat) displayed in the Contents panel to open the material Properties panel.
Note: You can double-click on the icon for any material displayed in the Contents panel to open the material Properties panel in a separate window.
(2) On the material Properties panel Fragment tab, select the lookup table set shown below from the Lookup table set pull-down menu.
Note: If there is more than one lookup table set, all lookup table sets available for use will be displayed in the pull-down menu.
If there are no lookup table sets loaded into CreativeStudio, only Not used will be displayed.
For information on creating a new lookup table set, click here.
Use of a lookup table set allows you to set a lookup table, input angle, and scale settings used for a given component.
(3) Click on the Distribution 0 component to enable it.
For details on components that can be used with lookup tables, click here.
Note: Lookup table settings are applied to a material by enabling a component.
If a component is grayed out, it is disabled. Even if settings are changed, there is no effect on the material.
(4) After enabling Distribution 0, configure LookupTable_1 for the lookup table.
If you want to set a lookup table for more than one component, repeat Steps (3) and (4) for each component.
(5) On the Color tab of the material Properties panel, select the Material color tab and set Specular 0.
At this point, set the R channel for Specular 0 to 1.
Note: The lookup table component Distribution 0 can be used to set the color of Specular 0 because it controls Specular 0.
(6) Confirm that Enable fragment lighting is selected on the General tab on the material Properties panel.
If Enable fragement lighting is not selected, select it now.
Note: If Enable fragment lighting is not selected, the model will appear completely black.
For details on fragment lighting, click here.
(7) Configure a texture combiner on the Fragment tab of the material Properties panel.
Although were are done configuring the lookup table, specular effects still cannot be seen in the 3D model.
Here, we will apply a specular effect to the model by setting the secondary color (a specular component) using a texture combiner.
Settings:
Add the Primary color and Secondary color under Combiner 0. Set Formula to A+B, set A: Source 0: to Primary color, and B: Source 1: to Secondary color.
Note: By adding the Primary color (ambient and diffuse effects) and Secondary color (the specular component), the above settings result in a material that includes a specular effect.
Once the above settings are made, a red specular can be observed in the 3D model.
(8) Check the curve for lookup table LookupTable_1.
Select Piece.MaterialLutset displayed in the Contents panel.
While Piece.MaterialLutset is selected, on the CreativeStudio main menu, select Window > Curve editor to open the Curve editor panel.
Note: On the Curve editor panel, specular brightness can be made to vary by varying the curve's vertical axis output value.
Specular size can be made to vary by varying the range of horizontal axis input values.
For details on the vertical and horizontal axes used in lookup tables, click here.
Here, we will change the shape of Specular 1 by creating/editing a lookup table.
(1) Select Piece.MaterialLutset, displayed in the Contents panel to open the lookup table set Properties panel.
(2) Press Create to create a lookup table.
Pressing Create will create the new lookup table, LookupTable_2.
You can give the lookup table any name, but we will use the name LookupTable_2 for now.
(3) Set the new lookup table for use by Distribution 1.
The layer config must be changed in order to use Distribution 1.
Open the material Properties panel and set Layer configuration on the Fragment tab to Layer Configuration 2.
Note: If the component is enabled, be careful when setting the layer configuration.
There are components that cannot be used by the layer configuraiton.
Components that cannot be used due to the layer configuration setting are grayed out as follows in the material Properties panel.
For details on layer configuration, click here.
(4) After enabling Distribution 1, configure the newly created LookupTable_2.
(5) Set the color for Specular 1 on the Color tab.
At this point, set the G channel for Specular 1 to 0.5.
Note: The lookup table component Distribution 1 can be used to change the color of Specular 1 because it controls Specular 1.
When the color is set, you can see in the Preview panel that Specular 1 has been applied to the model.
Points:
When the color of Specular 1 is set, you can see that the red Specular 0 set for Distribution 0 has turned yellow.
This is due to the fact that the color components for Specular 0 and Specular 1 have been added.
(6) On the Fragment tab, change the input angle for Distribution 1 from NH to NV.
Note: By changing the input angle, you can change the appearance of the model (direction of reflected light) even while using the same lookup table.
For details on input angles, click here.
Changing the input angle to NV changes the model's shadows.
Specular 1 causes shadowing to be created by light striking from the camera direction.
Check that light appears to be striking the model from the direction of the camera by rotating the model.
(7) Edit the lookup table and set Specular color 1 so that it is displayed around the edge of the model.
Select Piece.MaterialLutset displayed in the Contents panel.
On the CreativeStudio main menu, select Window > Curve editor to open Curve editor.
Select LookupTable_2 and edit the curve as shown in the figure below.
Note: Specular brightness can be made to vary by varying the curve's vertical axis output value.
Specular size can be made to vary by varying the range of horizontal axis input values.
For details on the vertical and horizontal axes used in lookup tables, click
here.
The specular shape of Specular 1 changes and a green edge appears around the 3D model.
(8) The appearance of the model can be changed by editing the lookup table in Step (7) and the color tab in Step (5).
Here, we will change Specular 0 to white and Specular 1 to gray on the Color tab.
Once the above settings are made, you can check on the Preview panel that the specular colors have changed for the 3D model.
We also recommend that you check here, since sample data used in lookup tables with CreativeStudio has been prepared.
CONFIDENTIAL