Right blending for detail map
Yep, as the subject already indicates I''m having problems with using my detailmap the right way.
My terrain has a base texture and a multitextured detail texture. The first one is drawn with GL_REPLACE, the second one with GL_MODULATE.
The problem is that the detailtexture makes the colormap much darker. I think I should change something with the blending but I don''t know where and how...
(From Photoshop I know that there are different ways like ADD, SUBTRACT, MULTIPLY, SCREEN, DISSOLVE and stuf like that..?)
Any ideas?
By default, the multitexturing is useful only for light maps.
If you want anythign else, look into ARB_texture_env_combine ...
Height Map Editor | Eternal Lands | Fast User Directory
If you want anythign else, look into ARB_texture_env_combine ...
Height Map Editor | Eternal Lands | Fast User Directory
A strange personal idea...
A big RGB texture; then compute shadow (for example by deriving the height map) and blend it off-line with the texture: simply multiply each component for a shadow coefficient.
Use a single texture for the details but modulate it with the RGB color in the big one.
In other words you use the big texture for glColor() and the detail texture as texture to be modulated.
I''m sure there is a way to do this using multitexture without using glColor() for each vertex...
A big RGB texture; then compute shadow (for example by deriving the height map) and blend it off-line with the texture: simply multiply each component for a shadow coefficient.
Use a single texture for the details but modulate it with the RGB color in the big one.
In other words you use the big texture for glColor() and the detail texture as texture to be modulated.
I''m sure there is a way to do this using multitexture without using glColor() for each vertex...
perhaps your detail texture has a darker background color than the terrain texture? if so, you might have to color-key the background.
quote:Original post by VanKurt
(From Photoshop I know that there are different ways like ADD, SUBTRACT, MULTIPLY, SCREEN, DISSOLVE and stuf like that..?)
Any ideas?
GL_MODULATE will be the same as MULTIPLY - this will probably work fine if your detail texture is drawn taking this into account (ie, mostly white). Otherwise you probably want something like ARB_texture_env_add.
Actually I have to admit that I am not able to init ARB_texture_env_combine.
:-(
Is anyone willing to help me?
:-(
Is anyone willing to help me?
I have been trying to get this working for several hours now....ARGH!!
Here''s the result of my efforts:
But NOTHING HAPPENS!!! There is just the stupid old standard blending. It doesn''t even matter if I comment the "glTexEnvi( GL_TEXTURE_ENV, GL_COMBINE_RGB_ARB, GL_ADD );" line away... :-((
gotta get to bed...
Here''s the result of my efforts:
glActiveTextureARB( GL_TEXTURE1_ARB ); glEnable( GL_TEXTURE_2D); myTexMan.Bind(tex2); glTexEnvi( GL_TEXTURE_ENV, GL_COMBINE_RGB_ARB, GL_ADD ); if( glGetError() == GL_INVALID_ENUM ) bbMsg.Std("ERROR"); glActiveTextureARB( GL_TEXTURE0_ARB ); glEnable( GL_TEXTURE_2D); myTexMan.Bind(tex1); glTexEnvi( GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE );
But NOTHING HAPPENS!!! There is just the stupid old standard blending. It doesn''t even matter if I comment the "glTexEnvi( GL_TEXTURE_ENV, GL_COMBINE_RGB_ARB, GL_ADD );" line away... :-((
gotta get to bed...
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement