Long grass with mixed shader

Started by bigben, March 26, 2007, 10:04:07 pm

Previous topic - Next topic


March 26, 2007, 10:04:07 pm Last Edit: March 27, 2007, 07:14:13 pm by bigben
Hi All.

I've added this to the Ashunder collection as well but I thought I'd post a copy here as well.

After messing around with complex leaf surfaces for trees (which are working nicely) I aplied the same surfaces to leaves.  It looked good as well, but the render times were ridiculous (10-15 minutes per clump) so I went back to my basic grass surface.

What I've added this time is a duplicate surface with a different colour, comined with a mixer. This allows for blending colours via a mask at a leaf level rather than just changing the colour for the entire population. Thus with one population (for example) you could have the proportion of dead grass blades in each object increase towards the edge of a flow map... or animating a transition of colour by changing individual leaves in conjunction with  the overall colour of the object.

I made a basic 10 frame animation to demonstrate this (2 fps)
http://www.path.unimelb.edu.au/~bernardk/tgdemo/mix_grass.avi (102kb)
<edit> redone with 3ivx codec. Here's a collage of the frames for anyone else with codec issues</edit>


The mixer function was a white surface layer with a fractal breakup.
First frame: Coverage = 0, fractal breakup = 2
Last frame: Coverage = 1, fractal breakup = 0

This approach should also be useful for my tree leaf surfaces, and provides a simpler means of mixing the colours with the flexibility of whatever masks you use.

Once again.... please send me any improvements if you make any.

Enjoy  :)


I cannot play the animation file....I used 3 different players

GOM player
VLC media player
Windows Media Player

None of them work
"His blood-terragen level is 99.99%...he is definitely drunk on Terragen!"


I only tried WMP, but it didn't work.
So this is Disney World.  Can we live here?


I tried QuickTime with the .avi and flip4mac plugins, and no joy here :(.
http://www.terragen.org - A great Terragen resource with models, contests, galleries, and forums.


 :) The video works great on Real Player. :) 
Nice way to show the variation Ben. :)


Worked great here. I recommend the Combined Community Codec Pack and/or The KMPlayer, which I now use exclusively along with Quicktime Alternative and Real Alternative.

- Oshyan


OK, I've redone it with a different codec.  I had mixed results with this even on my computers which was a bit surprising considering both computers had the same software that I used to create the file. It's obviously been a while since I made an animation ;)

I'll produce another demo later with a more normal view angle and a flow map to try out regional colour variations. I should have my tree model sorted by then as well so it'll also include a summer - autumn transition.


Hehe, 3ivx is just as proprietary, although fortunately it should play with Divx, Xvid and other compatible MPEG4 codecs. For broadest compatibility MPEG1 should be the best. Quicktime with Sorenson is a fairly safe bet, as is AVI with Divx. For best quality combined with broadest Mac/PC compatibility I suggest MPEG4 in a .mp4 container file. These can be generated/converted to easily using either SUPER or Media Coder, both great, free tools with extremely broad codec support.

- Oshyan


That's pretty cool, Ben.  I wish it was a little bit smoother, but it's a pretty nifty effect.
http://www.terragen.org - A great Terragen resource with models, contests, galleries, and forums.


I only rendered every 10th frame, and the settings used were a bit excessive to demonstrate the changes clearly. The next demo with a tree will have more frames and more appropriate settings for a smoth transition. The only drawback to having nice grass is that it adds significantly to render time, hence the low number of frames. 

One of the things I noticed with this grass model is that since all of the blades start on the same plane, the surfacing looks less random and you have to be careful with the fractal breakup settings to avoid obvious patterns (look closely at the last frame near the bottom).  Trees don't have this problem as the origins of each leaf are distributed vertically.


I'd have to recommend videolan
currently version 0.8.6a
You can even do some conversions in its wizard. esp MP4


Yeah, but the VideoLAN UI is awful IMO. KMPlayer and Gomplayer are both muuuch nicer to use.

Sorry to hijack the thread btw Ben. ;)

- Oshyan


That's OK.. It's happens a lot whenever you post something that someone can't view  ;)  ... the other thing I should have done is checked the pixel ratio to make sure it was compatible with the compression codec I wanted to use. 

I'll have to check why VirtualDub was only showing a small range of codecs, but otherwise I can always compile it there and then post process in Premiere.




Now that we seem to have resolved the video issues I woudl like to thank you for your contribution
of the grass w/shaders .obj, it works well. I was playing with it last night.
Great job!
And a hardy Thank you!