Jump to content

  • Log In with Google      Sign In   
  • Create Account

blending not quite working ...


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
3 replies to this topic

#1 burnseh   Members   -  Reputation: 122

Like
Likes
Like

Posted 08 November 2001 - 11:53 AM

hello, I''m having some trouble with blending. Transparent objects don''t show up quite right when theres an opaque object behind it. Best way to describe this is to show you.. heres an exe i uploaded: http://www.postmodernist.com/richard/SolarSystem001.rar Currently, the objects are drawn in the following order: 1. the earth (opaque) 2. earth''s clouds (alpha = 0.7) 3. earth''s atmosphere (alpha = 0.5) 4. earth''s moon (opaque) 5. the sun thanks for any help, rich

Sponsor:

#2 mkaltner   Members   -  Reputation: 122

Like
Likes
Like

Posted 08 November 2001 - 12:00 PM

From what I've done with this subject, is that when doing blending of different 3D objects, you need to disable the depth mask when drawing the blended object.

Something like:

// draw non-blended objects here

glEnable(GL_BLEND);
glDepthMask(GL_FALSE);

glBlendFunc(GL_SRC_ALPHA, GL_ONE);

// draw blended object here

glDepthMask(GL_TRUE);
glDisable(GL_BLEND);

Play around with that and see if you can get what you want.

- Mike

P.S. I didn't download the program (rar format is not popular, use zip) so this may not be correct.

EDIT: typo

Edited by - mkaltner on November 8, 2001 7:01:30 PM

#3 burnseh   Members   -  Reputation: 122

Like
Likes
Like

Posted 08 November 2001 - 12:20 PM

thanks for the reply

I tried the depthmask true/false and it works. I was using it already but in the wrong way.

much appreciated


btw, uploaded as .zip, use down arrow to move back a bit so you can see the sun


#4 burnseh   Members   -  Reputation: 122

Like
Likes
Like

Posted 08 November 2001 - 12:26 PM

and the fixed exe ... (textures are in zip)

http://www.postmodernist.com/richard/SolarSystem.exe




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS