Simple texture on terrain


01-04-2008 23:13:16

Hey, think I have a pretty simple question, but can't really see the answer.
How do I easiest project a texture to a quad on the terrain? It should be a single texture, and I wanne give a position, width and height, and it should then be drawn at the terrain.


03-04-2008 11:32:00


03-04-2008 14:10:59

Tried the projective decal first, and failed with getting a correct size of the decal. Looked at it again now, and it seems like I messed up my trigonometry.

Shouldn't this give the same result?

mFrustum.FOVy = new Radian(Mogre.Math.PI/2);
mFrustum.NearClipDistance = mSize.y/2.0f;


mFrustum.FOVy = new Radian(Mogre.Math.PI/4);
mFrustum.NearClipDistance = mSize.y;

(the first code is the one that works)
The frustum now gets the correct values, only need to adjust the size with respect to the alpha border, but that should I be able to do =)

Thanks for setting me at the right track again Song!