Customizable Grass Materials

**Marketplace Link **

**Introduction ** [HR][/HR]Customizable Grass is a customizable game-ready foliage pack and shader intended for beginners and professionals alike to either use as-is or as a framework for more advanced materials. Special attention was given to the optimization of the assets included, limiting the amount of shader complexity and quad overdraw. Also included are LODs that can be adjusted to your own needs in relation to the grass’ painted cull distance, allowing you to adjust these assets for smaller, arena-like levels. By default, the package was set up to be used with more open-world environments.

**Brief Video Summary ** [HR][/HR]Instead of outlining a technical overview here like I normally do, I have decided to keep it simple with two videos.

Customization Overview

Player Interaction Showcase

The technical overview notes are found on the marketplace listing, and more elaborate technical information can be found in the notes section of the Overview map.

**Marketplace Link **

Other Stuff

Customizable Roads (Marketplace Link) (Forum Link)

Customizable Paths (Marketplace Link) (Forum Link)

Customizable Walls (Marketplace Link) (Forum Link)

Feel free to use this topic for any questions or suggestions that you may have.

I’m teaching myself foliage and landscape stuff now, so I am no expert, but I downloaded this and it seems great. I laid the grass on densely and my performance is good, things looked okay on the shader complexity view too.

I copy pasted the grass interaction code from your example map to my map… but it doesn’t seem to be doing anything. Anything else I need to do? Will that code work with the first person starter project? Do I need to enable collision on meshes?

Hello. I tested it in a new first person starter project and it works as intended. Here’s what you should do:

In the CustomizableGrass Overview map, open the Level Blueprint and copy the entire selection that I have provided. Just in case, please make sure on your end that the Set Vector Parameter Value node in this blueprint has MPC_PositionReference chosen under “Collection” and Player_Position chosen under “Parameter Name”. This is true by default.

With the selection copied, load your own level and open its Level Blueprint. Paste the selection you had copied earlier, and then Compile and Save the Level Blueprint. That should be it. If this still does not work, you can replace the “Get Player Pawn” node at the beginning of the blueprint with a reference to your level’s First Person Character.

Testing Notes:

The interaction feature is quite basic and works best with third person perspectives. From a first person perspective, it’s hard to tell if it’s working or not without looking down, however if there are multiple first person players, they can see it working as intended on others. By default, this interactivity only supports one player index (0).

The interaction settings will be more sensitive from a first person perspective, especially when looking down. I recommend an Interactive Bend Strength of no more than 12 and an Interaction Radius of no more than 100 if you are using default grass scaling within a standard first person project. If the grass is scaled smaller, these settings can be exaggerated further to taste.

If you have any other technical problems, let me know! I hope this was helpful. Also, thank you for your kind words and support.

Best regards!

Thanks for the tips, I got it to work for a rolling sphere reference and it looked great. Still not working for player, but I have been messing with the default player blueprint and might have altered something the functionality depends on. For example the player is invisible. I’m not worried though, I’ll figure it out.

I am curious though, how would this scale for bending to any physics objects in level… think it would kill performance? Just curious.

Not sure - I do suppose it would depend almost entirely on how many physics objects you are rendering, and how you get their interaction to work with your own custom blueprint additions. There are too many variables for me to give you a conclusive answer, however. I do apologize.

Good luck!

Got another question! Although this one might be more general foliage than yours in particular.

Check this video out, the AO kind of flickers on the grass. Any idea what I could tweak to smooth that out?
Desktop 2018 09 14 15 03 02 01 - YouTube


I have not experienced this myself, and I’m not familiar with your setup. Does this happen to you in my Overview map as well? When did this problem start?

I can only give you some shots in the dark, such as:

  • Have you made any saved changes to the Customizable Grass master material that might have caused something to break?
  • Has your lighting been built/re-built since any changes that you may have made?
  • Have you made any changes to the mesh lightmap resolutions?
  • Does this flickering happen to other foliage in your level?
  • What is your Directional Light mobility set to? What is your foliage paint mobility set to?
  • What is your “Subsurface Occlusion” value set to in the material instance parameters? I suggest keeping the value between 0 and 1.
  • Also check to see if you have made any changes to your Post Processing Volume’s Ambient Occlusion settings.

Sorry that I can’t be of much help, but maybe these suggestions can try to aid your problem solving. I tested my copy and could not recreate your problem.

Wowza lots of stuff to try! Will get on it and let you know. I also should mention I have generate distant fields on in project settings and I have the foliage affecting distant field option on .

Movable sky light and directional light. No static lighting.

It does happen for other trees, so this likely isn’t specific to your grass .

Edit: After some hard googling this seems to closest match my issue:

Which seems to be a core direct x thing! From too many distant field calculations being done, some get culled and it is a hard limit. Will continue tweaking and report back.

It looks kind of like z-fighting though too… but that might be a red herring? There is also stuff to mess with in materials to help distant field calculations resolve overlap in closly knit distant objects, I have noooo idea if adding that info to these meshes would alleviate that.

Looks good and runs very smoothly, even with the high number of textures. But those are easy to remove or channel pack.

BTW I noticed the foliage interaction and snow mask parts in the grass material use texture coordinates instead of vertex colors. Is this intentional or a mistake?

Thanks for the nice review.

Yes to both being intentional. During development, I made the decision to go with interactivity that was functional but simple so that I could focus more on the quality and optimization of the art assets themselves. I am very happy to hear that it runs very smoothly for you!

How would you make this work with one AI type? I have an AI type I want to be moving through grass, not a player

But the sprites are in two rows, giving different and jarring values from the texture coordinate. I simply changed it to use vertex colors since you had already assigned usable values for the wind. The large grass blades cover a small part of the other half too so ‘fmod’ didn’t work.

Most other grass assets were just grass masks on planes so it was nice to find something that looks good and doesn’t kill me with overdraw.

You’re right - thanks for pointing this oversight out to me. I seem to have misunderstood your question at first. A vertex colors hotfix will be submitted today for review.

The only thing I can think of is for you to select your AI mesh in the World Outliner, and then open the Level Blueprint with the interactivity settings. Right click and select “Create a Reference to …”. and then plug it into the target for “GetActorLocation”.

I am not sure if the solution is more elaborate than that when it comes to AI. If this doesn’t work, you may need to consult with the Answers Hub.

This looks great. I do have a question, however. I want to put it in my landscape material. Is this possible?

You can paint these static grass meshes onto your landscape using the Foliage Instanced Mesh system if that’s what you mean. That is how this asset pack was designed to be used. I am not sure if it would be possible to integrate this master material into your landscape master material as they serve two different material functions.


how can we make this interactive with more than one pawn?

Sorry for the late reply! I am subscribed to my support threads, but the forum did not notify me of your question.

There should be something called “Get Player Pawn” in the level blueprint that has a Player Index integer. By default this is set to 0, correspondent to your default player pawn. I believe you need multiple player pawns (0-1,2,3,etc.) to correspond to a player position reference. This will probably not work if you are attempting multiplayer that is not local. I am also not sure how this could be implemented for non-playable characters.

Currently this is only set up for a single offline player. You can read some more information that addresses the interactivity and how it works in more detail here:…02#post1525802