Page 1 of 2

Create Grass

Posted: 14 Nov 2009, 02:23
by nassosy
Makes strands on a given surface that are curvy to look like grass blades.

EDIT: minor changes to allow independant Hue/Sat/Lum/Alpha color variance
added a shader preset for the grass, copy it to your "DSPresets/Shaders/Material" folder


Enjoy at your own risk

Re: Create Grass

Posted: 14 Nov 2009, 13:38
by wireframex
Hey Nassosy,

Here is a nice compound !!

I've just a little pb with the color of the grass :

Image

Thanks for your work

Phil

Re: Create Grass

Posted: 14 Nov 2009, 15:26
by nassosy
Make a shader
assign it to the point cloud
in the Render Tree/Material editor
add a "Color Attribute" node to you material
set it to "Color" or "StrandColor" and connect its
output to the diffuse input of your illumination shader (phong, blinn, contant, etc)

Unfortunately in 2010 SP1
the "StrandColor" (the color gradient) doesn't work for me,
it always returns the default color (white)
don't know why.
The "Color" ICE attribute works, but there won't be any gradient.

Re: Create Grass

Posted: 14 Nov 2009, 15:54
by wireframex
Wow I forgot to apply color directly to the point cloud ...

Gradient color works here and the strand too

Re: Create Grass

Posted: 14 Nov 2009, 15:59
by nassosy
Yes in 7.01 both attributes work,
2010 sp1 is another story :(

Re: Create Grass

Posted: 14 Nov 2009, 16:02
by wireframex
Have you a lot of pb with 2010 SP1 ?

Maybe I need to keep 7.01 and 2010 working together 8-|

Re: Create Grass

Posted: 14 Nov 2009, 16:34
by nassosy
Solved it by copying the "StrandColor" to a custom color ICE attribute and using that in the RenderTree

Re: Create Grass

Posted: 17 Nov 2009, 08:34
by Letterbox
Thank you nassosy

Re: Create Grass

Posted: 30 Nov 2009, 05:18
by fabricio.chamon
works like a charm!
great, thanks nassosy

Re: Create Grass

Posted: 03 Dec 2009, 13:53
by Squizmek
Very nice! Looks very promising!
I will download it and try it out next time I need grass.

Did anybody do a benchmark yet to compare strands with XSI Hair?
It would be interesting how each system performs in the viewport and at rendertime.

Re: Create Grass

Posted: 03 Dec 2009, 14:07
by nassosy
Thanks everyone,
the main reason i uploaded this compound is that
it works on curved surfaces (torus) as well as it does
on planar ones (grid).

from the the few render tests i did,
i would say that strands have a slight advantage

Re: Create Grass

Posted: 03 Dec 2009, 14:51
by Squizmek
nassosy wrote: from the the few render tests i did,
i would say that strands have a slight advantage
cool, thanks again for sharing.

Re: Create Grass

Posted: 08 Dec 2009, 14:41
by nassosy
I did some more tests here are the results on my 6GB Ram Core 2 Quad with 2010sp1 64bit:

(with Raytraced Shadows)
65000 hairs 0:03:53.24
146561 strands 0:00:24.99

(with 1024 Shadow Map, looks like crap though)
65000 hairs 0:00:49.73

(with 2048 Volumic Shadow Map)
65000 hairs 0:00:15.60
146561 strands 0:00:28.58

(with 4096 Volumic Shadow Map)
65000 hairs 0:00:19.08
146561 strands 0:00:39.03

Re: Create Grass

Posted: 16 Dec 2009, 19:50
by Squizmek
wow, looks like it's really fast for raytracing!

Re: Create Grass

Posted: 14 May 2010, 22:03
by Maximus
i have a problem here :D
i dont get why it renders some strands completely black, like they have some normals issue or lack of color attribute, i didnt do anything

i didnt do any customization stuff i just create a grid, create a pointcloud, then create -> ice tree and imported the compound.
plugged the get grid to surface input and render it.

any clue? i'm a grass fanboy and i'm loving this compound :D

further investigation took me to find out that this issue happens with mental ray sun and sky, when you create sky/sun seutp you get this issue. is there any way to have them work with sky/sun setup? or i'm doing something wrong.

deleted sun and it still doing it, now i got rid of the environment and the problem's gone. re-plugged environment and it renders some black strands, so its bound to environment..

Image

thanks!

Re: Create Grass

Posted: 15 May 2010, 01:21
by nassosy
That's weird i never had any problems with sun/sky setup
(using Pass->Edit->Initialize Sky Shader)
maybe its the way you create your sun/sky

care to share a scene file?