Monday 1 March 2010

Shaders and kuju materials - TrainBumpSpec.fx

TrainBumpSpec.fx is the material we use when we want something to have a brushed metal appearance. A good example would be the material used on the areas of a wheel that is in contact with the rails.

Consider this simple wheel.

We use two different materials for the wheel. One material will be dull (something like a basic TexDiff material) and used over most of the wheel. The second material is our "TrainBumpSpec.fx" and will be used on the contact areas. This will be the shiny metal material.

See the two selections below.

TrainBumpSpec.fx is a two-slot shader. Slot 1 references the main RGB texture "wheel1", and slot 2 references the normal map "generic_nm". The important thing to remember is to set the 'phong' size (size of the specular highlight) and the specular power. The 'phong' size is set by specifying "32" in the first UV argument in slot 1

Slot 1:


Slot 2:


The specular power is set at 4.0. See below.


Using these values, the wheel should look something like this.


Example wheel texture

8 comments:

  1. Just to be sure, is the normal map derived from the RGB texture? Also, is the RGB texture a bitmap or tga file?

    ReplyDelete
  2. Yes, the normal map can be derived from the RGB channel if you so desire. However for the example above, the effect can be achieved using a simple flat 'generic' normal map. The important part of the shader is the specular values, not the information in the normal map.

    Using our tools, the export process relies on the textures being in the ACE file format. The RGB texture above is a simple 24-bit texture.

    ReplyDelete
  3. This is a great blog, absolutely necessary to anyone wanting create assets for RailWorks. Under what license are the images of this blog copyrighted? In other words, under what conditions could we be allowed to use them in a French speaking wiki?

    ReplyDelete
  4. These images can be used freely.

    regards

    Derek

    ReplyDelete
  5. Great news, thanks for the info.

    ReplyDelete
  6. You can create a similar statement, with plugins for 3d max 2011-2014?

    ReplyDelete
  7. I notice that your shader's slot1 and 2 image are .psd extension Am i right?
    But my qu is,,, How do you export the model to igs by KUJU exporter using .psd files extension, As I know exporter did not work with psd files .....

    ReplyDelete
  8. This lesson was written using modern RW materials, not Kuju's ones, I think. That's the reason.

    ReplyDelete