Planetside Software Forums

General => File Sharing => Archive (Broken Links) => Topic started by: dandelO on September 18, 2010, 09:59:16 AM

Title: dandelO's Grass Shader Update
Post by: dandelO on September 18, 2010, 09:59:16 AM
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...
Title: Re: dandelO's Grass Shader Update
Post by: dandelO on September 18, 2010, 10:15:53 AM
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)...
Title: Re: dandelO's Grass Shader Update
Post by: inkydigit on September 18, 2010, 11:01:59 AM
thanks  D this looks handy, very impressive!
Title: Re: dandelO's Grass Shader Update
Post by: dandelO on September 18, 2010, 12:32:30 PM
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=#]
Title: Re: dandelO's Grass Shader Update
Post by: bla bla 2 on September 18, 2010, 04:13:23 PM
Ca rend trop bien. ;)
That to return too much good
Title: Re: dandelO's Grass Shader Update
Post by: Kadri on September 18, 2010, 06:58:37 PM

Looks nice , thanks DandelO  :)
Title: Re: dandelO's Grass Shader Update
Post by: nethskie on September 18, 2010, 08:57:49 PM
thanks for sharing! very nice update!
Title: Re: dandelO's Grass Shader Update
Post by: Henry Blewer on September 18, 2010, 10:14:39 PM
I will be trying this out quite soon. Thanks for your hard work. 8)
Title: Re: dandelO's Grass Shader Update
Post by: schmeerlap on September 19, 2010, 07:29:19 AM
Thanks, Martin; much appreciated.

John
Title: Re: dandelO's Grass Shader Update
Post by: freelancah on September 19, 2010, 10:43:51 AM
Marvelous work! Need to test this sometime!
Title: Re: dandelO's Grass Shader Update
Post by: Dune on September 19, 2010, 11:35:05 AM
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
Title: Re: dandelO's Grass Shader Update
Post by: dandelO on September 19, 2010, 12:47:13 PM
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. ;)
Title: Re: dandelO's Grass Shader Update
Post by: Henry Blewer on September 19, 2010, 04:39:21 PM
The same thing happened to me; stretched to a ridiculous tallness. I'm 6'5".
Title: Re: dandelO's Grass Shader Update
Post by: dandelO on September 19, 2010, 04:42:08 PM
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! :)
Title: Re: dandelO's Grass Shader Update
Post by: inkydigit on September 19, 2010, 04:51:50 PM
first to download yay!
cheers man, I will check these out!
:)
Title: Re: dandelO's Grass Shader Update
Post by: dandelO on September 19, 2010, 07:35:20 PM
Have at it, Jason! :)

This is probably as far as I will take these files, for public sharing purposes, at least.
I think that pretty much covers the main needs of a procedural grass layer. With the colour variation, specular settings, mud layers, and general slope constraints all pre-set inside, you're still left with all the functions of the main parent node on the outside to further tune things.
All your height constraints and any extra slope constraints can be set there, as can blending/breakup shaders, coverage, intersection, surface smoothing, luminosity etc.
Patchiness colours and specular highlights are all still editable, as are the length of each blade(and the size of each clump), from inside the nodes. Experts will see easily how they are all put together and edit it themselves and inexperienced users will get a good use out of this too with the simple plug-and-go tactic, I'd imagine.

I hope to see it sprouting up in some of your lovely pic's in the future, it has been a long labour getting these shaders to this point. From way back in 2007, actually(link is from 2008 but it's the oldest one I can find at the PS forums)... http://forums.planetside.co.uk/index.php?topic=3842.0

Done.
Title: Re: dandelO's Grass Shader Update
Post by: Dune on September 20, 2010, 04:16:38 AM
No exploded stones indeed, I just checked them out. Thanks Martin, very useful and a clever way of doing this. I made the clumps to sit the stretched stones on from a PF, but the fake stone base is actually much smarter. The only thing I don't grasp is the Lambert shader, but that's one I never use at all, so I never bothered to test it. It works great, thanks again.
Title: Re: dandelO's Grass Shader Update
Post by: dandelO on September 20, 2010, 09:20:33 AM
Hi, Ulco. The Lambert shader was there to give the individual blades translucency, you can see the effect best in the close-up screenshots at the top of page 1.
I've now replaced that Lambert shader with a default shader so that I can have translucency, as well as specular functions. See the updated files at the bottom of page 1. :)

