change texture gamma color: is this possible ?
Well guys do not hate me if I always ask strange things, but thanks to you I''m developing my flight simulator very quickly and with good result. Now I''d like to simulate afterburners, so I did this: I created two spheres inside the rear part of the engines, I applied a grey texture (from a bitmap file) to the spheres; now, when I increase the throttle I would like to turn gradually the grey texture to a yellow one, passing through red, orange and finally arriving to the yellow color. In few words I would like to change the RGB values of the texture bitmap in order to achieve this. Well that''s it !
ciao
You could try two things:
1. Keep the bitmap in memory and modify its byte-values and rebind it to a texture object as it changes. This is probably not such a good idea as it might be very slow. But you could keep multiple textures simultaneously (although absorbing texture memory).
What I recommend is:
2. Creating textures of the colours you want to transition to of the same shape as the engines, but just that one colour. Then alpha blend them onto the scene, gradually increasing the alpha value.
Hope this helps!
~~~
Cheers!
Brett Porter
PortaLib3D : A portable 3D game/demo libary for OpenGL
1. Keep the bitmap in memory and modify its byte-values and rebind it to a texture object as it changes. This is probably not such a good idea as it might be very slow. But you could keep multiple textures simultaneously (although absorbing texture memory).
What I recommend is:
2. Creating textures of the colours you want to transition to of the same shape as the engines, but just that one colour. Then alpha blend them onto the scene, gradually increasing the alpha value.
Hope this helps!
~~~
Cheers!
Brett Porter
PortaLib3D : A portable 3D game/demo libary for OpenGL
~~~Cheers!Brett PorterPortaLib3D : A portable 3D game/demo libary for OpenGLCommunity Service Announcement: Read How to ask questions the smart way before posting!
ok, i''ll search some alpha blending tutorials, I think nehe has got one ! thank you very much...
I use a grey scale image that has the color intensity for the color then use glColor to chose the color that the object should be and it works very nicely! You might want to try something like that, it''s fast and easy!
------------------------------Piggies, I need more piggies![pig][pig][pig][pig][pig][pig]------------------------------Do not invoke the wrath of the Irken elite. [flaming]
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement