AnimUV Shader

About

Example of a scrolling LED sign AnimUV prop.

The AnimUV shader can be used to create scrolling or multi-frame animations. There are 2 AnimUV shaders - one for props and one for buildings and building sub-meshes.

The building AnimUV shader doesn't require a mod.

While previously created props still require the AnimUV Params mod, a new method for saving shader parameters by boformer has removed the requirement for a mod. Vehicle sub meshes still require the mod.

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

Textures

The textures work just like they would for any normal prop.

Mesh

UV Mapping

The UV mapping is as usual, but in the case of a multi-frame animation, the first frame should be UV mapped.

Format

Use a format which supports vertex colors, such as FBX or DAE.

Vertex Paint

The vertex colors define which parts will have UV animation.

Black vertex paint will be animated and everything else should be white.

Scripts

There are 2 types of scripts for each type of asset - one creates a simple scrolling animation, and the other can be used to create multi-frame animations.

Transform Amount

For the advanced multi-frame animation scripts, the transform amount is (how many pixels you want the UV mapping to move each frame) divided by (the width or height of the texture).

Frames

The frames variable describes how many frames each animation has.

Cycles

The cycles variable describes how many times per minute the animation runs. If 60 doesn't divide by this number evenly, the animation will "reset" every minute.

Buildings

The building AnimUV shader scripts work without any mods. And they can also be applied to building sub-meshes.

Props

The prop AnimUV shader works only with the AnimUV Params mod. But the mod is not necessary to create the asset and run the AnimUV Params prop scripts, the mod is only required for loading the prop ingame.

Example Source Files

You can download source files and scripts of the examples.

Vehicle sub-meshes

The prop AnimUV shader can also be applied to vehicle sub-meshes using these scripts, but it requires the mesh to be imported as a prop first, then the game must be reloaded and then the vertex paint can be copied from the prop to the vehicle sub-mesh. This is similar to the process of creating rotors shader propellers for blimps.