Rotors Shader (Props & Buildings)

About

Rotors shader used for glass and fake water.

Unlike regular shaders, the rotors shader supports semi-transparency, therefore it can be used for transparent glass, fake water, or anything else that requires semi-transprency.

It's usually used for props / buildings / sub meshes which are a part of a bigger asset, such as glass windows sub building for a normal building.

This article assumes you are familiar with regular prop and building asset creation.

Limitations

Lighting

Rotors shader doesn't receive shadows from other objects, meaning it will look unnaturally bright when in the shadow. Also, it only receives illumination from the sun, therefore it will be black when facing away from the sun, which is why it's recommended to use a dark diffuse texture.

Shadows

The shadows for semi-transparent parts will not be semi-visible, they will only be fully visible when the opacity is above 50% (128 on alpha map) and invisible below that.

Reversed Render Order

This means if you have multiple faces on top of each other, the furthest one will render on top of the closest one. This is not very obvious if the object is highly transparent. If the object is split into multiple props, buildings, or sub meshes which are far enough apart then it won't have this problem.

Script

To change the shader of your prop, building, or sub mesh to rotors, you need to run one of these scripts using the ModTools console F7.

Mesh

There's nothing different about the mesh compared to regular assets, but it's possible to use the vertex color red channel to control the opacity, although for almost all cases using the alpha texture makes more sense.

Textures

Diffuse (_d)

Works like any diffuse texture.

Alpha (_a)

Controls transparency, white is fully opaque, black is invisible, shades of gray are semi-transparent.

Color (_c)

Rotors shader only uses the first color variation, so it's not very useful.

Illumination (_i)

The illumination is unusual, and looks different based on time of day. For buildings, remember to import a black illumination map, as it will default to a light gray (192).

Normal (_n)

Works like any normal map.

Specular (_s)

Works like any specular map.

LOD

The rotors shader doesn't work for LOD models.

You can use the Transparency LODs Fix mod by TPB to increase the render distance of the main models.

Examples

You can download the source files of some example assets, which use rotors shader for some parts of the asset.