Rendering Trees

Started by
12 comments, last by Supernat02 20 years, 1 month ago
When it comes to rendering 4 verts/billboard vs 300 verts for a real low poly nice looking tree( which is VERY hard to generate but not impossible ), and say you're only rendering 10-20 trees in a scene... = 300*20 = 6000 verts = as if you're rendering one extra character..have an LOD switch for the trees..so distant trees = 10 verts..or billboards, etc and it's even better. It's just hard coming up with the nice looking trees @ 300 verts is all...But i've seen it done.

btw, those 4 verts will probably need one drawprimitive call each if they have different rotational matrices( billboards -am I correct in this assumption? haven't played too muchw ith billboards )..which is more inefficient than rendering 300 at a time..

-Marv

[edited by - Wicked Ewok on February 27, 2004 7:21:05 PM]
-=~''^''~=-.,_Wicked_,.-=~''^''~=-
Advertisement
you could use more than one world matrix (the D3DTS_WORLDn or whatever, something like that) to render 256 trees per drawprimitive. or use a dynamic vertex buffer and do the transformation yourself.
the way I see it, both methods are slow. Changing world matrices means, calling individual DrawPrimitives between each change...each billboard will probably have its own matrix = lots of unbatched DrawPrimitive calls which will stall your framerate.

Using dynamic VBs for billboards with locking unlocking isn't that great either..since you'll be transforming at the vertex level in software!

I still say it's just as good if you use LOD representations and real models. In the long run, it will run as fast as billboarding for the given reasons, but look ten times better.

-Marv

edit: all geometry = static vb = render in one DP with 1 texture/shader!!

[edited by - Wicked Ewok on February 27, 2004 10:01:29 PM]
-=~''^''~=-.,_Wicked_,.-=~''^''~=-
People usually use hybrid solutions for these situations. You initially load a detailed tree-mesh, and depending on the distance, you can do the following:
- Render the full-LOD mesh
- Render a low-detail mesh
- Use an imposter (Render to texture, and slam it on a Quad or Cube, and use that instead of the tree. Tom Forsyth has an article on that in one of the Graphics Gems, don''t recall which. Probably 3)

I think Yann L did use a similar system (where he switched to imposters for far trees), and then he used a normal-map to light the (far-away, impostered) trees so that they''d look natural (don''t remember what he did with the shadows, though)

Muhammad Haggag

This topic is closed to new replies.

Advertisement