www.jpct.net

jPCT - a 3d engine for Java => Support => Topic started by: fireside on October 10, 2010, 09:22:08 pm

Title: decals
Post by: fireside on October 10, 2010, 09:22:08 pm
I was wondering how you put decals on terrain surfaces.  Is it a textured quad put just above that has transparency?
Title: Re: decals
Post by: EgonOlsen on October 11, 2010, 07:07:55 am
At least that's what i use to do.
Title: Re: decals
Post by: fireside on October 14, 2010, 11:29:23 pm
Is there a way to get it closer to the terrain and still render?  I can get it within 4.  I tried setSortOffset, but didn't get any change.  This wouldn't be for z, but y. It's something that needs to move around.  The terrain is just flat for now. 
Title: Re: decals
Post by: EgonOlsen on October 15, 2010, 07:48:26 am
If you are coming close, you might run into z-fighting trouble. There's no real way around this.
Title: Re: decals
Post by: fireside on October 15, 2010, 05:23:25 pm
You sort of intimated that you do decals in a different way.  Would that work if the decal had to move around?  I was trying to do a turn marker but it looks a little like a hula hoop.  I could rescale everything, but I'd probably mess it up worse than I have already.
Title: Re: decals
Post by: EgonOlsen on October 15, 2010, 08:33:50 pm
When using the hardware renderer, projective textures might be an option. But to be honest, i would simply go with a textured quad on top of the ground. Should be possible to make this look pretty good.
Title: Re: decals
Post by: fireside on October 15, 2010, 10:49:19 pm
OK, I'll give it some more thought, then.