Rendering trail behind character

Hiya,

I’m making a little snowboarding game, and it’s going very well so far - however, I’d like to render trails following the snowboarder.
I have two potential ideas:

  • generate a mesh following the character’s path and texture it appropriately
  • try using a vertex shader to deform the terrain behind the player

I was just wondering if anyone had any suggestions about the best way to go about implementing this / has done anything similar before and could point me in the right direction.

Thanks for any help!

Well, I have just starting something similar for my ships and until now, I am working with a particle emitter. Since the snow where you are snowboarding seems stationary to me, a particle emitter could work for you as well? I don’t think the trail has to last forever, so after a few seconds you can have the particles die.

When using the correct texture for the particle, this could give you the required effect.

2 Likes

You can look into this thread, someone already did something similar
http://hub.jmonkeyengine.org/forum/topic/lines-and-trails/

Also , there was a TrailMesh in JME2 maybe you could dig up the source and adapt it.

2 Likes

Thanks both for such a quick response!

@nehon - that’s exactly what I was looking for, thanks! My search-fu appears to have failed me, sorry about that!
@husky - I will be using a particle emitter as well, to throw up the snow in addition to the above effect :slight_smile:

Thanks again for your help!

1 Like

Just a quick follow up (in case anyone searches for snowboard trail rendering in the future!) I’ve used the TrailControl class by @cvlad and it’s perfect.

Thanks again :slight_smile:

1 Like