Skip to main content
gamedev.net
🔒 Locked

Strange Cloud-texture behavior

Started by VanKurt 1 reply 700+ views
Original Post
VanKurt
VanKurt
Hi ya! Today I''ve brought along another strange problem ;-) !!!! Currently I''m trying to implant some kind of clouds into my Engine. Everything works fine, except the fact that there is some strange problem with the textures. I use 32 Bit TGAs (With A-Channel) and blend them by using glBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA ). As you can see in the image below, this works with some test-pics made in Photoshop (The two on the bottom), whereby the BW-Image is the Alpha-chanel and the colorful one the final (rendered) result. The smooth transistion between Clouds (GREEN) and Backround (BLUE) looks quite well. BUT!!! When I use prerendered clouds (Made with 3dsMax4), the result is UGLY (Two pics on top). Although the Alpha-channel looks as smooth as the one made with PhotoShop, the resulting image has NO smooth transistion (See image). Do you have ANY kind o'' idea what this is about???? Your help is needed.............. thanks ;-) !!! The Image: http://vankurt0.tripod.com/Global4.jpg
Cirian
Cirian
Use 24 bit textures and use GL_SRC_COLOR and GL_ONE_MINUS_SRC_COLOR -- it''s perfect for the clouds.
Sander
Sander
I can think of 2 reasons why this happens:

1) You accidentally left an alpha test on which causes OGL to drop all pixels with too low an alpha.

2) The Clouds rendered by 3Dsmax look like they were created with perlin noise with an exponential function passed over it to reduce the noise field to a buch of clouds. It may be this function causing a sudden drop in alpha (hence the line). Play a bit with the settings in 3Dsmax or build your own cloud generator (see the *excellent* thread in the graphics programming forum on sky/cloud generation).

[edit]typooooooo......

Sander Maréchal
[Lone Wolves Production][Articles][E-mail]

[edited by - smarechal on June 19, 2002 6:26:43 AM]

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.