Sign in to follow this  

how to render Palms like in farcry ?

This topic is 4215 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

Hi all, i wonder what is the technique that you use for palm rendering (billboards for palms and mesh for trunk) when i see screenshot from farcry , i think that it is a lot of tweak to adjust the billboard quads... thanx.

Share this post


Link to post
Share on other sites
hi;

at a far distance, the palms/trees in FarCry are rendered via imposotor's (a special kind of billboards); if the player moves closer to a an ojbect, then, several stages of a LODmesh are used.

Share this post


Link to post
Share on other sites
the best thing would be to use 360 billboards I presume. Just render your mesh from different directions, and depending on the view angle you can blend 2 different billboards (billboard atlas would seem like the best solution here); Like this you don't have to recreate your imposters that much, and can use the same imposter for all the same foliage/trees.

Regards,
Kenzo

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Quote:

the best thing would be to use 360 billboards I presume


That not a fantastic idea. Its uses too much video memory because your texture would have to be huge. The most common is to have rotations of about 30 degrees. Since the billboards are further away, the larger step size isnt really noticable.

Share this post


Link to post
Share on other sites
Even 30 degree interval billboards are a waste of memory. That's the point of imposters, a tree is rendered to a texture from the correct angle and that texture is used on a quad for distant objects. When the camera perspective changes enough, it can be re-rendered, or when the camera gets close enough the actual mesh can be rendered. It's not limited to intervals and doesn't waste memory.

Share this post


Link to post
Share on other sites
Frankly I think for trees such imposter techniques are wasteful. Better to have just several sprites images that can be used regardless of angle.

Speedtree for instance doesnt do imposters, it just uses some generic sprites.

Think about it-- if you have 100 trees visible that's 100 render targets, yuck.
Anyway, that means you wouyld need to re-rendede the imposter when the camera moves, if you dont, what's the point anyway? I dont think Farcry works this way, and SpeedTree certainly doesnt.

Share this post


Link to post
Share on other sites
Quote:
Original post by Matt Aufderheide
Frankly I think for trees such imposter techniques are wasteful. Better to have just several sprites images that can be used regardless of angle.

Speedtree for instance doesnt do imposters, it just uses some generic sprites.


Hmmm....have you actually run the SpeedTree Valley demo? It does NOT use generic sprites. It does render each tree to an imposter texture. That's the whole point of Speedtree's tree system.

Share this post


Link to post
Share on other sites
Quote:
Original post by Matt Aufderheide
Think about it-- if you have 100 trees visible that's 100 render targets, yuck.


Think about it again, because that's most certainly what Speedtree does, and if you switch Speedtree to wireframe, you can actually see that it's using impostors. The trees are instanced, there are only a couple of different tree models. Many trees will share the same impostor; since each impostor is very small on screen, they can efficiently be stored in a single "pack" texture, or even pre-computed for different camera view angles.

Y.

Share this post


Link to post
Share on other sites
Quote:
Original post by Ysaneya
Quote:
Original post by Matt Aufderheide
Think about it-- if you have 100 trees visible that's 100 render targets, yuck.


Think about it again, because that's most certainly what Speedtree does, and if you switch Speedtree to wireframe, you can actually see that it's using impostors. The trees are instanced, there are only a couple of different tree models. Many trees will share the same impostor; since each impostor is very small on screen, they can efficiently be stored in a single "pack" texture, or even pre-computed for different camera view angles.

Y.


That's pretty much how my system works. I have several 2048x2048 textures that pack in around 256 imposters in each one, since I use a 128x128 portion for each imposter. I also have an array that stores information for each texture cell in the 2048x2048 image, such as angle and distance.

Share this post


Link to post
Share on other sites
I've been looking at the trees in SpeedTree demos and Oblivion, they both seem to have just a stock of common sprite images.