I just read your Plugsnpixels interview last night and I see that you have had much the same idea, I'd like to say I didn't steal Ulco's idea from there. ;) These were older files (http://forums.planetside.co.uk/index.php?topic=7509.0) that I've just edited and replaced recently. :D
Title: Re: dandelO's Grass Shader Update
Post by: Dune on September 20, 2010, 11:03:31 AM
I know you didn't, because I had your files earlier, and might have gotten the idea for the long stones from you, and subsequently put together something 'of my own'. Can't remember, you pick up so many bits and bites here and there.... by the way, I would have hoped the Plugsnpixels interview to be a little more in favor of TG2 and XFrog. I put down the naked truth, but forgot to give Planetside's amazing product a serious boost. Probably because I'm not a salesman. Hate them actually  8)

regards,

Ulco
Title: Re: dandelO's Grass Shader Update
Post by: Hetzen on September 20, 2010, 06:16:03 PM
Ingenious Martin. No more need of grass populations, although I wonder what would happen if the camera moved. I've become a little more wary of displacements turning themselves on and off between frames. I'd like to give this a test run to find out if you don't mind. Grass seems to me to be such a waste of memory, and this would be a brilliant solution.
Title: Re: dandelO's Grass Shader Update
Post by: dandelO on September 20, 2010, 06:51:20 PM
Hmmm, I couldn't say there definitely wouldn't be any issues with that, Hetzen. If you look at the 'extreme close up 1' image on page 1, you'll see halfway across the width of the image(most noticeable at the right hand side) that there were some displacement discrepancies between render buckets, there's a sharp cut-off. That was the only time I've came across the problem, mind you. I think it was just a random render error, the next image below it doesn't suffer the same problem but I had also used a different AA on that one so, I've no way to say for sure.
There are often slight differences in subtle displacement details between renders of fake stones and such. You could always try and, I suppose, motion blur would minimize any major discrepancies, were you to animate it.

And, of course, you also couldn't use the current public's RTE rendering for this shader either.
Title: Re: dandelO's Grass Shader Update
Post by: RArcher on September 20, 2010, 09:12:46 PM
In the planet node there is a function called "displacement tolerance"  changing it should help with the cut offs at the bucket edges.  Start with very small increments to test as changing the numbers in a big way will result in huge render time increases.

More on topic, the "grass" looks great.  Very useful for almost any scene.
Title: Re: dandelO's Grass Shader Update
Post by: dandelO on September 20, 2010, 09:45:21 PM
Yes, indeed. Displacement tolerance is the way to go if the cut-off problem ever arises again. I have only seen it that one time with this shader and that was in a pretty close-up shot that you aren't likely to want to do with this grass but, it's good advice.
Thanks, RArcher! :)
Title: Re: dandelO's Grass Shader Update
Post by: choronr on September 21, 2010, 01:22:54 PM
Thank you Martin; as said, this can be used in almost any project.
Title: Re: dandelO's Grass Shader Update
Post by: A4size on September 25, 2010, 02:14:50 AM
Thank you for sharing!

Title: Re: dandelO's Grass Shader Update
Post by: choronr on September 25, 2010, 01:36:38 PM
I used your procedural grass Martin that worked out very well except for what you see that has happened to the fake stones at the shore line. The next message will illustrate the difference between the 'Quick render' and the 'Full render'.
Title: Re: dandelO's Grass Shader Update
Post by: choronr on September 25, 2010, 01:37:48 PM
Here is the difference between the Quick and the Full renders. The Quick render is on the left.
Title: Re: dandelO's Grass Shader Update
Post by: dandelO on September 25, 2010, 02:14:09 PM
Great image!
It does require a good render detail to look its best, Bob. I'd use it at about 0.7 to 1, any lower and it can quickly turn to mulch. ;)
I've never seen that speckling effect as a result of using it, weird. I kind of like it on the stones here, even though, it wasn't actually desired. :P
Title: Re: dandelO's Grass Shader Update
Post by: choronr on September 25, 2010, 02:23:57 PM
Quote from: dandelO on September 25, 2010, 02:14:09 PM
Great image!
It does require a good render detail to look its best, Bob. I'd use it at about 0.7 to 1, any lower and it can quickly turn to mulch. ;)
I've never seen that speckling effect as a result of using it, weird. I kind of like it on the stones here, even though, it wasn't actually desired. :P

