Planetside Software Forums

General => File Sharing => Topic started by: bigben on March 27, 2007, 02:04:07 AM

Title: Long grass with mixed shader
Post by: bigben on March 27, 2007, 02:04:07 AM
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 (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>

[attachthumb=#2]

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  :)
Title: Re: Long grass with mixed shader
Post by: dhavalmistry on March 27, 2007, 05:49:37 AM
I cannot play the animation file....I used 3 different players

GOM player
VLC media player
Windows Media Player

None of them work
Title: Re: Long grass with mixed shader
Post by: rcallicotte on March 27, 2007, 03:01:25 PM
I only tried WMP, but it didn't work.
Title: Re: Long grass with mixed shader
Post by: old_blaggard on March 27, 2007, 03:16:57 PM
I tried QuickTime with the .avi and flip4mac plugins, and no joy here :(.
Title: Re: Long grass with mixed shader
Post by: sonshine777 on March 27, 2007, 03:25:55 PM
 :) The video works great on Real Player. :) 
Nice way to show the variation Ben. :)
Title: Re: Long grass with mixed shader
Post by: Oshyan on March 27, 2007, 06:43:33 PM
Worked great here. I recommend the Combined Community Codec Pack (http://www.cccp-project.net/) and/or The KMPlayer (http://kmplayer.com/), which I now use exclusively along with Quicktime Alternative and Real Alternative.

- Oshyan
Title: Re: Long grass with mixed shader
Post by: bigben on March 27, 2007, 11:21:21 PM
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.
Title: Re: Long grass with mixed shader
Post by: Oshyan on March 27, 2007, 11:28:58 PM
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 (http://www.erightsoft.com/SUPER.html) or Media Coder (http://mediacoder.sourceforge.net/), both great, free tools with extremely broad codec support.

- Oshyan
Title: Re: Long grass with mixed shader
Post by: old_blaggard on March 28, 2007, 12:56:02 AM
That's pretty cool, Ben.  I wish it was a little bit smoother, but it's a pretty nifty effect.
Title: Re: Long grass with mixed shader
Post by: bigben on March 28, 2007, 01:23:57 AM
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.
Title: Re: Long grass with mixed shader
Post by: neon22 on March 29, 2007, 09:39:11 AM
I'd have to recommend videolan
http://www.videolan.org/
currently version 0.8.6a
You can even do some conversions in its wizard. esp MP4
Title: Re: Long grass with mixed shader
Post by: Oshyan on March 29, 2007, 07:33:55 PM
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
Title: Re: Long grass with mixed shader
Post by: bigben on March 29, 2007, 11:58:39 PM
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.
Title: Re: Long grass with mixed shader
Post by: edlo on April 03, 2007, 02:07:06 PM
Brilliant work M8  ;D
Title: Re: Long grass with mixed shader
Post by: sonshine777 on April 03, 2007, 02:19:40 PM
Ben,

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!
Title: Re: Long grass with mixed shader
Post by: Volker Harun on June 05, 2007, 05:30:31 AM
It is a very good work!
Title: Re: Long grass with mixed shader
Post by: old_blaggard on June 05, 2007, 05:55:07 AM
Good to see you again, Volker!
Title: Re: Long grass with mixed shader
Post by: Phylloxera on July 12, 2007, 10:15:48 AM
Beautiful work !! ;D