Grass and what to do

Started by
22 comments, last by CC Ricers 11 years, 2 months ago
If you tiled it in the world and rendered it, the camera rays would look something like below, but your triangle-count would be huge:

nF50c.png

So instead, in this technique you just pick the direction that the camera is looking in (or some other arbitrary choice of direction that looks good), and render a single "tile" of grass to a texture, using an orthographic projection in that direction.

Do you have to render a new "tile" for each angle of sloped terrain, since the camera is looking at the grass at a different angle?

Advertisement
Do you have to render a new "tile" for each angle of sloped terrain, since the camera is looking at the grass at a different angle?

We didn't, as our terrain was entirely flat wink.png

You could though. You could also render a different tile for 'distant' grass vs 'close' grass, as the angle would be different as shown by the picture you quoted.

[quote name='riuthamus' timestamp='1358563079' post='5023078']
We do not need anything epic, in fact i dont mind going with a 5/6 polygon model of planes that are slightly bent. Like i said my goal is to make something like firefall. The major question is how to put a shadow under them ( doesnt need to reflect the texture just an ambient blur ) and how to render light on them. And if there are methods to render it better that would help as well. Your engine looks impressive.

[/quote]

Then you just need to make a decision based on what features you are going to implement beside grass. Is there enough space that mid-level system can go with more geometry than add some and if not then go with textured planes and apply some sin and cos functions in the shader to get them waving. When it comes to shadows I did not put enough research into it to say if there is a simple or better method as rendering it with your shadowmaps. And for lighting just use double-sided lighting.

You should reduce polygon count for the shadow mapping of the grass. Especially if you're using cascaded shadow mapping, you would want to avoid repetition of drawing hundreds of thousands of polygons for the scene at each pass. For the depth maps used by shadows, in place of the tufts of grass, use larger quads that would be placed in front of where the grass would usually be. These quads would always be in the front from the light's perspective. This would create full shadows below and behind the grass. Not accurate to the real thing, but convincing enough to still see a rough shadow shape where the grass is.

New game in progress: Project SeedWorld

My development blog: Electronic Meteor

This topic is closed to new replies.

Advertisement