Dynamic dirt for karts

Dynamic dirt for karts

Postby samuncle » 09 Sep 2018, 22:30

Hi everyone

To all kart creators, let me present you a new very cool feature.

The development version of SuperTuxKart now supports dynamic dirt for karts.
Each time you skid, it adds more and more dirt to your kart. After a moment the dirt fades away.
Here is a preview of Xue after some drifting in the desert
Image

How can I use it?
You need to have the last version of SuperTuxKart exporter.
Create a black/red texture representing where the dirt should be (dark = dirty / red = clean).
PLEASE MAKE SURE TO ONLY USE A BLACK/RED TEXTURE for the dirt mask. Other colors might be used in the future for other effects
Example of dirt mask for a rubber tire (the dirt start on the outer part of the tire
Image

Select the shader PBR custom
Image
slot 2 = pbr data (the rough/metal/emissive map)
slot 3 = normal map
slot 4 = DirtMask

Known bugs and limitation
* Currently sadly, all the karts will be dirty when your kart become dirty. In the future it would be nice if only the player's kart becomes dirty. This will be possible when we have the information if it's the player or not in the shader.
* If you drift in a track with snow it will be the regular dirt. It would be nice to have different dirt texture depending on the track (snowy for snow tracks, muddy for rain tracks, etc).
* It only add dirt when you drift, but maybe it would make sense to have an option to add dirt when you drive over sand/earth/grass/etc.


Export your kart and enjoy!
Image
User avatar
samuncle
STK Moderator
 
Posts: 752
Joined: 16 Mar 2010, 21:28

Re: Dynamic dirt for karts

Postby Alayan » 10 Sep 2018, 01:52

Not tested yet, but from your description, this looks like a great WIP, which is not yet production ready.

Unless I missed something, drifting on asphalt would also dirty the kart ? This would be weird.

However, once tracks will be able to specify dirt textures, and that the additions of dirt to the kart will be more smart (maybe checking a "dirt" value of the texture the kart is currently on, and then checking for drift/etc ?), it would help to make the game feel much more "alive".

Next, dynamic track deformation ? :d
Image
Alayan
STK Moderator
 
Posts: 306
Joined: 25 Mar 2012, 22:11

Who is online

Users browsing this forum: No registered users and 1 guest