Blender Foliages for Unreal Engine 5

This Blender Foliages for Unreal Engine 5 guide provides insights into the process, addressing potential issues, demonstrating the creation of a weight mask through Vertex Color, and explaining the implementation.

Create 3D projects in Blender. So how is greenery created in these projects? You can find all the details from the problems in creating foliage to the wind, from masks to colors in the Blender Foliages for Unreal Engine 5 guide below.

This is the guide VARANEU it was created by. You can find the author’s link at the end of the guide.

Blender Foliages for Unreal Engine 5

In this Blender Foliages for Unreal Engine 5 guide you will learn: how to create a foliage for import into Unreal Engine 5, what problems you may encounter, how to make a weight mask using Vertex Color, how to set wind for grass, etc.

Getting Started Creating a Mesh and Setting up a Material in Blender

Start

First, we need to create a Mesh using the keyboard shortcut Shift + A and select Plane.

[EN] Foliages for Unreal Engine 5

We set the dimensions to 1 m to make it easier to navigate further when working with Mesh.
After creation, go to the Shading tab and create a new material. I advise you to immediately set Specular to 0 and Roughness to 1 so that the texture is visually displayed exactly the same as in any other texture editor.

[EN] Foliages for Unreal Engine 5

Textures

In my case, I will use textures drawn by myself in the style of Pixelart, but you can take textures from the Internet on free services. Let’s look at the example of creating cattail. In the Shading tab in the existing material, add the Image Texture node and attach our texture to it.

[EN] Foliages for Unreal Engine 5

Then we go to UV Editing and adjust our UV to the required area. Next, if necessary, we can cut our texture into several squares (I usually do this to maintain proportions and prevent different pixels, to create greater variety of the object, and also to create more Vertex for further work with them, o which I will definitely tell you) RMB on the object -> Subdivide -> select the number of cuts (in my case there are 128 pixels per meter, so I cut the area 7 times to make 16px squares)

[EN] Foliages for Unreal Engine 5

Possible Problems

Already at this stage you could encounter a number of problems. Don’t worry, everything can be solved.

  • I don’t see the texture!Z -> Material Preview (if that doesn’t help, check the material and node connections. If everything is ok, then perhaps when creating Mesh removed the checkbox from the Generate UV item, just check it in the corresponding window)
  • My textures are not transparent, but black! – Connect the node with the texture to the alpha channel, go to Layout -> Material -> Setting -> Blend Mode and switch to Alpha Blend. There is a chance that this will not help, try switching between windows, Texture Painting for example.
    [EN] Foliages for Unreal Engine 5
  • I didn’t have enough Mesh size! – Extrude, stretch, scale, create – adjust to the required size. You most likely already know about such things.

Create Foliage

Distribution of Foliage Parts

Now we have the texture, material and all the necessary pieces of our cattail ready. Select a separate leaf, stem, etc., press Y. Thus, we have separated these particular faces from the entire mesh, check this by moving (G) this cut piece. If it doesn’t catch anything behind it, then everything is done correctly. We do this with each part of the plant being represented.

[EN] Foliages for Unreal Engine 5

Model Construction

Next we compose our plant. Tip: duplicate the object plane to connect two identical parts at 90 degrees “+”. This way you will show the volume from all sides. This is how most of the grass and plants in games are made, take the same Minecraft.

[EN] Foliages for Unreal Engine 5

We can bend the leaves and depict them in an arc, in general, we use references and make our idea, use your imagination and your spatial thinking!

[EN] Foliages for Unreal Engine 5

You can delete the excess Delete – Faces

Vertex Color or “How to add mass to an object”

Preliminary Preparation

Once the foliage meets our aesthetic requirements, it must be prepared for export. The Vertex Color Master by Andrew Palmer addon will help us a lot.
The addon[blender-addons.org]

Working with Vertex Color

Go to Vertex Paint editing mode. Select Viewport Shading filled circle.

[EN] Foliages for Unreal Engine 5

There are three colors in total: red, green and blue (what a surprise), as well as alpha channel. I’m using red, you can choose any of the three.

By setting up the brush, we get: red = 1, black = 0. That is, we set the mass of vertices from 0 to 1, where 0 is the stationary part, 1 is the most moving part. Having a sufficient number of vertices, we begin to display the mass of our cattails. I’ll do it very simply: I put 0 at the root with a smooth transition to 1. Thus, the higher the branch/leaf, the more it will sway in the wind. Oh yes, we do all this so that the wind in Unreal Engine 5 works correctly.

[EN] Foliages for Unreal Engine 5

Possible problems 2.0

