Hi,
Here is my situation : i have an heightmap composed of GeomTriangles. I have a texture for my whole world and i give a tex_coord to each vertex of my GeomTriangles depending on its position in the world (position/world_size).
This works great. But now i wanna add a few roads dynamically on my heightmap (so no precomputing things with software like Freeworld3D, all dynamic).
The problem is that the roads can have any orientation and don’t recover all GeomTriangles completely.
So I looked for some solutions and read about textures projection (that isn’t good for me) and decals (kind of a solution).
But i wonder if it isn’t possible to simply apply the road texture to the GeomTriangles with the good UV.
For an example, i have a corner of one road at (3,3) which corresponds to UV (0,0) of the road texture.
But my GeomTriangle is composed of these points : (0,0), (0,10), (10,0).
Is it possible to put the UV of these points with computed values like (-0.3, -0.5) so that the texture only begins at my point?
I tried that and it was as if i had a kind of mirror effect on the texture.
Thanks for your help.