Jump to content


Photo

Grass Shader (anybody know what this guy is talking about)

grass shader

  • Please log in to reply
7 replies to this topic

#1 scottpussehl

scottpussehl

    Advanced Member

  • Members
  • PipPipPip
  • 49 posts
  • LocationMichigan, USA

Posted 01 December 2016 - 05:22 AM

So I have been scouring the internet trying to find stuff to make my course look better. I found this forum post

If you scrole down quite a ways you will find this post 

The shown grass looks pretty realistic but i don't have a clue what he is talking about. Further down he gives a link to the shader he made, but I don't know how to use it. Does anyone understand what he is talking about and how to use this shader?

<quote>I made a grass with Shader Forge which uses a planar light reprojection rendertexture to illuminate the light shading, which can be blurred to fake the light scattering among the grass. It also have soft transparent edges with (almost) correct depth sorting as opposed to the sharp default cutout which is whats usually used for grass, and it uses a single pass to do everything inlcuding the soft edges.

It's incredibly light on performance since it doesn't do any computing with the grass meshes themselves and uses the terrain lighting as proxy. And even if you have large shadows or multiple lights coming around you will see them on the grass even though the grass don't cast or recieve shadows.</quote>

dVEQOEV.jpg

 



#2 Kablammo11

Kablammo11

    Obscure Person

  • Members
  • PipPipPip
  • 3,953 posts

Posted 01 December 2016 - 09:19 AM

 
The mediafire dl did not work, not for me anyway... I struggle with Unity nerd zombie language myself, so all I can deduce is that this shader would make your grass billboards look softer (hard edges indeed are a huge problem) and generally better, at almost no additional performance penalty.
 
As for using this shader, there are probably several ways... The author should provide you with details. Or if you import the shader package it will be automatically integrated in Unity and show up as an additional option in your Inspector when you open a grass billboard in there.
 
CF and JNPG will soon introduce volumetric grass (the evil "soon", not the good one, that is). And that will be a tectonic shift in grass planting, so that this shader might become obsolete when it happens (or not, just guessing). 

>>>>>>> Ka-Boom!





• Mulligan Municipal • Willow Heath • Pommeroy • Karen • Five Sisters • Xaxnax Borealis • Aroha • Prison Puttˆ

• The Upchuck   The Shogun  • Black Swan (•)

 

<<<<<


#3 Jimbobh

Jimbobh

    Advanced Member

  • Members
  • PipPipPip
  • 539 posts
  • LocationMaine

Posted 01 December 2016 - 11:29 AM

K11 I downloaded the shader and put in in my google drive if you want to try and get it from there and check it out.

https://drive.google...iew?usp=sharing


  • StoneComet likes this

Gigabyte ga-z68x-ud3h-b3 Motherboard

Intel Core i5-2400 CPU@3.1GHz 3.70GHz

GeForce GTX 1050 Ti
16GB Ram   (2)G.Skill Ripjaws F3-10666L9S-8GBXL
Windows 7 Home Premium


#4 Kablammo11

Kablammo11

    Obscure Person

  • Members
  • PipPipPip
  • 3,953 posts

Posted 01 December 2016 - 04:38 PM

Thanks, Jimbobh. I appreciate your help.

Did you try it? I don't even know if our slightly outdated Unity version supports it. I would try it, but I'm having a bit of a technical Unity/CF crisis right now and am unable to do any design work atm. 


>>>>>>> Ka-Boom!





• Mulligan Municipal • Willow Heath • Pommeroy • Karen • Five Sisters • Xaxnax Borealis • Aroha • Prison Puttˆ

• The Upchuck   The Shogun  • Black Swan (•)

 

<<<<<


#5 garynorman

garynorman

    Advanced Member

  • Members
  • PipPipPip
  • 481 posts
  • LocationBedfordshire, England

Posted 01 December 2016 - 05:35 PM

I had a look... I'm pretty sure that you apply it to a prefab's material as opposed to a texture.  I tried to apply it to a grass prefab but couldn't get it to work (I had solid green planes as a result) but that could be me doing something wrong.



