Sign in to follow this  
hvor3

OpenGL Texturing terrain - a question...

Recommended Posts

Hi everyone, this is my first post to this forum. Lately I put some efforts to port my 3D engine from Java3D to openGL (via LWJGL). I already upgraded my 3D engine in number of ways, and now I am at proper texturing of terrain. Until now, my idea was to texture (GL_TEXTURE0_ARB) (say, 200x200) terrain with 256x256 texture for RGB component. That will give colors to terrain, green for grass, grey for stone etc. On top of it, (GL_TEXTURE1_ARB) I modulate this with some detailed "noise" texture which is tiled over terrain. So far, so good, the effect isn't so bad at all. But now, I want to achive different detail textures on different types of terrain. I started to search forums, articles, trying to find some examples how to make that. My idea is to put an alpha mask on each detailed texture, but how really to put it into code ... hmm... I lost myself in EXTTextureEnvCombine.GL_* extension methods, but what I REALLY need is some guide, example of at least one masked texture (two TEXTURE_ARB states, mask and texture), or anything that will help... tnx. my project: hvor.madpage.com

Share this post


Link to post
Share on other sites
Do a search for "texture splatting", from what you're describing, it sounds like you want to use texture splatting. (Although I've never heard of texture splatting being used for a detail texture, I've only heard of it being used to mix different textures).

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this