Open one of the speed tree textures, you will see them. I dont know, maybe it has this capability, but I dont think Oblivion uses it. Because most trees all seem to use one or two sprites per tree type. Open a speed tree demo level, fly the camera up high above the forest, you can see when the transition happens, the trees are just using a basic sprites, not a special imposter render.

IN any case, why would using this imposter system be needed? In most cases the transition wont happen until the trees are reasonably far away, and your sprite just has to be a general render form a decent angle, and is usually not noticeable.

I'm not sure how instancing relates to imposters... imposters are still going to be seperate renderings for each tree depending on position and angle, etc. Walk around in Oblivion, you can see that each tree type has just one sprite image attached to it.

Share this post


Link to post
Share on other sites
What do you mean by, "one sprite image attached to it"? Oblivion uses Speedtree for its tree rendering. If you go into the developer's mode, you'll see that in fact the imposters are updated based on changing camera angle.

The reason the imposter system is needed is because no computer can render more than a few thousand trees consisting of 3,000-8,000 polygons at a reasonable speed whatsoever. Even a batch of 200 trees would cause a problem.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Quote:

Even 30 degree interval billboards are a waste of memory.


Your right, what I mean to say is update the imposter in 30 degree intervals.

Quote:

I've been looking at the trees in SpeedTree demos and Oblivion, they both seem to have just a stock of common sprite images.


Speedtree and oblivion use a single generic texture for far away trees. It is not updated on the fly for the rotation, and is simply blended into a group of billboards at closer distances. I run oblivion on low settings and they definately do not render the trees as imposters (in the true sense). Set the tree distance close and run around the tree, nothing will update at any angle. Maybe on high settings it does render imposters, who knows because I cant run it on those settings.

Share this post


Link to post
Share on other sites
Quote:
Original post by Anonymous Poster
Quote:

Even 30 degree interval billboards are a waste of memory.


Your right, what I mean to say is update the imposter in 30 degree intervals.

Quote:

I've been looking at the trees in SpeedTree demos and Oblivion, they both seem to have just a stock of common sprite images.


Speedtree and oblivion use a single generic texture for far away trees. It is not updated on the fly for the rotation, and is simply blended into a group of billboards at closer distances. I run oblivion on low settings and they definately do not render the trees as imposters (in the true sense). Set the tree distance close and run around the tree, nothing will update at any angle. Maybe on high settings it does render imposters, who knows because I cant run it on those settings.


@AP - Oblivion USES SpeedTree. soconne is correct, if you go to the developer mode you can see it happening.

Share this post


Link to post
Share on other sites
hmm .. yes Oblivion uses SpeedTree and so am I. The problem is that the generated billboard and 360 billboards don't look good. You can see the transition from a real rendered tree to the pregenerated billboard very good in our game. That's because of the lighting conditions. When the billboards are generated, they don't have the same lighting settings as we have in the game. For the SpeedTree demo's they especially generated the billboard to look good for their scene, but they don't have any dynamic lighting or rotation on the trees. And the billboards in Oblivion are plain ugly!

Most of the time you only render at max 6 different trees models. Every model has a few variations, and per instance parameters to make them more unique, such as a little bit of color, size and perhaps rotation (you can than geometry instance the trees of the same variation). So you would only need to generate 6 imposters every few frames and share them between all your trees which have the same base model. Like this the imposters take the correct shading from the game and would look much more realistic. The problem is that all the trees share the same imposter and the angle between a tree on the left of the screen and on the right, can be more than 30 degrees so it would be visible that they are not using a correct BB. The solution to this is generate a single 360 BB for every tree model. Is uses a bit more video memory, but we're talking about billboards so they don't have to be to big. 128 x 128 might already be enough. If we render upto 6 billboard for the 360 billboards, we would be "wasting" 1,7 MB of video memory. For billboards of 256 x 256 this would be: 6,75 MB. These are still acceptable, and you don't have to update this imposters a lot. Only when the lighting changes, but you don't have to care about viewing angles anymore.

At least this seems the best solution to me,

Regards,
Kenzo

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Quote:

