Rotors Shader (Vehicle Glass)

About

Rotors shader was designed for spinning helicopter and blimp propellers, but it can also be used to create semi-transparent glass window sub-meshes for vehicles. The shader spins similarly to wheels and there is no known way to stop it from spinning, so a workaround defines each vertex of the mesh as a wheel which spins around itself.

This article assumes you are familiar with rotors shader prop or building asset creation and regular vehicle asset creation using sub-meshes.

Semi-transparent windows on a car

Semi-transparent windows on a car.

Limitations

Trailers

This technique is currently not applicable for trailers, because they recalculate vertex colors when the trailer is added.

Suspension

The rotors shader will not move together with the vehicle suspension, so suspension lean and nod multipliers should be set to 0.

Mesh

Vertex Count

Each sub-mesh is limited to 32 vertices, this is because vertex paint is used to define each spinning "wheel" and every wheel adds 8 to the green vertex color channel.

Vertex Normals

Every vertex will become a wheel which spins around itself, and it can only spin around one axis, which results in rotating reflections while the vehicle is moving. To hide this problem, all vertex normals of each mesh should be facing straight into the direction of the axis around which they will spin.

Car windows split into 4 sub-meshes

Car windows split into 4 sub-meshes. Normals of each mesh are facing straight on an axis. The side windows will spin around X-axis, the windshield around Y, the rear window around Z. Note that ingame the Y-axis is up/down.

Script

To change the shader and automatically calculate vertex paint and tire parameters, use this script .

Textures

Everything is the same way as for regular rotors shader props and buildings, except for the alpha map. On vehicles, the sub-meshes will be 50% transparent by default and the alpha map can only make it even more transparent.