Rotors Shader (Vehicle Glass)

About

Semi-transparent windows on a car.

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.

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

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, windshield around Y, rear window around Z. Note that ingame the Y axis is up/down.

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.

Script

To change the shader and automatically calculate vertex paint and tyre 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.