02 mm shader userguide catia

4

Click here to load reader

Upload: rakeshpa2078662

Post on 07-Apr-2015

56 views

Category:

Documents


4 download

TRANSCRIPT

Page 1: 02 Mm Shader Userguide Catia

Using mental mill shaders in Catia | © 2007 mental images page 1 of 4

Using mental mill® shaders in CATIA

This document describes how to export shading networks and shaders from mental mill so that they can be used right away in CATIA, as well as a few best practices for using mental mill shaders in CATIA.

Preparing the shader in mental mill

1. Create your shading network with mental mill and when you are satis-fied with the result, you should export to CATIA.

If you are using and environment shader, make sure you activate it under 2. “Render > Scene settings”.

Select the root node of your network and select 3. “File > Export”.

Open CATIA to begin the process to load the exported mental mill 4. shader.

In preparation, please modify the following options in CATIA.

Enabling OpenGL shader

Open up the options window under “Tools > Options… “. On the left-hand side expand “General” and select “Display”. Select the tab “Performance”, scroll down to the bottom and make sure that “Enable OpenGL shader” is checked.

Switch to Real Time Preview

Select “Infrastructure > Real Time Rendering” to switch to real time rendering mode.

Import your shader to CATIA

There are two options for how to import the shader into CATIA. You can either add the shader directly to your 3D geometry or you can add the shader to your material library.

Page 2: 02 Mm Shader Userguide Catia

Using mental mill shaders in Catia | © 2007 mental images page 2 of 4

Importing the mental mill shader to the material library

Create a material library under 1. “Infrastructure > Material Library”. There is already an empty material in the library.

2. Add a new material

Rename your material3.

Enter the material properties (using 4. <Alt + Enter> as a convenient short-cut)

Inside the material properties choose the Tab 5. “Rendering” and select the subtab “Texture”

6. From the drop down menu, select “External Shader”

7. Click on the icon to open a dialog box where you then select your ex-ported shader file. Click “open”

8. After the shader has been loaded, the shader ball should already have the material applied to it.

Under the text box with the current filename a list with all adjustable 9. parameters should appear.

You can fine-tune your parameters easily using the UI10.

Once you are satisfied with your result, click 11. “OK” to exit the Property window.

On the material icon in the library, a small label “FX” appears. This indicates that the material is using an external CgFX shader and that you have successfully loaded your shader in CATIA.

The material property window

Page 3: 02 Mm Shader Userguide Catia

Using mental mill shaders in Catia | © 2007 mental images page 3 of 4

Applying your shader directly to your 3D geometry

Make sure that the object already has a material applied and that you are 1. in Real Time Rendering mode

Right click on the object and select the 2. “Material > Edit Material”

Follow steps 5 to 10 from above3.

Useful tips and best practices for mental mill and Catia

Keeping exported shaders simple by using Phenomena

Usually you only want to modify a few important parameters in your shade tree while keeping all others constant. Phenomena allow you to do this by reducing the number of modifiable parameters and expose the relevant parameters in the UI.

To create a Phenomena, select all parameters of your shader network, 1. right-click on the workspace an select “Create Phenomenon from selec-tion” from the popup menu. In the upcoming window, type a name for the Phenomenon

Connect the root of the shader tree to the Phenomenon’s 2. “result”

3. Right click the parameters that you want to add to the interface of the Phenomenon and select “Add ‘parameter_name’ to ‘phenomenon_name’”. The parameter will be added to the interface of the Phenomenon

Add all relevant parameters to the Phenomenon4.

Interface parameters can be easily renamed by right-clicking them and 5. selecting “Rename ‘parameter_name’”

The process of exporting Phenomenon from mental mill is the same as de-scribed above.

Example of a Phenomen with exposed inter-face parameters

Page 4: 02 Mm Shader Userguide Catia

Using mental mill shaders in Catia | © 2007 mental images page 4 of 4

Improving the image quality in CATIA

CATIA offers the possibility to oversample the image being rendered to the viewport. Jagged edges are being antialiased which increase the perceived im-age quality considerably.

To activate oversampling in CATIA, go to “Tools > Options”. On the left-hand side of the window expand “General” and select “Display”. Choose the Tab “Visualisation” on the right. There you can find the Option “Antialiasing” where you activate “Full Scene” and set the Super sampling value. Higher super sampling gives better results, but take longer to render.

Currently known restrictions

Texture files used must be .dds files. The size must be a power of 2 (256 x 256 or 512 x 512) and the mipmaps must be contained in the dds file. A comfort-able tool for generating mip mapped .dds files is “DxTex”, a tool for creating .dds files which is bundled along with the DirectX SDK from Microsoft.

Improving image quality by enabling super sampling

No Antialiasing: Notice the jagged edges

8x Antialiasing: The jagged lines are being smoothed out

A concept car using a realitme shader created with mental mill