Sign in to follow this  
of_ownage

nice grass, but how?

Recommended Posts

hi, i want some grass in my game, well not oblivion grass but some ok looking gras^^ so i looked around a lot and checked the GPU gems and the advanced shader effect books, the problem is either im too silly to implement the effects described there or the code is just too bad. For example i found in GPU gems1: Rendering countless blades of waving grass i thought this is perfect, but the code is really messy and the example on the cd is just a program which does not even work :S I know you may say know, rendering grass is np just map the texture onto a quad and use Billboarding. But for example this looks so gay if the gras is near to you and the rotates with you^^ Does anybody have a good article about gras rendering, best would be directx and no old asm shader ^^ thx

Share this post


Link to post
Share on other sites
I'm not sure what you're fishing for, but just implement textured quads grouped into pairs forming X shapes and scatter them across your terrain. Apply vertex distortion like in the ShaderX article, and you're good to go. If you look closely, you'll see that Oblivion does something similar

Share this post


Link to post
Share on other sites
Why don't you try some stuff yourself.

You simply draw sprites or small triangles across a surface. Start with a simple quad, and pick random positions on this surface. Deform the surface and look at the grass and finally, optimize/improve.

Try diffrent types of distributions to figure out what looks good. use instancing since you are doing a repetative task, with minor changes. Depending of with camera/view information is available, avoid drawing any grass which doesn't add to the experience.

drawing less grass close to the camera makes it look like your in the grass, drawing less grass far from the camera makes it look like your moving through the grass, experiment!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this