Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

AnswerHub Maintenance

Background maintenance is scheduled to occur between 9 - 11am EDT on Tuesday, May 21. Site operation may be slower than normal during this time and a brief interruption in operation may be observed

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?

alt text

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

In C++ thats is possible?

best regards.

Product Version: UE 4.13
more ▼

asked Sep 15 '16 at 08:40 PM in Blueprint Scripting

avatar image

58 9 7 13

avatar image I-BGS-I Sep 18 '16 at 07:05 PM

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.

(comments are locked)
10|2000 characters needed characters left

2 answers: sort voted first

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)
              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->CollisionConvexElems = ProcMeshSource->CollisionConvexElems;
              //// MATERIALS
              for (int32 MatIndex = 0; MatIndex < ProcMeshSource->GetNumMaterials(); MatIndex++)
                  this->SetMaterial(MatIndex, ProcMeshSource->GetMaterial(MatIndex));
              if (bDestroyProcMeshSource)

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]: https://youtu.be/1kco1a2ZcVk

more ▼

answered Aug 13 '17 at 09:04 PM

avatar image

58 9 7 13

avatar image Paul_LTC Dec 02 '18 at 06:17 PM

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

(comments are locked)
10|2000 characters needed characters left

Working xD thks. Forget It.

more ▼

answered Sep 19 '16 at 01:31 AM

avatar image

58 9 7 13

avatar image Axzz Aug 13 '17 at 10:38 AM

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!

(comments are locked)
10|2000 characters needed characters left
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question