Suggestions for Skidmark effect

Hi,

Im making a racing game and i need to make skidmarks.

But i don't realize a smart way to do that.

It could be using multi-texture but with that i have some limitations. (hardware).

I thought on texture blending to create a new texture! Is it good? Are there utilities for that on the jME api?

I thought on creating geometry above the ground, but i think its not good because can suffer from z-buffer problems doesn't it?

Anyone know a good way to implement skidmarks?



Thanks in advance!

clovis said:

I thought on creating geometry above the ground, but i think its not good because can suffer from z-buffer problems doesn't it?


You can avoid the z fighting with polygon offset, see an example here:
http://www.jmonkeyengine.com/jmeforum/index.php?topic=5758.0
Suggestions for Skidmark effect

Lots and lots of TacoBell :D
basixs said:

Suggestions for Skidmark effect

Lots and lots of TacoBell :D

Nice baxis, thats sick.  XD

You can just use a texture on a parent node, this is very useful cause if you have curbs and barriers, the skid will also appear on those if they are part of the scene graph heirachy.

do you mean like projective texturing or splatting??



Just applying a texture would still require figuring out the proper texture coordinates would it not?



Maybe I am just to dense, but would you mind clarifying a little bit theprism, I would also like to know a decent technique for this.



(No offense with the crude joke, I just couldn't resist; well my right hand was able to but that darn lefty has a mind of its own ;))

hehehe… no problem :wink:

I mean splatting, but it was just words to the wind… hehehe… if projected texture were better, nice.



But how to do it?



When i burnout the car, the skidmark must "mark" the ground since the burnout start to the burnout ending and its not just a line, its can be curved if the driver turns.

So my first idea is to put a texture of tire with for example 16x5 and repeat this texture for all the path of the car tires.

But i dont know how to do splatting.

Do you think im in the right path?

I think the way I would try and go (it might not work the way I see) but would be to use a projective texture and 'build' skid the images as you need them.  (Every curve will be subtle different).



What I like about the projective texture is that it will handle the 'warping' of the texture around curbs and such auto-magically.

But with projected textures the performance decreases right?

Depends,  I haven't found that much of a performance hit.  But I am sure you could use it someway and kill the framerate.

I think using ribbon particles would be fine for this, just make sure the size of one particle is less than one terrain pixel (if using heightmap).

Im using a plain terrain, actually its a Quad.

I will try this ribbon.

basixs said:

do you mean like projective texturing or splatting??
but would you mind clarifying a little bit theprism, I would also like to know a decent technique for this.


I saw a demo - TestProjectedTexture, had a little play with it and added a few more objects onto the scene. If a dded the objects into the right part of the scengraph, they are rendered with the texture.

Not sure how you would handle it if you are already using passes.

The texture itself could be a splat, you just need to know where to draw an opaque dot.

Doing it as a spatial would work too, also a particle generator would be nice as you could very simply fade out the skid with age.

Momoko_Fan said:

I think using ribbon particles would be fine for this, just make sure the size of one particle is less than one terrain pixel (if using heightmap).

Is there a ribbon particle already implemented?
No? How do i implement that?

Ive found a solution for shadow using Spatial.

I put clearPolygonOffset on the onDraw method of my Car.

Now i have a Quad Shadow.



Now its just the skidmark.

http://www.jmonkeyengine.com/jmeforum/index.php?topic=8288.0

Ill try since i got my game translated to 2.0.