Thanks Martin, I initially did the final render at 0.9 quality; 0.6 AA with GI at 2/4. After about 12 hours, I got an unknown error - a couple of buffers did not render towards the bottom. I tried lowering the quality and AA but got the same results. I attached the .tgd if you want to look. Note: I couldn't get a pop on the Lily pads so I placed them individually. The terrain is a .ter of Bright Angel Canyon.
Title: Re: dandelO's Grass Shader Update
Post by: bobbystahr on October 03, 2010, 10:01:41 AM
Quote from: njeneb on September 19, 2010, 04:39:21 PM
The same thing happened to me; stretched to a ridiculous tallness. I'm 6'5".

he he he...well said.. ...
Title: Re: dandelO's Grass Shader Update
Post by: DVA99 on October 25, 2010, 03:57:00 AM
Many thanks dandelO,

Can't imagine how much time this have taken.

Cheers
Title: Re: dandelO's Grass Shader Update
Post by: Gforce on October 28, 2010, 07:57:31 PM
thanks
Title: Re: dandelO's Grass Shader Update
Post by: 8609852k on October 31, 2016, 03:26:54 PM
Hello everyone,

Help! I can not find the download this updated file .TGD. Why?
This could myself really useful!


Thank you in advance for your help
Title: Re: dandelO's Grass Shader Update
Post by: luvsmuzik on November 04, 2016, 04:58:49 PM
Question for Oshyan:

I have downloaded many files once shared in this forum. Is it okay to reshare those same files, or even use them now that they are no longer available?
Title: Re: dandelO's Grass Shader Update
Post by: Oshyan on November 04, 2016, 05:01:53 PM
Quote from: luvsmuzik on November 04, 2016, 04:58:49 PM
Question for Oshyan:

I have downloaded many files once shared in this forum. Is it okay to reshare those same files, or even use them now that they are no longer available?

In my view it really depends on the terms of use the original author communicated. And if someone explicitly took down their content, that does say something, at least about their desires, if not their legal rights. dandelO left and then came back,  but did not repost everything...

Anyway I think a version of the grass shader is now in the free presets: http://planetside.co.uk/free-downloads/terragen-presets-pack-volume1/

- Oshyan
Title: Re: dandelO's Grass Shader Update
Post by: luvsmuzik on November 04, 2016, 05:32:23 PM
Quote from: 8609852k on October 31, 2016, 03:26:54 PM
Hello everyone,

Help! I can not find the download this updated file .TGD. Why?
This could myself really useful!


Thank you in advance for your help
Quote from: Oshyan on November 04, 2016, 05:01:53 PM
Quote from: luvsmuzik on November 04, 2016, 04:58:49 PM
Question for Oshyan:

I have downloaded many files once shared in this forum. Is it okay to reshare those same files, or even use them now that they are no longer available?

In my view it really depends on the terms of use the original author communicated. And if someone explicitly took down their content, that does say something, at least about their desires, if not their legal rights. dandelO left and then came back,  but did not repost everything...

Anyway I think a version of the grass shader is now in the free presets: http://planetside.co.uk/free-downloads/terragen-presets-pack-volume1/

- Oshyan

Thank you!
Title: Re: dandelO's Grass Shader Update
Post by: Eric Johannsen on February 09, 2018, 01:43:01 AM
Is there a TG2 compatible version of the grass shader around somewhere? Unfortunately, my licensed version is TG 2 and I can't upgrade at this time.
Title: Re: dandelO's Grass Shader Update
Post by: Dune on February 09, 2018, 02:44:45 AM
It would work nonetheless, IMO. Nothing really specific about it, just a few tiny (0.005), but high (10) fake stone shaders in principle.
Title: Re: dandelO's Grass Shader Update
Post by: DannyG on February 10, 2018, 10:22:27 AM
Quote from: Eric Johannsen on February 09, 2018, 01:43:01 AM
Is there a TG2 compatible version of the grass shader around somewhere? Unfortunately, my licensed version is TG 2 and I can't upgrade at this time.

The original shaders were created in v2, which I have and they look great in v2, however dandelO and all his kindness and knowledge has taken a break from TG and the web in general. Unfortunately without his permission to share it I cannot. I will however attempt to contact him for you though bud.
Title: Re: dandelO's Grass Shader Update
Post by: bobbystahr on February 11, 2018, 10:57:50 AM
Quote from: Eric Johannsen on February 09, 2018, 01:43:01 AM
Is there a TG2 compatible version of the grass shader around somewhere? Unfortunately, my licensed version is TG 2 and I can't upgrade at this time.

Check out the link in Oshyan's post for the presets pack. many will work in TG2