Applying an External Shader

This task shows you how to apply an External Shader which is a material you create yourself from scratch.


Before you begin:
  • Select a product with a material already applied to it.

  • Make sure your shader files have an OpenGL shader profile.

  • Make sure you are equipped with the latest NVidia drivers and specific graphic cards compliant with the CgFX technology.

For more information on how to create materials refer to Creating Materials in the Material Editor User's Guide.

Related Topics
Applying a Car Paint Shader
Advanced Materials Parameters
Mapping Types
About the External Shader Files
  1. Select the Texture tab and select OpenGL Shader from the Type list.

  2. Click in the Selector File area.

    The Material Shader Chooser dialog box opens and displays your files available.

  3. Select the right file.

    All the parameters you can edit are displayed in the Rendering Properties dialog box except the About the External Shader Files you need to load manually.

    Warning: Before applying an External Shader you need to load manually the About the External Shader Files provided in CATIA to get the whole visual effect.

  4. You can modify the Advanced Materials Parameters until you get the effect desired by clicking the arrows up or down.

    Tips:
    • Modify the size of the particles of your material by clicking the arrows of the Material Size box up or down.
    • If you want to modify the parameters declared in the .cgfx file, you can open it with any text editor and make your modifications. Making complex modifications implies that you are familiar with the CgFX language.
    Important: When materials are not applied yet, the shader parameters are not visible. The preview is not updated.

  5. Save your .cgfx file when finished.

    You can apply this shader to the models of your choice.

    Tips:
    • Prefer saving your texture file and your .cgfx file in the same location.
    • All image formats are supported for texture files.
    Warning: A warning message appears when switching from an External to a Car Paint Shader to inform you that all your data will be lost.

  6. Click OK when satisfied.

Important: For very complex rendering effects such as Fresnel or Anisotropic effect you have to create your own .cgfx files. The CgFX language is not developed by Dassault Systemes. Therefore, it is up to you to make the necessary updates for the .cgfx files.