Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

nickvbs

Tree..

This topic is 5855 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Im trying to make trees in my level and I am using aphla blending. I have two 2d trees perpendicular with each other forming an X. When the first one gets rendered the blending discludes the other because the other tree hasnt been rendered to the scene yet.I think..lol. So anyhow if the camera is looking at the tree(both of em) at a cetain angle it looks really messed up..like part of the tree gets cut out by the the backround. I dont know maybe Im taking jiber jaber..could someone help. thanx in advanced... Oh yeah..I just like to say that I have a 3rd person camera in the game so billboarding looks like crap when I use it for trees. Games are fun [edited by - nickvbs on September 13, 2002 10:16:38 PM]

Share this post


Link to post
Share on other sites
Advertisement
In this case you have to split one of the quads into two and check the position of the camera according to the other quad and then sort the rendering accordingly. Some sort of a BSP mesh I mean.

My site

Share this post


Link to post
Share on other sites
quote:
Original post by nickvbs
Im trying to make trees in my level and I am using aphla blending. I have two 2d trees perpendicular with each other forming an X. When the first one gets rendered the blending discludes the other because the other tree hasnt been rendered to the scene yet.I think..lol. So anyhow if the camera is looking at the tree(both of em) at a cetain angle it looks really messed up..like part of the tree gets cut out by the the backround. I dont know maybe Im taking jiber jaber..could someone help. thanx in advanced...



I think you should cut the images in half vertically and build the tree out of 4 rectangles, joined at the tree stem. Then when drawing your scene store anything with alpha in a to-do buffer while you draw the nonalpha''s, and draw them after the rest, in a back-to-front order.

Share this post


Link to post
Share on other sites
thanks fantasy guy..worked out pretty good. I determined which quad to render first depending on where the camera was located. But now....I made a tree class and when ever theres another full tree maybe a few feet away it does the same thing because one full tree was rendered before the other one...!! Getting kinda mad now....what should I do, any suggestions? Anyone have a better way of making these types of trees?

Share this post


Link to post
Share on other sites
Do the same but with ALL trees at the same time. Find all the face you have to render to display trees, sort them, then render.

Usually, unless you really don''t care about occasional glitches, you have to sort all partial transparent faces in order to render them.

______________________________
Oooh, you found the horadric cube!

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!