Trees+billboards+crossfading+imposors = lots of trouble

Started by
16 comments, last by VanKurt 20 years, 6 months ago
AP is right in a way, and wrong in a way.

If you only have 1 tree in a scene to worry about, AP''s approach will work since there are no other conflicting translucency issues.

If you disable depth writing for multiple trees, you will still have visual artefacts when you move around the other side of 2 trees ... Since depth information (if you disable depth writing) is not written and if you draw in a particular order, one tree will always be on top of the other tree (no matter which direction you are facing them from) since the second drawn tree will always be drawn on top of the first drawn tree. This is all very well and good if you can guarantee that you''re only going to view it from a particular direction, but it will look kinda funny to have a tree in the distance being drawn over one in the foreground. Hence, the need for depth sorting.

On a per-individual tree basis go for AP''s approach: render the tree (depth-testing & (depth-writing or none)), render the billboard (no depth-testing and no depth-writing). But lots of individual trees will have to be depth-sorted - unfortunate, but true.
do unto others... and then run like hell.
Advertisement
AP is also right if the billboarded tree fits snugly on top of the rendered tree, since the pieces that aren''t written to the depth buffer will be overwritten by the pieces that do get written to the depth buffer. But this also means that any mismatch between the billboard and the model will show as depth artifacts when viewed from the wrong direction.

There might be another way though. It''s the same method used by the SpeedTree lib I mentioned above. They do not blend the billboard into the tree, they alphatest it. When the tree is about to change LOD, they vary the alpha test value. If the tree goes from model to billboard, the alpha test starts at 1.0f (showing almost no billboard) to 0.5 or so (showing the entire billboard) as you move further away.
quote:
That looks amazing! But 6000€??? Huh!

Yes, it''s a lot. We are going to try to negotiate a more limited license for less money. The SpeedTreeRT SDK comes with a huge amount of stuff we do not need at all, such as special CAD programs, plugings, lots and lots of models, etcetera. We also do not need the source, just the .lib and the .h.


Sander Maréchal
[Lone Wolves Game Development][RoboBlast][Articles][GD Emporium][Webdesign][E-mail]

<hr />
Sander Marechal<small>[Lone Wolves][Hearts for GNOME][E-mail][Forum FAQ]</small>

Here are some shots of the current version of my tree system:
(still a lot to do!! ;-) )









Looks fantastic man, awesome water also.
Wow, that looks better than some commercial games I''ve seen! Would you mind sharing how you did your terrain texturing and water?
____________________________________________________________AAAAA: American Association Against Adobe AcrobatYou know you hate PDFs...
Hey, thanks!

Terrain:
Big color-texture, three layers of detailtextures at different resolutions on a 16bit heightfield.

Water:
Scene rendered to texture then applied to the water plane. Added animated dot3 bumpmaps to do bumpmapping and tex-coord-distortion.

Nothing extremely special... ;-D Check out my Website for more pics and details... (www.ecoengine.tk)

PS: I had a thread going on here not long ago about my water...
WOW looks really nice.

How did you get the animated bumpmaps? Did you use precreated ones or do you generate them on the fly? Did you use shaders?


[ My Site ]
''I wish life was not so short,'' he thought. ''Languages take such a time, and so do all the things one wants to know about.'' - J.R.R Tolkien
/*ilici*/
Yep. I use shaders (CG).

animating the bumpmap was really tricky at first... ;-)

I tried to create an animation of e.g. 30 frames (=30 maps) and cycle through them...but that looked like SHXX.

Then I found out that the solution is really simple: Create two or three different maps. Scroll them in different directions. Use a shader to merge these maps into a single one. Use that map for whatever you like.

It''s simple, fast and looks good!

This topic is closed to new replies.

Advertisement