# Procedural Mesh Component Classes and Documentation

**URL:** <https://forums.unrealengine.com/t/procedural-mesh-component-classes-and-documentation/321601>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine\
**Created:** [June 12, 2015, 8:37pm UTC](https://forums.unrealengine.com/t/procedural-mesh-component-classes-and-documentation/321601 "2015-06-12T20:37:14Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bitstalgia](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Bitstalgia](https://forums.unrealengine.com/u/Bitstalgia)\
**Post date:** [June 12, 2015, 8:37pm UTC](https://forums.unrealengine.com/t/procedural-mesh-component-classes-and-documentation/321601/1 "2015-06-12T20:37:14Z")

</div>

Greetings!

I’d like to try this new Procedural Mesh Component … “framework”?.. But the truth is I can’t find the classes nor the documentation to check to know what can I do for real.

Since it’s an experimental feature, I would understand if the docs are lacking. Still, does anyone know which classes are involved? So far I can’t find any UProceduralMeshComponent class… I might be missing an include here, as well.

I’m already working with the [previous approach](https://wiki.unrealengine.com/Procedural_Mesh_Generation), but it would be nice to try and do it with this component.

Thanks!

---

<div class="post-metadata">

**Author:** ![Normalvector](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Normalvector](https://forums.unrealengine.com/u/Normalvector)\
**Post date:** [June 13, 2015, 9:56pm UTC](https://forums.unrealengine.com/t/procedural-mesh-component-classes-and-documentation/321601/2 "2015-06-13T21:56:39Z")

</div>

At the moment I’m not able to access the new procedural mesh component directly from C++, but I’ve been able to get it working by:

- Creating a C++ class which extends AActor. This should contain a TArray of FVector for your vertex positions, and a TArray of int32 to contain your face data (Indices 0,1,2 are the for first triangle, 3,4,5 for second and so on). There should also be a BP-callable UFUNCTION() to load the geometry arrays with the values.

- Create a Blueprint extending the C++ class, and add a ‘Procedural Mesh’ component to it in the editor. Have the event graph call the function to load the geometry, and then the ‘Create Mesh Section’ node to set the geometry for the procedural mesh.

---

<div class="post-metadata">

**Author:** ![Bitstalgia](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Bitstalgia](https://forums.unrealengine.com/u/Bitstalgia)\
**Post date:** [June 15, 2015, 1:57pm UTC](https://forums.unrealengine.com/t/procedural-mesh-component-classes-and-documentation/321601/3 "2015-06-15T13:57:12Z")

</div>

Interesting, That’s exactly what I’m talking about and the lead I was missing as well. I was so focused on C++ that completely overlooked everything Blueprint. I’ll give it a go and while I’m at it, I think I’ll try and dig a little deeper into this “Procdedural Mesh” component’s Blueprint code.

---

<div class="post-metadata">

**Author:** ![plangton](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@plangton](https://forums.unrealengine.com/u/plangton)\
**Post date:** [July 27, 2015, 8:49am UTC](https://forums.unrealengine.com/t/procedural-mesh-component-classes-and-documentation/321601/4 "2015-07-27T08:49:22Z")

</div>

The documentation you can find here : [Procedural Mesh | Unreal Engine Documentation](https://docs.unrealengine.com/latest/INT/BlueprintAPI/Components/ProceduralMesh/index.html)

The procedural mesh component is consist of Four static functions and three member functions, which are all accessible in blueprints. the following is a short description :

Create Mesh Section : Clear all mesh sections and reset to empty state Target is Procedural Mesh Component ( mainly it means that it removes what you already have created.

Clear Mesh Section : Clear a section of the procedural mesh. Other sections do not change index. Target is Procedural Mesh Component ( it means that it remove a section of what you have created, if you have created your mesh in separate steps and with different section index )

Create Mesh Section : Create/replace a section for this procedural mesh component. Target is Procedural Mesh Component ( this is the main function which create your mesh, after which your mesh is visible. normally it is the last function call in your logic )

**Regarding the remaining static function I will just tell the most important one**

Calculate Tangents for Mesh : Automatically generate Normals and Tangent vector array for a mesh UVs are required for correct tangent generation. Target is Kismet Procedural Mesh Library ( this creates the normal and tangent array for you, and you need to pass them to _“Clear Mesh Section”_ function for the lighting and mapping works and be accurate )

**Some point to consider** :

Calculate Tangents for Mesh : function is a very time consuming function, so be careful about when to use it. my advice is to use threading for calling this function.

you need to calculate the followings your self :  
1 - An array of FVector that your data is in.  
2 - An array for the indexed Trianlges  
3 - An array of Vector2 for UV mapping

**Other points** :

If it is possible try to break your mesh in smaller sections and create them separately. for this you need to pass different SectionId to _“Clear Mesh Section”_. this helps your program to be faster.

In case you have a mesh which its size does not change but the value of its points changes, most probably you won’t need to calculate the Triangle index array and UV array in each time you wanna update the mesh.

in case you want some example leave me a comment to share an image of my blueprints.

---

<div class="post-metadata">

**Author:** ![ALECA](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/aleca/32/727963_2.png) [@ALECA](https://forums.unrealengine.com/u/ALECA)\
**Post date:** [August 10, 2015, 6:11pm UTC](https://forums.unrealengine.com/t/procedural-mesh-component-classes-and-documentation/321601/5 "2015-08-10T18:11:53Z")

</div>

plangton i would appreciate some of your examples. Actually i am trying to use this component but have some issues. For example, i am still not able to change normals and i am not sure why.

---

<div class="post-metadata">

**Author:** ![plangton](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@plangton](https://forums.unrealengine.com/u/plangton)\
**Post date:** [August 11, 2015, 10:58am UTC](https://forums.unrealengine.com/t/procedural-mesh-component-classes-and-documentation/321601/6 "2015-08-11T10:58:20Z")

</div>

is sharing blueprint enough ? since I am using a blueprint for calculating the normal and tangents

---

<div class="post-metadata">

**Author:** ![plangton](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@plangton](https://forums.unrealengine.com/u/plangton)\
**Post date:** [August 19, 2015, 12:45pm UTC](https://forums.unrealengine.com/t/procedural-mesh-component-classes-and-documentation/321601/7 "2015-08-19T12:45:55Z")

</div>

the function you are searching to find to use in C++ is in is in KismetProceduralMeshLibrary.h

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_b4bf8ebc](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_b4bf8ebc](https://forums.unrealengine.com/u/anonymous_user_b4bf8ebc)\
**Post date:** [October 29, 2015, 11:34am UTC](https://forums.unrealengine.com/t/procedural-mesh-component-classes-and-documentation/321601/8 "2015-10-29T11:34:23Z")

</div>

I have a simple example of using UProceduralMeshComponent purely in C++. You can view it here:

> **[A new, community-hosted Unreal Engine Wiki](https://forums.unrealengine.com/t/a-new-community-hosted-unreal-engine-wiki/141494)**
>
> After over a year in maintenance mode, the official Unreal Engine Wiki is now permanently offline. These resources now live on a new community-run Unreal Engine Community Wiki — https://unrealcommunity.wiki/! You will be able to find content from...

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_4f1e6bfe](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_4f1e6bfe](https://forums.unrealengine.com/u/anonymous_user_4f1e6bfe)\
**Post date:** [July 17, 2018, 7:30pm UTC](https://forums.unrealengine.com/t/procedural-mesh-component-classes-and-documentation/321601/9 "2018-07-17T19:30:23Z")

</div>

You likely cannot access it because you need to add it as a module. Why I don’t know. Your `*.build.cs` file will need to have a line that looks like this: `PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore", "ProceduralMeshComponent" });`

---

<div class="post-metadata">

**Author:** ![PatrikAutomatic](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@PatrikAutomatic](https://forums.unrealengine.com/u/PatrikAutomatic)\
**Post date:** [September 11, 2020, 8:24am UTC](https://forums.unrealengine.com/t/procedural-mesh-component-classes-and-documentation/321601/10 "2020-09-11T08:24:57Z")

</div>

I would also like some (non auto generated) documentation and examples how to use this in c++. And the old wiki is dead.
