Page 1 of 1

grass blades mesh question

Posted: Sun Mar 04, 2012 11:41 pm
by stefbuet
Hey,

I need to render some grass blades for a project. The difficulty is that the camera is able to be all around the grass including on the top of it so using simple quads with alpha texturing is not adapted to the situation as paterns will be clearly visible. I've tried to rotate quads a little bit on Z/X axis to let some blades be visible from a vertical view but it's not really efficient.
I thought about geometry instancing but didn't implement it for now.

I'm looking for any information about ways to render nice grass blades for high camera view.

Thanks!

Re: grass blades mesh question

Posted: Mon Mar 05, 2012 3:36 pm
by hendu

Re: grass blades mesh question

Posted: Wed Mar 21, 2012 4:12 pm
by stefbuet
Thanks.
However I didn't say it but the amound of grass to render wasn't really high so no need for complex LOD system.
I decided to use a basic blade mesh, 9 vertices, and render it with geometry instancing with VBO for mesh data and transform matrices.

It runs pretty smoothly. I may add some flowers :p

Image

Re: grass blades mesh question

Posted: Thu Mar 22, 2012 6:48 am
by Virion
I used quads with alpha texture for my grass, looks pretty good too:
http://youtu.be/G80fToIoMrQ

Re: grass blades mesh question

Posted: Thu Mar 22, 2012 11:51 am
by stefbuet
Yeah but how does it render when viewing it from a vertical point of view like cam(0,1,0), target(0,0,0) ?
Because that was my main problem.

Re: grass blades mesh question

Posted: Thu Mar 22, 2012 2:06 pm
by Cube_
I like your solution :D
But aren't those blades a bit... large for being grass?

Re: grass blades mesh question

Posted: Fri Mar 23, 2012 3:41 am
by Virion
stefbuet wrote:Yeah but how does it render when viewing it from a vertical point of view like cam(0,1,0), target(0,0,0) ?
Because that was my main problem.
hmm yeah I think if view from vertical point you will still be able to see some of the planes (but not very obvious), although I have minimized that by viewing it from every angle and manually adjusting all the planes in Blender. But yeah this is the traditional method which requires no shader (in the video it is actually flat shading) so the speed is fast.

You can try stefbuet's method.