Announcement

Collapse
No announcement yet.

Runtime Mesh Component

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

  • replied
    Originally posted by DasMatze View Post
    Thank you [MENTION=37074]Rumbleball[/MENTION] (and [MENTION=141752]Koderz[/MENTION] of course)! I finally found some time to test it and it works. I didn't know "sections" in static meshes were referring to material sections. Now I can finally make a very old project of mine happen.
    Glad that I could help. I could not achive most of the stuff without startup help from the community.

    Leave a comment:


  • replied
    Thank you [MENTION=37074]Rumbleball[/MENTION] (and [MENTION=141752]Koderz[/MENTION] of course)! I finally found some time to test it and it works. I didn't know "sections" in static meshes were referring to material sections. Now I can finally make a very old project of mine happen.

    Leave a comment:


  • replied
    Thanks for the update wilberolive, didn't realise it could take as long.

    Leave a comment:


  • replied
    Koderz mentioned that it had been submitted to the marketplace for 4.16 over two weeks ago now. Epic doesn't take that long, so I'm guessing something went wrong. We had the same issue with 4.15 too. Took about a month or so before it was updated on the marketplace.

    Leave a comment:


  • replied
    [MENTION=141752]Koderz[/MENTION], have you figured out what the future plans are for RMC? Love this plugin, hope you continue with it, great work. Any update on a asset store 4.16 release?

    Leave a comment:


  • replied
    StaticMesh->GetMaterial, select the section. When putting the data into the runtime mesh make a section per material. On Merge: Check every section if the material already is in, if not create new section. Put the mesh data into the same section.

    You can just append vertices data (Location, UV, normal tangent), triangle data needs to be offset to where the vertices data has been placed. Depending on what you are going to do, you might need to take care of the section sizes, as update times for the RuntimeMesh might grow to big. We have 50.000 vertices per section max with a resulting update time of 5ms.

    Also make sure that you define a max radius from the stuff that you want to merge with the RuntimeMesh, as a single RuntimeMeshComponent counts as one Object. If there is just a little bit of the merged objects visible on the screen, the whole RuntimeMesh is taken into account for rendering.

    If you need to get single meshes back out again, keep references to startindex and length of the data of every single mesh.

    Leave a comment:


  • replied
    Originally posted by Rumbleball View Post
    One Material per section. If you want a face (triangle) to have a drifferent material, you would need to write it into another section.
    Thanks for the information!

    Since I cannot get any material information from "Get Section From Static Mesh", I assume there is no way to merge a bunch of static meshes (each with multiple materials) placed in the scene into some runtime meshes (one for each material) using blueprint, right?!

    Leave a comment:


  • replied
    Originally posted by DasMatze View Post
    Is it possible to use multiple materials? When converting from a static mesh component, it correctly uses multiple materials but I see no way of defining which triangle uses which material index or slot when manually adding sections.
    ...
    One Material per section. If you want a face (triangle) to have a drifferent material, you would need to write it into another section.

    You would need to add the vertices information to the other section as well for that face(location, normal, tangent, uv), no matter if smoothed or not. This is exactly how unreal handles different materials. You can check that by modeling a cube, setting it to smooth and importing it. Then set a different material to one face and import it again. Smoothed one material = 8 verts, smoothed two materials = 12 verts.

    Leave a comment:


  • replied
    I know you are halting work until more information. But... is it actually working on 4.16? It is not in the marketplace.

    Also, the example doesn't seem to function on 4.16.1
    Last edited by Neseface; 06-09-2017, 10:53 PM.

    Leave a comment:


  • replied
    Is it possible to use multiple materials? When converting from a static mesh component, it correctly uses multiple materials but I see no way of defining which triangle uses which material index or slot when manually adding sections.

    Also when using "Get Section From Static Mesh", it crashes in 4.15:
    Code:
    UE4Editor_RuntimeMeshComponent!FRuntimeMeshComponentVerticesBuilder::Reset() [d:\build\++portal+main+full\sync\localbuilds\plugintemp\hostproject\plugins\runtimemeshcomponent\source\runtimemeshcomponent\public\runtimemeshbuilder.h:860]
    UE4Editor_RuntimeMeshComponent!URuntimeMeshLibrary::GetSectionFromStaticMesh() [d:\build\++portal+main+full\sync\localbuilds\plugintemp\hostproject\plugins\runtimemeshcomponent\source\runtimemeshcomponent\private\runtimemeshlibrary.cpp:408]
    UE4Editor_RuntimeMeshComponent!URuntimeMeshLibrary::GetSectionFromStaticMesh() [d:\build\++portal+main+full\sync\localbuilds\plugintemp\hostproject\plugins\runtimemeshcomponent\source\runtimemeshcomponent\private\runtimemeshlibrary.cpp:463]
    UE4Editor_RuntimeMeshComponent!URuntimeMeshLibrary::execGetSectionFromStaticMesh() [d:\build\++portal+main+full\sync\localbuilds\plugintemp\hostproject\plugins\runtimemeshcomponent\source\runtimemeshcomponent\public\runtimemeshlibrary.h:14]
    When I use the same node from the procedural mesh, it works (but I can't use the tangents output).

    Leave a comment:


  • replied
    I get the same errors when I tried adding the source version to my project. I eventually gave up and am now just waiting for the marketplace version to be updated, which is taking a loooong time for Epic, which is the usual case for any plugin update. Epic needs a better system for rolling out updates faster.

    Leave a comment:


  • replied
    When trying to build this plugin from a custom UE4 4.15 source build (via VS 2015), I'm getting the following output:

    Code:
    40>------ Build started: Project: MinidumpDiagnostics, Configuration: Development_Program x64 ------
    37>  Performing full C++ include scan (building a new target)
    37>  Creating makefile for UE4Editor (no existing makefile)
    37>  Building UnrealHeaderTool...
    37>  Target is up to date
    37>  Deploying UnrealHeaderTool Win64 Development...
    37>  Total build time: 0.34 seconds (NoActionsToExecute executor: 0.00 seconds)
    37>  Parsing headers for UE4Editor
    37>    Running UnrealHeaderTool UE4Editor "D:\UE4\SourceBuild\4.15\UnrealEngine\Engine\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor.uhtmanifest" -LogCmds="loginit warning, logexit warning, logdatabase error" -Unattended -WarningsAsErrors
    37>  Reflection code generated for UE4Editor in 8.8219289 seconds
    37>D:\UE4\SourceBuild\4.15\UnrealEngine\Engine\Plugins\Marketplace\RuntimeMeshComponent\Source\RuntimeMeshComponent\Private\RuntimeMeshComponent.cpp(1): error : Expected RuntimeMeshComponent.h to be first header included.
    37>D:\UE4\SourceBuild\4.15\UnrealEngine\Engine\Plugins\Marketplace\RuntimeMeshComponent\Source\RuntimeMeshComponent\Private\RuntimeMeshComponentPlugin.cpp(1): error : Expected RuntimeMeshComponentPlugin.h to be first header included.
    37>D:\UE4\SourceBuild\4.15\UnrealEngine\Engine\Plugins\Marketplace\RuntimeMeshComponent\Source\RuntimeMeshComponent\Private\RuntimeMeshCore.cpp(1): error : Expected RuntimeMeshCore.h to be first header included.
    37>D:\UE4\SourceBuild\4.15\UnrealEngine\Engine\Plugins\Marketplace\RuntimeMeshComponent\Source\RuntimeMeshComponent\Private\RuntimeMeshGenericVertex.cpp(1): error : Expected RuntimeMeshGenericVertex.h to be first header included.
    37>D:\UE4\SourceBuild\4.15\UnrealEngine\Engine\Plugins\Marketplace\RuntimeMeshComponent\Source\RuntimeMeshComponent\Private\RuntimeMeshLibrary.cpp(1): error : Expected RuntimeMeshLibrary.h to be first header included.
    37>D:\UE4\SourceBuild\4.15\UnrealEngine\Engine\Plugins\Marketplace\RuntimeMeshComponent\Source\RuntimeMeshComponent\Private\TessellationUtilities.cpp(1): error : Expected TessellationUtilities.h to be first header included.
    37>D:\UE4\SourceBuild\4.15\UnrealEngine\Engine\Plugins\Marketplace\RuntimeMeshComponent\Source\RuntimeMeshComponentEditor\Private\RuntimeMeshComponentDetails.cpp(1): error : Expected RuntimeMeshComponentDetails.h to be first header included.
    37>D:\UE4\SourceBuild\4.15\UnrealEngine\Engine\Plugins\Marketplace\RuntimeMeshComponent\Source\RuntimeMeshComponentSlicer\Private\RuntimeMeshComponentSlicer.cpp(1): error : Expected RuntimeMeshComponentSlicer.h to be first header included.
    37>D:\UE4\SourceBuild\4.15\UnrealEngine\Engine\Plugins\Marketplace\RuntimeMeshComponent\Source\RuntimeMeshComponentSlicer\Private\RuntimeMeshSlicer.cpp(1): error : Expected RuntimeMeshSlicer.h to be first header included.
    37>  Build canceled.
    37>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.MakeFile.Targets(41,5): error MSB3073: The command "..\..\Build\BatchFiles\Build.bat UE4Editor Win64 Development -waitmutex" exited with code 1.
    I've tried swapping/correcting the ordering of each header, but it just generates a much larger list of errors, all of which are from the RuntimeMeshComponent source files (ie, the rest of the engine builds perfectly fine).
    Perhaps the issue here is related to "RuntimeMeshComponentPluginPrivatePCH.h" not actually being the PCH for the project? IDK. Aside from a full GitHub build of RMC, I've also tried installing it via the launcher's marketplace, and then manually copying "UE_4.15\Engine\Plugins\Marketplace\RuntimeMeshComponent" to the same location in my custom source build.
    It yielded the same issues. Note that the plugin works perfectly fine in a normal, non-source engine build...

    One thing I haven't tried is simply creating a new UE4 project (from the custom build's project launcher), and then adding the plugin into that project's folder. But this is tedious, having to do this for every new project I create.
    Not to mention, what a waste of disk space having multiple copies of the same thing all over the place. I'd much rather have the marketplace version, complete with slicer support, etc, literally built into my custom engine source's plugins folder.

    So, how can I achieve this? What am I doing wrong?

    Leave a comment:


  • replied
    I just installed it on 4.16.1 without problems.(vs2015)

    Leave a comment:


  • replied
    Originally posted by Koderz View Post
    I assume you mean 4.16? If so then yes it's submitted to the marketplace team so it'll probably take a few days before it shows up.
    Just checking, did you get the confirmation email about it this time?

    I tried installing the plugin from the source, but it throws a whole bunch of compile errors about headers not being in the right order. It looks like the RMC source hasn't been updated to use the new 4.16 build targets or the whole "include what you use" movement started in 4.15.

    Leave a comment:


  • replied
    Originally posted by Koderz View Post
    I'm not currently moving forward with the new features until I verify what the RMC's place is in all of this.
    Sounds pretty reasonable to me. That trello post is a bit of an odd ball. Keep us posted man.

    Leave a comment:

Working...
X