**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.
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.
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.
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.
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.
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!
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.
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.
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.