grass blades mesh question

Post your questions, suggestions and experiences regarding to Image manipulation, 3d modeling and level editing for the Irrlicht engine here.
Post Reply
stefbuet
Competition winner
Posts: 495
Joined: Sun Dec 09, 2007 4:13 pm
Location: france

grass blades mesh question

Post 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!
CuteAlien wrote:coders are well-known creatures of the night
stefbuet
Competition winner
Posts: 495
Joined: Sun Dec 09, 2007 4:13 pm
Location: france

Re: grass blades mesh question

Post 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
CuteAlien wrote:coders are well-known creatures of the night
Virion
Competition winner
Posts: 2148
Joined: Mon Dec 18, 2006 5:04 am

Re: grass blades mesh question

Post by Virion »

I used quads with alpha texture for my grass, looks pretty good too:
http://youtu.be/G80fToIoMrQ
stefbuet
Competition winner
Posts: 495
Joined: Sun Dec 09, 2007 4:13 pm
Location: france

Re: grass blades mesh question

Post 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.
CuteAlien wrote:coders are well-known creatures of the night
Cube_
Posts: 1010
Joined: Mon Oct 24, 2011 10:03 pm
Location: 0x45 61 72 74 68 2c 20 69 6e 20 74 68 65 20 73 6f 6c 20 73 79 73 74 65 6d

Re: grass blades mesh question

Post by Cube_ »

I like your solution :D
But aren't those blades a bit... large for being grass?
"this is not the bottleneck you are looking for"
Virion
Competition winner
Posts: 2148
Joined: Mon Dec 18, 2006 5:04 am

Re: grass blades mesh question

Post 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.
Post Reply