#6 StoneComet

StoneComet

    Advanced Member

  • Members
  • PipPipPip
  • 450 posts
  • LocationNew York

Posted 01 December 2016 - 05:37 PM

Thanks, Jimbobh. I appreciate your help.

Did you try it? I don't even know if our slightly outdated Unity version supports it. I would try it, but I'm having a bit of a technical Unity/CF crisis right now and am unable to do any design work atm. 

 

Hi K11,

 

Went a bit too far down the rabbit hole? I hope you find your way out.

 

StoneComet

 

K11 I downloaded the shader and put in in my google drive if you want to try and get it from there and check it out.

https://drive.google...iew?usp=sharing

 

Hello Jim,

 

I've downloaded it but yet to experiment. Looks intriguing. Even when we get 3D Grass is that only for windows 10 and Xbox? I guess I'm trying to say that shaders might still have a future. As a designer I am wondering if I'll have to make 2 versions. One with 3D Grass and one without once we finally get NVIDIA Turf Effects.

 

SC  :)


- We would be wise to remember that extremism is the real enemy and to keep ourselves aware so as not to become extreme ourselves; otherwise the enemy wins. -


#7 StoneComet

StoneComet

    Advanced Member

  • Members
  • PipPipPip
  • 450 posts
  • LocationNew York

Posted 01 December 2016 - 06:43 PM

Hi all,

 

Well I gave it a go and could not make heads or tails of it. The file I downloaded produced a shader file asset but I was unable to get it to work. After rereading the quote I noticed the original commentary said they created a grass using Shader Forge. I looked into it and watched the preliminary tutorial at Shader Forge's website. Which looks really cool by the way.

 

http://acegikmo.com/shaderforge/

 

My take is you have to create the grass using Shader Forge in order for them to work. I could be wrong as it seems if you can use Shader Forge to create grasses you could take the grasses we have and alter them with it. Way over my head for now. I just do not see how the imported shader (which states FLAT by the way) is used even after I imported it into my assets. I tried a few different things with no result. I'm not even sure how Gary got the flat thing as I'm not sure how to get to the grass prefab.

 

One thing that looked promising was the inspection of the shader itself which has a diffuse option near the top. I selected a grass and hit apply but it seemed to do nothing to the grass. We are looking for grasses to cast shadows and appear more diffused/softer if it works correct?

 

SC :)  


- We would be wise to remember that extremism is the real enemy and to keep ourselves aware so as not to become extreme ourselves; otherwise the enemy wins. -


#8 garynorman

garynorman

    Advanced Member

  • Members
  • PipPipPip
  • 481 posts
  • LocationBedfordshire, England

Posted 01 December 2016 - 06:48 PM

Hi all,

 

Well I gave it a go and could not make heads or tails of it. The file I downloaded produced a shader file asset but I was unable to get it to work. After rereading the quote I noticed the original commentary said they created a grass using Shader Forge. I looked into it and watched the preliminary tutorial at Shader Forge's website. Which looks really cool by the way.

 

http://acegikmo.com/shaderforge/

 

My take is you have to create the grass using Shader Forge in order for them to work. I could be wrong as it seems if you can use Shader Forge to create grasses you could take the grasses we have and alter them with it. Way over my head for now. I just do not see how the imported shader (which states FLAT by the way) is used even after I imported it into my assets. I tried a few different things with no result. I'm not even sure how Gary got the flat thing as I'm not sure how to get to the grass prefab.

 

One thing that looked promising was the inspection of the shader itself which has a diffuse option near the top. I selected a grass and hit apply but it seemed to do nothing to the grass. We are looking for grasses to cast shadows and appear more diffused/softer if it works correct?

 

SC :)  

 

The grass prefabs that I used were from downloaded unity asset.  You may be right about the flat bit, but I cant see any way of adding a shader to a texture, only to a material.

 

To be honest, I think that this is way beyond my capabilities at the moment...  I'm sure that someone with the time and patience may well figure this out, and when they do please feel free to let me in on the secret..!






1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users