Quick and dirty grass shader

Alright, it’s not really quick and dirty anymore. Uses parallax mapping. Doesn’t cost a lot fps-wise. You could probably use this as a fur effect as well with some adjusting and careful UV mapping.

Added wind.
Added subsurface lighting.
Made grass finer.
You can make your own noise maps to get chunky grass or fine fur as needed.
Added user control to select mip bias for colour bleed based on fibre length.
Added edge masking for fluffy edges.
Added many fur controls and lighting/colour/translucency options.
Added ability to shave or grow fur using vertex painting.
Added texture map support for base, mid and tip fibre colours
Added fresnel colour for flat shading mode, good for simulating light coloured fur
Added translucency control

Looks fuzzy and delightful on landscapes:

Areas of grass even intersect nicely:

Landscape layers work pretty good with it

Finer grass and subsurface lighting makes for a Dr Seuss vibe

That’s looks great, man.

Looks fantastic, how does it look with a character running through it? I know when I’ve set up POM snow before, I had to offset the depth in the POM with an upward WPO so that the ground level was still even.

Also, are you going to release this/put it on the marketplace? It looks really good, I’m sure lots of people would find it useful :slight_smile:

You’d need to sink your character into the ground a bit for the grass to show up around their feet. That’s a good idea, I’ll translate the WPO along the normal. Thanks!

I’m thinking marketplace, just trying to get a good fur example going. :slight_smile:

Edit: That world position offset came out good! Here’s some physics-enabled objects left to fall on the surface:

Very nice! Glad that WPO trick worked for you. :slight_smile: I’ll be keeping an eye out for this, it looks fantastic, ESPECIALLY that one with the Dr. Seuss feel. Great work!!

Is this coming out in the next couple weeks on the marketplace?

I literally started it last night but if it goes well there’s no reason to think it couldn’t. If you’re really keen I can just send you a copy.

Bit of fur testing. It’s coming along nicely too, although there are problems where the expanded hull overlaps, so it has to be used conservatively.

Next up I clearly need to add texture map support for the colour gradients rather than vectors, so the sullypants can have big purple spots.

Edit: better res video

If you’re willing to share I’d be really excited to dive in, don’t feel obligated to though if you want to keep a tight lid on it :slight_smile:

I would love to try out a copy, is it really performance heavy, I have had to use a macbook pro laptop to do my arch viz stuff on cause I graduated college last year and have been working with the state to find a job for an entire year so I havent had the opportunity to buy a good desktop computer. If it helps here are my specs for my Macbook and my email is josephlemons69@gmail.com if you want to send me a copy.

I would say it’s light compared to using lots of instanced foliage the way people normally do grass. If you go for an opaque grass surface on a flat plane (rather than the transparent materials I’ve been experimenting with today) it should run pretty good.

Alright well then feel free to send me a copy, ill be sure to bookmark this post and when Im done testing it out ill give you feedback on what I like, dont like etc :slight_smile:

I hate to ask for a copy as well, but I’m working on a project with a painterly style to the world and I’d like to give your grass a go if at all possible. Of course, I would provide feedback/criticism as well.

Sounds good guys. I’ll PM you a link tonight when I get home. :slight_smile:

First time I’ve seen this effect was in the plain old Dx7 game engine days. Still cool fx.

Awesome thanks :smiley:

I’d like to see that. Know of an example I could google for? Or do you mean parallax occlusion in general? I remember seeing it in a benchmarking program back then and I couldn’t get my head around how it worked at the time. Blew me away.

I saw this for the first time in the very old BlitzBasic forums.
The guys did it by raw scripting, creating the layers and the parallax effect all by handcrafted code, the game engine had no support for GPU shaders.
There was also the place where I saw normal mapping on Dx7 for the first time too, also no GPU shader code.

This guy is putting up with my test shaders like a champ.

Once I tried something similar in Blender Game Engine. I didn’t do it as great as you did here. Nice work!:slight_smile: