Skip to main content
GameDev.net gamedev.net
🔒 Locked

how to render Palms like in farcry ?

Started by nini May 30, 2006 at 8:11 AM 51 replies 10.5k views
Original Post
nini
nini
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.
Matt Aufderheide
Matt Aufderheide
the palms trees in FarCry dont use billboards. They just use a mesh.. with alpha masked leaves.
Alex Baker
Alex Baker
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.
Alex Baker Computer science is dealing with computers as much as astronomy is dealing with telescopes.
Guoshima
Guoshima
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
DrEvil
DrEvil
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.
Matt Aufderheide
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.

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.
soconne
soconne
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.
Author Freeworld3Dhttp://www.freeworld3d.org
Ysaneya
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.
soconne
soconne
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.
Author Freeworld3Dhttp://www.freeworld3d.org
Matt Aufderheide
Matt Aufderheide
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.
soconne
soconne
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.
Author Freeworld3Dhttp://www.freeworld3d.org
CrazyCdn
CrazyCdn
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.
"Those who would give up essential liberty to purchase a little temporary safety deserve neither liberty nor safety." --Benjamin Franklin
Guoshima
Guoshima
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
voguemaster
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.
-----------------------------He moves in space with minimum waste and maximum joyGalactic Conflict demo reel -http://www.youtube.com/watch?v=hh8z5jdpfXY
soconne
soconne
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
Author Freeworld3Dhttp://www.freeworld3d.org
Matt Aufderheide
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.
_swx_
_swx_
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.
Matt Aufderheide
Matt Aufderheide
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.
mikiex
mikiex
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.

Matt Aufderheide
Matt Aufderheide
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).

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.