Jump to content

  • Log In with Google      Sign In   
  • Create Account

Transparency to make trees


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
4 replies to this topic

#1 dragon376   Members   -  Reputation: 140

Like
Likes
Like

Posted 11 August 2001 - 11:50 AM

I have a small problem of transparancy... My tree is not alwars transparent. look at this picture (http://www.kuenzle-family.ch/philippe/gl/transproblem.jpg). You can see that an area around the tree over the water. If anyone has a idea what I am doing wrong let me know... (philippe@insync.net) Thanks

Sponsor:

#2 Lucien   Members   -  Reputation: 122

Like
Likes
Like

Posted 11 August 2001 - 12:00 PM

Hey Philippe, what''s new?
I mailed you 2 months ago, I''m still waiting for an answer....

Well, I wanna try to help you, which kind of problem is it exactly?
I solve a problem about transparency some months ago.

Bye

#3 Anonymous Poster_Anonymous Poster_*   Guests   -  Reputation:

Likes

Posted 11 August 2001 - 07:00 PM

this is what i did when i wanted transparency, may not be the best way but i''ll post it anyway.

glEnable(GL_BLEND);
glEnable(GL_DEPTH_TEST);

Depending upon where the code is placed blending may have to be disabled, so order matters when you use those.

#4 wolfman8k   Members   -  Reputation: 140

Like
Likes
Like

Posted 11 August 2001 - 09:49 PM

Just render the trees after you render the water.

#5 zedzeek   Members   -  Reputation: 528

Like
Likes
Like

Posted 12 August 2001 - 10:10 AM

the problem is u have disabled depth writes when u drew the water.
well u can sort the polygons (under water frist , then water , then above water) or else in this case dont use blending for the trees use the alpha test.
glEnable( GL_ALPHA_TEST)
glAlphaTEst( GL_NOTEQUAL,0);
glDisable( GL_BLEND)
draw trees




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