quote:
Thanks for the link to the paper, I will download and read. Tho the screens on that page don't look nearly as good as yours do.
Well, the paper doesn't really address the issue of rendering. They focus more on the animation of the individual grass blades and on the LOD system.
The parts I took from the paper is their LOD idea (slightly adapted): 3D blades in the near field, 2.5D further away and 2D far away from the camera. The LOD scheme is an important part, esp. on huge grass fields. Since the whole grass field is procedurally defined, you can easily get several hundred billions of blades. No 3D card can handle that
I also used parts of their animation idea. I liked their way to represent 'wind primitves'. That way, you can easily have a procedural weather system, that creates different controlled wind effects (from simple direction wind blows, to vortex/tornado like movement). However, I replaced the wind evaluation equations with a 2D fluid dynamic system (a 2D Navier Stokes solver). That way, the movement of the grass is physically more or less accurate.
About the rendering itself, it's actually not very complicated. Basically pixelshader magic Good colours and alpha antialising to render the individual blades. Shadows onto the grass are done via projective shadowmapping. The 2.5D and 2D representations are bumpmapped using an animated normalmap. From a distance it looks like 3D blades, at only a fraction of the cost of a real 3D blade.
The only real performance bottleneck are the true 3D blades near the camera. But the geometry is fully in VRAM, and all deformation is done on the GPU using vertex shaders. That way, you can render quite a bunch of blades on a GF4. It also automatically adapts to framerate: if the fps drops below a certain limit, it will reduce the number of 3D blades and replace them with faked bumpmapped 2.5D representations.
Teknofreek: yep, that's realtime (45fps on a GF4-Ti4600, Athlon XP 2100. It could faster, if I wasn't so lazy to optimize it a bit more ) About the viewer: hmm, game company, hmm, NDA, hmm, lawyers, hmm, nope, sorry. But we will have a public playable demo of our game for around november, it will have the grass and a lot more nice stuff (note the shameless plug )
/ Yann
[edited by - Yann L on August 18, 2002 10:33:29 PM]