dandelO's Grass Shader Update

Started by dandelO, September 18, 2010, 09:59:16 AM

Previous topic - Next topic

dandelO

The thread I originally posted this to has become a graveyard, complete with some spectre dandelO character wandering about, proclaiming himself to be an idiot. This last may, or may not be true... ;)

Anyway, I'd like to add these files again as I think they look far better than any previous procedural grasses that I have uploaded to places, that I still see popping up in peoples renders.

So, a couple of demo shots:

Shader preview window...
[attachimg=#]

Extreme close-up 1...
[attachimg=#]

Extreme close-up 2...
[attachimg=#]

Continued below...

dandelO

#1
And here is the default grass-layer placed over a default heightfield generate node, in a default scene, at an eye-level POV:

[attachimg=#]

Inside, I've edited a couple of things since last time. Namely, the patchiness functions.
Now, the patchiness isn't set up with any distance gradient fall-off as it was before(because, when loading the clipfile, the 'render camera' for the fall-off distance won't be automatically assigned).
All the patch shaders are still the same inside and the distance fall-off can be easily enabled again by clicking the 'blend by shader' checkboxes of the 'patchiness 1+2' nodes. You must also specify a camera in the 'distance shader - patch gradient' node to use the fall-off function.

Simply drop it into your scene and connect it after your last ground shader, before the planet node. All editable features are inside.

*The layer is also under development again. The mud is being edited as it is pretty poor here and, the grass has no specular channel, yet(the highlights you can see above are from my default rock shader)...

inkydigit

thanks  D this looks handy, very impressive!

dandelO

Cheers, man! :)
Should be better soon, here's some specularity and an edited mud shot. Highlights are controlled by distance. Still working on the mud...

[attachimg=#]

bla bla 2

Ca rend trop bien. ;)
That to return too much good


nethskie

thanks for sharing! very nice update!

Henry Blewer

I will be trying this out quite soon. Thanks for your hard work. 8)
http://flickr.com/photos/njeneb/
Forget Tuesday; It's just Monday spelled with a T

schmeerlap

Thanks, Martin; much appreciated.

John
I hope I realise I don't exist before I apparently die.

freelancah

Marvelous work! Need to test this sometime!

Dune

Does this still work in the newest version, Martin? I'll test it, but I thought the 'blend by stone density' (or whatever it's called, I'm off TG2 at the moment) bug has been fixed, so as not to explode fake stones... If it still works, it's great to have! Thanks a lot.

---Dune

dandelO

Dune: They aren't the 'exploded' fake stones.
Each and every 'grass-blade' is an actual fake stone, each one is just stretched to a ridiculous tallness. ;)

Henry Blewer

The same thing happened to me; stretched to a ridiculous tallness. I'm 6'5".
http://flickr.com/photos/njeneb/
Forget Tuesday; It's just Monday spelled with a T

dandelO

#13
OK.

So, here's the final set of shaders, which now incorporate a far nicer set of mud shaders and also a specular function for the grass blades.

There are 2 files to this upload; One .tgc and one .tgd. This is because the specular and patch gradients are features that need enabled, if they are required. The .tgd shows how this is done.

You can connect the layer in exactly the same way as the last one, that is, after your rock shaders but before your planet node.

The main shaders are now listed with 2 main group buttons, located in the node network area, for ease of navigation; 'a. Mud Shaders' and 'b. Grass Shaders'.

Enabling the specular function of the grass is very simple. Just select the new group button 'b. grass shaders' and inside, you'll see a couple of new nodes. Your key to distributing highlights is the 'near and far distance' fields in the new node 'Distance shader - Specular Gradient'. Set your render camera to this node with a right-click.
Usually, you'll want the grass' highlights to appear close to the camera but not so far into the distance that they all blend together, making a horrid 'plastic' look. The .tgd shows that I have given the highlights a cut-off distance of 250m. This means that they will fade to nothing(because the 'far colour' is black) after 250m.
The default settings in the clipfile version has distance values of '0'. This means no highlights.

You can use the same idea for the 'Distance Shader - Patch Gradient' node. You might want, for example, to adjust the 'near colour' of this node to take away any stray patches near your camera, if you'd like a more solid colour close to you. Your choice.
The default settings for patchiness are to have a complete patchiness covering of the entire shader. Blend in and out as you choose. :)

Here's the scene from the .tgd(I have some clouds in mine and my own personal rock shaders, that I'm also not including, the .tgd is just a plain atmosphere and the default 'base colours' node is the only rock surface but it's the same as this image in every other way);

[attachimg=#]

Remember to click 'generate now' in the heightfield before you start with the .tgd file!

Cheers, folks! :)

inkydigit

first to download yay!
cheers man, I will check these out!
:)