Oblivion USES SpeedTree. soconne is correct, if you go to the developer mode you can see it happening.


I know it uses speedtree, why do you think people are making the comparison between the two? I can tell you one of the first things i did in oblivion was run around the tree in a circle to see how the imposters changed (my tree distance was set close, and my settings on low). I can tell you for a fact that the tree billboard never changed as I ran around it. It simply rotated with the camera with no changes. Your just gonna have to live with knowing that on low settings, speedtree/oblivion doesnt use imposters. Maybe youve never ran these on low settings before?

Im sure that on higher settings they would use imposters, since they have GPU to spare. So If your didnt catch it.. here it is again: Your both right - depending on what quality settings you use.

I would venture to say use non-imposter representations if possible. It will be obviously faster and gamers probably wont even notice if you blend between stages properly. You will also avoid the: "this game runs like a slideshow" because you do something that is barely noticable to the user and it will be easier to impliment. Also note, that this might be harder to do with palm trees, because they are often bent in a certain direction, while other trees are more symmetric and dont necessarily need the imposter approach, imo.

Share this post


Link to post
Share on other sites
You gotta hand it to the guys at Crytek. They really did take the rendering of foliage to the next level. The only problem I really had with their vegetation is that it's too "clean" all the time :)

In any case, it's too bad that there isn't any access to their ideas. Something like a behind the scenes or something.

Of course, by the time we reach their level of work, they'll be far ahead hehe. They already made huge progress in realism with Crysis.

Share this post


Link to post
Share on other sites
Quote:
Original post by voguemaster
You gotta hand it to the guys at Crytek. They really did take the rendering of foliage to the next level. The only problem I really had with their vegetation is that it's too "clean" all the time :)

In any case, it's too bad that there isn't any access to their ideas. Something like a behind the scenes or something.

Of course, by the time we reach their level of work, they'll be far ahead hehe. They already made huge progress in realism with Crysis.


Actually this Gamasutra article explains the method perfectly.
http://www.gamasutra.com/features/20060105/davis_01.shtml

Share this post


Link to post
Share on other sites
Quote:
Original post by Anonymous Poster
Quote:

Even 30 degree interval billboards are a waste of memory.


Your right, what I mean to say is update the imposter in 30 degree intervals.

Quote:

I've been looking at the trees in SpeedTree demos and Oblivion, they both seem to have just a stock of common sprite images.


Speedtree and oblivion use a single generic texture for far away trees. It is not updated on the fly for the rotation, and is simply blended into a group of billboards at closer distances. I run oblivion on low settings and they definately do not render the trees as imposters (in the true sense). Set the tree distance close and run around the tree, nothing will update at any angle. Maybe on high settings it does render imposters, who knows because I cant run it on those settings.


Yes this is what I've been saying. I dont care about developers mode and whatever, Oblivon DOESNT render imposters, it just fades to a generic sprite for each tree type.

Try it. load Oblivion up and turn tree fade on lowest setting. You can see the sprite is the same for each tree type, and is never updated or changed.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Quote:
Original post by Matt Aufderheide
Quote:
Original post by Anonymous Poster
Quote:

Even 30 degree interval billboards are a waste of memory.


Your right, what I mean to say is update the imposter in 30 degree intervals.

Quote:

I've been looking at the trees in SpeedTree demos and Oblivion, they both seem to have just a stock of common sprite images.


Speedtree and oblivion use a single generic texture for far away trees. It is not updated on the fly for the rotation, and is simply blended into a group of billboards at closer distances. I run oblivion on low settings and they definately do not render the trees as imposters (in the true sense). Set the tree distance close and run around the tree, nothing will update at any angle. Maybe on high settings it does render imposters, who knows because I cant run it on those settings.


Yes this is what I've been saying. I dont care about developers mode and whatever, Oblivon DOESNT render imposters, it just fades to a generic sprite for each tree type.

