Markers/highlights under player units

winkman said:

jmetest.effects.TestProjectedTexture  is the demo for projected textures


Thank you. :) I'll check it out.

Filip
winkman said:

jmetest.effects.TestProjectedTexture  is the demo for projected textures


Really sorry to dig up this old Thread but I'm really interested in projecting textures on terrain like decals.
In fact I need this for many things like terrain degradation (black stain due to an explosion), player selection... So is ProjectedTextureUtil the best way to accomplish this ?

Thanks in advance  :) ! !

If you want to stain existing textures, perhaps it would be better to use Texture Splatting instead? In the forums there are several solutions including a very recent one.

Thanks for replying Duenez :slight_smile: (with such a name, are you from Brittany ?)



In fact, I thought texture splatting was a way to paint blended terrains thanks to an alphamap.



So I’m not sure I can apply such a bullet impact on my terrain for example:



http://www1.istockphoto.com/file_thumbview_approve/3855759/2/istockphoto_3855759_bullet_impact.jpg



if yes, could you point at the thread on the forum for doing this ?



Thanks so much !

you cannot achieve this by splatting. you'll have to take a quad and wrap it around the terrain. if you wait long enough, i might do it because i need this as well (and not only for terrain, but for arbitrary meshes).

HamsterofDeath said:

you cannot achieve this by splatting

Of course you can! The approach just has some limitations. You are stuck with one colormap texture in each splat layer, and the splat alpha map won't be high resolution enough to look very good in most cases. But in some specific cases, like painting dark, soft blended explosion marks on terrain, it is quite possible.

no it's not. you can only make another layer containing a tilable texture visible. you cannot adjust the position of each decal. their coordinates are static. if you shoot everywhere, you'll get chessboard bulletholes instead of more or less random ones.

what you can do is to paint marks on the alpha layer itself and change the color of the terrain, which should be ok for BIG decals.

Currently pondering on how to do this for across many terrain pages ( Llama terrain )



How will this work where two ( or even four for the corners ) pages meet ??

HamsterofDeath said:

you cannot achieve this by splatting. you'll have to take a quad and wrap it around the terrain. if you wait long enough, i might do it because i need this as well (and not only for terrain, but for arbitrary meshes).


That would be really a great feature ! Didn't know it would be also possible to extend it to any kind of meshes too.
But like ThePrism said, maybe it's gonna be a problem between terrainPages transitions ?

no it won't. if/when i'm going to do it, i will use an algorithm which will operate on triangle/quad level and getHeight() for terrains. as long as getheight works, several terrainpages should be no problem.

Texture Splatting is a bad way to do this, ProjectedTextureUtil is better but still has the texture unit limitation. The best way is like Hamster said to project a grid onto the terrain and then apply the texture on it.

Its good for regular ( square grid point based terrains ) to have a regular mesh that matches a small area of terrain, and if the terrain scale is large. But if your terrain mesh isnt regular or the terrain scale is small it would create a bit more processing power to recalculate the heights of your player indicator.


orelero said:

(with such a name, are you from Brittany ?)


Since these guys seem to be providing all possible arguments and counter-arguments, I am left with nothing more than to answer your other question... No, I am from Mexico.  ;)
duenez said:

orelero said:

(with such a name, are you from Brittany ?)


Since these guys seem to be providing all possible arguments and counter-arguments, I am left with nothing more than to answer your other question... No, I am from Mexico.  ;)


hahaha ok :D
Yeah these guys well explained the situation ! I'm looking forward to see Hamster's solution  8)