The easiest way to accomplish runtime painting of splat maps, in order to dynamically change the blending of textures in-game, is to use vertex colors and then in a shader, get the interpolation alpha amount from the vertex color channel.
Not only it’s easy to implement, it’s also very cheap, performance wise.
But there’s a big downside, it’s dependent on the mesh density, which may produce triangulation artifacts.
Notice that this is not the same as a splat map, there’s actually no splat map involved, it just simulates splat maps.
Usages
My intention in order to make this, is because I wanted to simulate dirt being added to a car, and then the dirt can progressively fade out or even be remove by the player, by “washing” the car.
Implementation
Check this experiment’s logs below to see the implementation and examples with both the Godot Engine and Unreal Engine.
Journal
- In-game vertex painting with Unreal Engine (Wash Car Effect) (July 30, 2022 13:49)
- In-game vertex painting with Godot Engine (Wash Car Effect) (July 30, 2022 18:06)
Status
- Completed
Tools
- C++
- GDScript
- Godot
- Unreal Engine
Styles
- Gamedev