Quick and dirty grass shader

Set hair length using vertex painting

What engine do I need to use to get this to work, i tried running it and it says I was not using the right engine version so I deleted it thinking it was broken :frowning:

You need to be using 4.12. The download link I still gave you is up, so have another go if you can. :slight_smile:

Forgot to scale the colour gradient by hair length. Now you can actually shave the fella down to his skin. A higher res sphere mesh would give even better results.

Does the forum have a trash, I deleted the private message you sent me and ive looked everywhere but cant find a way to recover the message

It’s OK I’ll send it again. :slight_smile:

The grass isnt showing up on my landscape, how do i fix this?

d9b18cb07482de2fb86bc0cb32c02ac15168a9a3.jpeg

You need to use the “LandscapeGrass_Inst” material instead. Then open the shader, click the “landscape coordinates” node and check the details panel. Put your landscape’s original unit size in there.

Can you post a picture of what I need to do because I have the Grass Material Instance open but nowhere do I see anything called landscape coordinates?

In your screenshot above there’s two black material previews: LandscapeGrass_Inst is the material instance to apply and LandscapeGrass is the parent material to open and edit.

You’ll always need to do this for landscape materials no matter what you’re doing as there’s no way to directly parameterize landscape coord value. I’ll see if I can make it simpler as it’s easy enough to just multiple the coordinates results.

Here’s where you edit the mapping scale:

The default values may also be fairly OK so this step isn’t all that mandatory unless your material looks really bad.

Well that didnt work as everything is now black

Your mapping scale shouldn’t be 1.

When you create a landscape you’re able to specify a power-of-two value relating to dimensions (I forget what it’s called). That’s the value you put into that box.

If you’ve never textured a landscape before it’s a difficult and irritating process but there is a logical reason for everything.

Since it looks like you’re just using a flat plane with no terrain deformation, you could easily just scale the default cube shape up and use one of the non-landscape grass shaders like in the example map that was included. Have you tried looking at that?

I’d be interested in testing this as an option for short hair as well, or to accent rather stylized hair, rather than using hair physics. I’m imagining over a certain length it would get a bit wonky.

It doesn’t have the ability to droop like hair yet, so you’re limited to things like this:

So yeah, better as a base layer or as short hair.

There’s a length at which it starts to look quite wild for sure but you can definitely get it to fluffball muppet length and still look good.

I’m playing around with lighting at the moment and fixing small visual glitches (where possible) but it’s pretty close to being ready for release. Need to make a ton of example materials and some blueprints demonstrating how to use it now.

Here’s a little more from this weekend’s efforts - velocity-based fur motion:

Requires some fairly minor blueprint support, I’ll try packaging the node up so it’s nice and easy to use.

It’s all looking a bit dark at the moment because I’ve switched to the hair shader. I’ll keep playing with it and try to get some more light back into the fibres.

Hello.

Interesting work. I’m interested in the grass more than the fur as my game needs (ideally) lots of grass extending over rolling fields as far from the player as possible, however, I’m finding this difficult performance-wise as the overdraw costs of traditional grass really escalates quickly.

Would your POM grass be a viable alternative for my problem? I assume the POM grass won’t hold up to crouching low/prone in first-person but i was thinking of trying using traditional grass meshes closer to character then at some distance fading to the POM grass?

Also, could i vary the length/colour of the grass based off a randomized map input? Will your grass support just the grass you provide or can i use my own grasses with the POM for variety?

Sorry for the questions but these are important issues for me.

Regards

Slinky

Lemme try some rolling fields of grass for you and we’ll see how it goes. :slight_smile:

The POM actually looks great up close, but it also suits mixing with other foliage nearby.

You can adjust the shader to vary the colour, but it also supports using textures for the various colour layers. You could use this to vary the colour of the grass and just bump up the scale of the colour layer. Since it’s just a shader you can edit anything about it.

The thing to keep in mind is that it’s literally a heightmap, so the only real variations you can do are things like blade thickness, clumping and overall length variance. Anything you can do with a heightmap basically.

Okay, thanks for that. Will be keeping an eye on this one!
Regards
Slinky