Try it. load Oblivion up and turn tree fade on lowest setting. You can see the sprite is the same for each tree type, and is never updated or changed.


Well of COURSE it may not render actualy imposters on the LOWEST SETTING!!! Put it on normal or high and it will.

Share this post


Link to post
Share on other sites
I really doubt it uses dynamic impostors due to the inherent limitations of the technique (looks really wrong from other angles, lots of uncompressed textures for the trees, since you cant render to a compressed texture ). From the speedtree site:
"Trees are rendered at the appropriate LOD (wind behavior included) based on distance from the viewpoint and per-tree-configurable near and far LOD planes. If desired, transitions between discreet LOD levels are cleverly masked to prevent the “popping” sometimes associated with LOD solutions. The figure on the right depicts an example tree’s behavior in the SpeedTreeRT LOD system."

And a pic:
http://www.speedtree.com/images/LODs.jpg

and:
"SpeedTreeRT offers several critical advantages over traditional three dimensional tree rendering techniques (i.e., static meshes). First among these is automatic levels of detail (LOD) generation. A user configurable number of discreet LODs are computed based on the modeled tree. Transitions between these LODs are smoothed at run-time, allowing scenes to be populated with numerous trees without sacrificing performance or wasting time manually modeling each LOD."

They dont even mention dynamic impostors anywhere as far as I can see, and its not like its a secret technique, so my conclusion is that they dont use them ;)

Besides, rendering low poly trunks with well placed billboards is probably way faster than dealing with dynamic impostors.

Share this post


Link to post
Share on other sites
Exactly right, just what I've been saying.

The fact is the settings in Oblivion just change the fade distances, not the quality of the rendering..in any case Ive done the tests on maximum settings too, and are still the same tree sprites are always used.

Niether Oblivion nor the Speed tree demos use dynamic imposters. As i said before, such techniques are just a waste of texture memory for large numbers of things like trees.

Imageine if you have 1000 trees on screen at once. You want to dynamically render a unique sprite imposter for each one? Even considering that you could pack multiple renders into a single texture, there is going to be a limit, and you will run into it pretty quick, regardless of what tricks you use.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Ok we've obviously covered the fact that oblivion and speedtree does not use dynamic imposters. Now back to assisting the OP: does farcry use fully dynamic imposters, static 2d representations, or another technique?


I have not played with the engine enough to officially comment/rememeber. I would assume that they had a few rotations of the palms that are used as billboards when they render (since it is just all palm trees). I dont think you can get away with the oblivion technique (single 2d representation) because of how the palm tree trunks bend horizontally. I could be wrong though.

Quote:

billboards for palms and mesh for trunk


That would make a lot of sense, although it seems at the large distances you would still want to compress the trunk into a billboard somehow. I think there was a long winded argument of this exact idea/technique on this forum - pertaining directly to farcry. I will try to find the post for you. In the meantime, any comments of how farcry officialy does thier LOD scheme for thier palm trees.

Share this post


Link to post
Share on other sites
I have worked with speedtree in the past and it did not use dynamic imposters as standard
BUT , WE DID make our own dynamic imposters using speedtree- it was very easy
to do.

There are also BIG wins in rendering imposters

1. Your get free animation for free, even if you update your imposters
every other frame you get decent movement from leaves.

2. We rendered normal maps for our imposters - that way you can get perpixel lighting on the trees.

Share this post


Link to post
Share on other sites
I'm pretty sure FarCry doesnt do dynamic imposters either. The near LOD for palsm trees are all just meshes, no billboards involved. The leaves are simple alpha masked textures on geometry. Just make a flat plane with some segments, bend it around to make the shape and texture it. The far LODs in farcy are either simplfied models or billboards.

Why would you need per pixel lighting for distant tree sprites? Seems like a waste of fillrate for not much gain in quality. Either way, I never said you CANT do imposters--I'm just not convinced that they are really practical for large amounts of trees (on current hardware).

Share this post


Link to post
Share on other sites
Sign in to follow this