Any way to transform a procedural mesh to static mesh

Any way to convert “out other half proc mesh” to a simples “static mesh” reference?

https://dl.dropboxusercontent.com/u/18152273/procmesh_staticmesh.png

I not found a way to make this conversion inside the blueprint. Any idea?

In C++ thats is possible?

best regards.

I’m trying to do in C ++ seemingly easier. Create a function as “CopyProceduralMeshFromStaticMeshComponent” giving input other ProceduralMeshComponent. Any idea. We were thankful. Remembering we do not want to reference the other half of the proceduralmesh but a new piece no parent.

Working xD thks. Forget It.

So, can you share your solution? This is marked as the correct answer, but there is no answer at all. People who are having the same problem still read this thread. Thanks for help!

I created a function inside UE4, because some variables needed was private in
that time, don´t know in new versions, without access by the project. I try pull request but not accepted. The solution code for me:

Create a function inside ProceduralMeshComponent.cpp

void ProceduralMeshComponent::CloneProcMesh(UProceduralMeshComponent* ProcMeshSource, bool bDestroyProcMeshSource)
     {
     if (ProcMeshSource != nullptr)
     {
     		this->ClearAllMeshSections();
     		int32 NumSections = ProcMeshSource->GetNumSections();
     		for (int32 SectionIndex = 0; SectionIndex < NumSections; SectionIndex++)
     		{
     			TArray<FLinearColor> DummyColors;

     			FProcMeshSection NewSection = ProcMeshSource->ProcMeshSections[SectionIndex];
			
     			this->SetProcMeshSection(SectionIndex, NewSection);
     		}
     
     		//// SIMPLE COLLISION
     
     		// Clear any existing collision hulls
     		this->ClearCollisionConvexMeshes();
     		this->CollisionConvexElems = ProcMeshSource->CollisionConvexElems;
     		this->UpdateLocalBounds();
     		this->UpdateCollision();
     		
     		//// MATERIALS
     
     		for (int32 MatIndex = 0; MatIndex < ProcMeshSource->GetNumMaterials(); MatIndex++)
     		{
     			this->SetMaterial(MatIndex, ProcMeshSource->GetMaterial(MatIndex));
     		}
     		if (bDestroyProcMeshSource)
     			ProcMeshSource->DestroyComponent();
     
     	}
     }

and declare ProceduralMeshComponent.h

/** Clone ProceduralMeshComponent. */
 UFUNCTION(BlueprintCallable, Category = "Components|ProceduralMesh")
 void CloneProcMesh(UProceduralMeshComponent* ProcMeshSource, bool bDestroyProcMeshSource);

So I have my blueprint with ProceduralMeshComponent. I build this one and I send into the function and the new piece to get my blueprint with a new part of sliced object.

Link to a test vídeo:
[link text][1]
[1]: Unreal Engine 4: Procedural Mesh within the game Usha - Princess of The End. - YouTube

You haven’t mentioned a word about static mesh in your code; can be more helpful than that

1 Like