Can I create grass from code ? And where do I look to learn the systems needed

So I was looking for a grass system I like and stumbled uppon this video:

https://youtu.be/bp7REZBV4P4?si=Bs5wbD9G2JvLgYeo

I really love how it turns out and want to create it myself but in unreal engine. However all the tutorials on grass always use grass cards and I don’t know where to look to generate grass purely from code as he does.

In generall there are a few things I don’t know where to start looking in unreal:

  1. How do I create meshes from code?
  2. How can I create a brush to place them and make the ammount of meshes visible by player distance. (In his video he explains how the number of triangles aswell as blades reduce, based on the distance to the player, and merge to fewer triangles and fewer grass… What systems would I need in unreal ?)
  3. How I would add the animation via code?

He’s talking about shader code. So, code you enter in the material.

Actually, I think he talking about procedural grass AND shader code.

So you can use PCG and material code.

But, I have to ask, WHY!? :joy:

Here’s something on procedural meshes

The rest you might be able to make with material nodes, but if you can’t then use

1 Like