Announcement

Collapse
No announcement yet.

Runtime Mesh Component

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • replied
    Ah, thanks for the explanation. It's a shame as I'm having to greatly reduce the poly count in my model (from 26k to 600) to make performance reasonable and it doesn't look nearly as good anymore. Tessellation doesn't help either as the result is all lumpy and horrible.

    Leave a comment:


  • replied
    Originally posted by Bob3DGames View Post
    Never mind, I realised I could copy the mesh data initially from a Procedural Mesh component into an array variable in the construction script, do my calculations on that and then update the mesh.

    Unfortunately, despite the claims, updating the RMC is noticeably slower than updating the built-in Procedural Mesh.
    that is an issue we are currently facing as well. He wanted to save on memory, thus he combines normald and tangents into a single struct for internal use. But that needs shitload of calculation time. Especially if you have lots of vertices.

    Leave a comment:


  • replied
    Never mind, I realised I could copy the mesh data initially from a Procedural Mesh component into an array variable in the construction script, do my calculations on that and then update the mesh.

    Unfortunately, despite the claims, updating the RMC is noticeably slower than updating the built-in Procedural Mesh.

    Leave a comment:


  • replied
    Thanks, Koderz, this looks really good. I'm curious though. It seems not to have an equivalent 'Get Section from Procedural Mesh' node (I'm using blueprints atm). I'm not sure how to update an existing mesh in realtime without it. Am I missing something obvious?

    Leave a comment:


  • replied
    Originally posted by bishop86 View Post

    Managed to build, but now when I try to copy a static mesh to runtime mesh I get 'assertion failed'. It's only happening with one mesh though, other meshes work fine. The mesh works fine with the procedural mesh component though...
    Make sure all meshes you want to retrieve the mesh data from are CPU accessible. Open the static mesh in question and use the search bar to search for "CPU".

    Leave a comment:


  • replied
    Originally posted by bishop86 View Post
    Is it possible to use this with the 4.19 flex version of unreal? I've added the plugin to my project but having problems building.
    Managed to build, but now when I try to copy a static mesh to runtime mesh I get 'assertion failed'. It's only happening with one mesh though, other meshes work fine. The mesh works fine with the procedural mesh component though...

    Leave a comment:


  • replied
    Is it possible to use this with the 4.19 flex version of unreal? I've added the plugin to my project but having problems building.

    Leave a comment:


  • replied
    Originally posted by MaximumDup View Post
    There's clearly a shading issue with RMC on 4.20 right now. Comparison with ProceduralMeshComponent :
    I'm having the same issue. It looks like all vertex normal values are coming out positive (comparison shown with a default static cube):

    Leave a comment:


  • replied
    Originally posted by CashCache View Post

    I'm only using one UV channel. Setting it like so:

    Code:
    mesh->SetSectionMaterial(0, material);
    mesh->CreateMeshSection(0, vertices, triangles, normals, UVs, vertexColors, tangents, true, EUpdateFrequency::Infrequent);
    Try setting the material after CreateMeshSection().

    Leave a comment:


  • replied
    There's clearly a shading issue with RMC on 4.20 right now. Comparison with ProceduralMeshComponent :

    Leave a comment:


  • replied
    Originally posted by CashCache View Post

    I'm only using one UV channel. Setting it like so:
    ...
    Click image for larger version

Name:	RMCMaterialTest.PNG
Views:	193
Size:	483.0 KB
ID:	1506603

    Leave a comment:


  • replied
    Originally posted by Rumbleball View Post

    should work. Do you feed the correct UV channel? Code snipped would be good as well.

    Try a basic material. Just a texture, nothing fancy.
    I'm only using one UV channel. Setting it like so:

    Code:
    mesh->SetSectionMaterial(0, material);
    mesh->CreateMeshSection(0, vertices, triangles, normals, UVs, vertexColors, tangents, true, EUpdateFrequency::Infrequent);
    Here's the code I use for creating the PMC mesh with no issues:

    Code:
    mesh->SetMeshSectionCollisionEnabled(0, true);
     mesh->CreateMeshSection_LinearColor(0, vertices, triangles, normals, UVs, vertexColors, tangents, true);
     mesh->SetMaterial(0, material);
    When building the RMC mesh, I have to change the vertexColor and tangent arrays since they use a different structure than the PMC

    Code:
    TArray<FColor> vertexColors vertexColors;
    // instead of
    TArray<FLinearColor> vertexColors;
    
    TArray<FRuntimeMeshTangent> tangents;
    // instead of
    TArray<FProcMeshTangent> tangents;
    I should note that when using the PMC I pass in an empty tangent array. I have tried that with RMC as well, but it makes no difference.

    I'll attempt a basic texture and see how that goes.

    Leave a comment:


  • replied
    Originally posted by CashCache View Post
    Has anyone been able to get the RMC working with materials and UVs? I posted my question to the Discord channel as well, but wanted to see if anyone here has any suggestions.

    When using the RMC in place of PMC, the mesh is created and everything seems to work except it really seems to screw up the UV coords. Here's an example:

    This screenshot is my mesh using PMC. The material being used is an texture atlas and I'm setting the UVs dynamically.

    Click image for larger version Name:	PMCmin.png Views:	1 Size:	306.2 KB ID:	1506338



    Here is the same mesh but this time I'm using the RMC. All the data is exactly the same including the UVs and all other geometry data.

    Click image for larger version  Name:	RMCmin.png Views:	2 Size:	90.7 KB ID:	1506342




    From the looks of this last image, it appears the UVs are all messed up. Does anyone have any ideas?
    should work. Do you feed the correct UV channel? Code snipped would be good as well.

    Try a basic material. Just a texture, nothing fancy.

    Leave a comment:


  • replied
    Has anyone been able to get the RMC working with materials and UVs? I posted my question to the Discord channel as well, but wanted to see if anyone here has any suggestions.

    When using the RMC in place of PMC, the mesh is created and everything seems to work except it really seems to screw up the UV coords. Here's an example:

    This screenshot is my mesh using PMC. The material being used is an texture atlas and I'm setting the UVs dynamically.

    Click image for larger version  Name:	PMCmin.png Views:	1 Size:	306.2 KB ID:	1506338



    Here is the same mesh but this time I'm using the RMC. All the data is exactly the same including the UVs and all other geometry data.

    Click image for larger version

Name:	RMCmin.png
Views:	196
Size:	90.7 KB
ID:	1506342




    From the looks of this last image, it appears the UVs are all messed up. Does anyone have any ideas?
    Attached Files

    Leave a comment:


  • replied
    Can someone please explain the dual/tripple buffer thing? I gues it is for peformance improvements in some cases, but I can't find any documation about it.

    Leave a comment:

Working...
X