So, if you get both a texture and a red and black mask when you change the viewport shading, then you’re doing great and are on the home stretch. If you have problems, you can easily solve them right now.
list]

  • Vertexes are not painted, the color is not selected, nothing works! – Perhaps your version of Blender does not automatically create a Vertex Group. To create, go to Data -> Vertex Groups and create a vertex group by clicking on “+”. Now everything should work EXACTLY.
  • I chose a different color. Is this critical? – If this color is not from the RGB squad, then I would not take risks and would simply choose what the addon offers.
  • Will this mask be saved on the model? – Yes, it will definitely be saved in .fbx format.

Export .fbx, import into UE5

Now we export the file from Blender in the format .fbx. To do this, go to File -> Export -> .fbx

[EN] Foliages for Unreal Engine 5

I advise you to experiment with the settings, the only thing worth doing is unchecking Add Leaf Bones and Bake Animation. This is superfluous and we don’t need it. In the Geometry tab we see Vertex Colors -> sRGB. Let’s leave it as it is.

Next, go to UE5, create or open a project, click Import, select our Mesh.fbx. Let’s look at import settings.

Mesh

I uncheck everything because it’s not necessary. But if you are making high-polygonal vegetation with high-resolution textures, then I advise you to familiarize yourself with Nanite (even though this system does not work everywhere, it is really useful and interesting to learn, I’ll leave you here).

[EN] Foliages for Unreal Engine 5

Advanced

Everything is simple here: LOD – Foliage, and replace our Vertex Color so that everything works.

[EN] Foliages for Unreal Engine 5

Material

[EN] Foliages for Unreal Engine 5

Miscellaneous

An important part of imports. If you create more than one foliage on the scene, but several, then you need to turn off Convert Scene so that your objects are at coordinate 0;0;0. When “seeding” an area, this will help you avoid flying foliages on higher ground.

[EN] Foliages for Unreal Engine 5

In general, that’s all, click Import and you’re done!

Possible problems 3.0

  • Objects are rotated relative to the axes! – When exporting, change the axis Forward -> X Forward, and Up -> Z Up. If this doesn’t help, but something has changed, experiment.
    [EN] Foliages for Unreal Engine 5
  • Too much material(s) were not imported/imported! – Check the file again in Blender, and also check the import settings in UE5. If, after importing, you see too many duplicate materials, you should delete them in Blender, and assign the necessary materials to all objects.
  • Objects appeared as Sceleton Mesh! – Check the export settings in Blender and the item above (Export)

Setting Texture, Material, Foliages in UE5

Let’s move on to the sweetest part – a total check of the correctness of our actions. I’ll say right away that if you make pixel textures, then:
1. Go to texture. On the right we see Level of Detail ->Texture Group and put 2DPixels(Unfiltered) there. This will remove all anti-aliasing filters from the texture and solve the blurring issue.


[EN] Foliages for Unreal Engine 5

2. Scroll below and see Compression -> Compression Settings and set UserInterface2D(RGBA). This will allow us to get rid of the color distortion of our texture.


[EN] Foliages for Unreal Engine 5

In exactly the same way, you can choose the best add-ons for your texture in your opinion.

h1]Material[/h1]
As for customizing the material: your imagination is in your hands! Or in my head… It doesn’t matter. I will only show the base that will help you create wind by using Vertex Color and SimpleGrassWind.
In the material itself, in the window on the left, set Blend Mode -> Masked and Two Sided true. The first makes our texture transparent (similar to the setting in Blender), and the second allows us to draw the texture on both sides so that our foliages are more voluminous and do not cut into the player’s view.


[EN] Foliages for Unreal Engine 5

We repeat everything indicated in the screenshot. As you can see, Vertex Color we connect exactly the color that you chose to Intensity, which will indicate the intensity of the wind in certain vertices. Speed and Weight are Wind playback Speed ​​and Wind Weight, you can change these scalars to find the best value for yourself.


[EN] Foliages for Unreal Engine 5

Drawing with Foliages. Result

So we come to the end. All that remains is to figure out how we can still display our cattails. Go to UE5 in Landscape Mode (Shift + 2) and create a landscape: select the desired size and click Create.


[EN] Foliages for Unreal Engine 5

Next, go to Foliage Mode (Shift + 3). Drag our Mesh from the Content Browser to the Add Foliage Here tab on the left. Set up the brush and paint with our foliages. Be sure to check the performance of the wind!


[EN] Foliages for Unreal Engine 5
[EN] Foliages for Unreal Engine 5
[EN] Foliages for Unreal Engine 5
[EN] Foliages for Unreal Engine 5

Written by VARANEU

Leave a Comment

Your email address will not be published. Required fields are marked *