quote:
Could please somebody else than Yann post some shots of his/her trees and plants? Just that I have something to compare / orientate myself to.... ;-)
What Yann does is simply beyond my capabilities!
Of course it is not. It's very simple, actually. The basic idea goes like this: you draw a 3D tree model, when the camera is very near. If you create that 3D model procedurally, or by some artist is pretty much irrelevant. It's just a mesh like any other object. The problem is, that if the camera is far away, you tend to have lots of those 3D trees in the view. And that brings us a face-count problem. The solution is a LOD algorithm.
Try this: aquire some 3D tree or plant model. Any will do, wether you use XFrog (they have a free trial version to d/l), you model it yourself, rip it from some game, or take some free model on the net (have a look at 3dcafe.com). Start by rendering it normally, like all other objects you have. Now, from a certain distance on (try out various settings), you don't render your tree to the screen, but to a texture (a simple RGBA texture is perfect). From now on, you can simply render this texture as billboard, unless the camera gets nearer again. In that case, trash the texture, and render the full 3D again. Repeat.
quote:
How about slowly squashing the tree until it collapses in to a billboard over distance. That way you would still have the perspective advantage over a greater distance. And of course cut away on the tree more generously as it moves away?
That's pretty much what I'm currently doing. The problems I have: first, it doesn't work too well, if the camera is still near enough to see the 3D structure of the tree, but far enough to trigger a first LOD level. ie, I need a different system for an intermediate LOD. Second, dynamic lighting should stay consistant with those billboards, ie. it shouldn't suddendly change as the LOD squashes the tree. The bumpmap kind of resolves that, but it's not perfect yet. Third, the whole thing takes quite a lot of texture memory.
quote:
Did I get that right, Yann?
You don't use a premade billboard, but render it in realtime?
Yes. That way, your are less likely to notice the switchover (actually, it is totally invisible), and keep persepctive, current orientation and lighting.
quote:
Yes I agree, that never occured to me -- rendering the 3D model (however it's generated) to a billboard on an individual basis and rendering that when it's far away. But it seems like a video-memory hog if you've got many of them,
Yes, that's true. You need a good LRU cache. But since I use that LOD only at far away distances, I can get away with 32², 64² or at most 128² textures.
quote:
not to mention the time it takes processing each tree,
It takes the same time as rendering it to the screen. Only once, at the switchover point, and you have the texture. Not really an issue.
quote:
and the fact that changing the camera's position means you'd have to re-render the trees close enough to be affected by that.
That would depend on your distance thresholds. The system is very efficient, if you use it at larger distances, so that the camera position doesn't affect too many trees, and the general error term stays very low. The system is not suited for very near trees, rebuilds are too frequent, and it takes huge amounts of texture memory (you'd need 512² maps or even more).
quote:
I suppose these problems can be alleviated by only using this method for not-very-far trees and using a generic billboard for further ones...
You could do that to cut the texture memory costs and state changes down, but it won't influence processing speed. At large distances, you'd pretty much never need a texture rebuild.
quote:
what is the lighting on the screenshots you showed?
The tree seems to shadow itself, yet there's nothing on the ground.
Quick'n'dirty radiosity (ie. I didn't want to wait for a full solution). The general shadow casting system was disabled, that's why there are no shadows on the ground. As I said, it was only a test to adjust various parameters.
quote:
These leafs seem to be a texture on a more or less detailled quad/sphere (or whatever)... how are they generated, so that they fit so perfectly?
That's the job of the artist. From a modelling point of view, those objects are often created with tools like Deep Paint or similar: the artist models the tree/plant, and then 'paints' the texture on it (in 3D). The result is a perfect-fit texture for the whole object. A similar technique is often also used for characters. But you need a skilled artist for that, it isn't easy.
quote:
No offence to Yann_L or anything, but could you guys kindlyt remove you lips from his anus?
Hmm, I think I should take those game shots down, actually. I mean it's nice if people like them. But if you can't have an unrelated discussion anymore, without having a link to our site popping up every two pages, then it gets a little annoying. Especially for the original poster. This is a discussion about trees and organic rendering, not a commercial presentation for our game. I would appreciate, if we could keep it like this. Thanks.
[edited by - Yann L on May 17, 2003 9:38:33 AM]