Announcement

Collapse
No announcement yet.

Runtime Mesh Component

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

  • replied
    Hey Koderz, thanks for the update.

    There is an small code issue with the 2UV channel function in RuntimeMeshData.cpp

    Code:
    void FRuntimeMeshData::CreateMeshSectionFromComponents(int32 SectionIndex, const TArray<FVector>& Vertices, const TArray<int32>& Triangles, const TArray<FVector>& Normals,
        const TArray<FVector2D>& UV0, const TArray<FVector2D>& UV1, TFunction<FColor(int32 Index)> ColorAccessor, int32 NumColors,
        const TArray<FRuntimeMeshTangent>& Tangents, bool bCreateCollision, EUpdateFrequency UpdateFrequency, ESectionUpdateFlags UpdateFlags,
        bool bUseHighPrecisionTangents, bool bUseHighPrecisionUVs, bool bWantsSecondUV)
    {
        SCOPE_CYCLE_COUNTER(STAT_RuntimeMesh_CreateMeshSectionFromComponents);
    
        FRuntimeMeshScopeLock Lock(SyncRoot);
    
        // Create the section
        auto NewSection = CreateOrResetSectionForBlueprint(SectionIndex, false, bUseHighPrecisionTangents, bUseHighPrecisionUVs, UpdateFrequency);
    ...
    Code:
    void FRuntimeMeshData::CreateMeshSectionFromComponents(int32 SectionIndex, const TArray<FVector>& Vertices, const TArray<int32>& Triangles, const TArray<FVector>& Normals,
        const TArray<FVector2D>& UV0, const TArray<FVector2D>& UV1, TFunction<FColor(int32 Index)> ColorAccessor, int32 NumColors,
        const TArray<FRuntimeMeshTangent>& Tangents, bool bCreateCollision, EUpdateFrequency UpdateFrequency, ESectionUpdateFlags UpdateFlags,
        bool bUseHighPrecisionTangents, bool bUseHighPrecisionUVs, bool bWantsSecondUV)
    {
        SCOPE_CYCLE_COUNTER(STAT_RuntimeMesh_CreateMeshSectionFromComponents);
    
        FRuntimeMeshScopeLock Lock(SyncRoot);
    
        // Create the section
        auto NewSection = CreateOrResetSectionForBlueprint(SectionIndex, bWantsSecondUV, bUseHighPrecisionTangents, bUseHighPrecisionUVs, UpdateFrequency);
    ...

    Leave a comment:


  • replied
    Hey Everyone!

    As of now, RMCv3.2 on GitHub fully supports UE4.17-4.20. After some more testing and documentation I'll push that to the Marketplace to bring that version back up to date.

    I've posted some additional information in the README in GitHub and also the first post in this thread, and will be updating the wiki documentation soon. I can use as many people testing it as possible and would love feedback on any issues you find as well as what platforms you've tested it on so I can see what platforms it's known to work on!

    There is a new Discord server for the RMC you can find here: https://discord.gg/KGvBBTv I tend to post most things there first and try to respond pretty quickly to questions/suggestions/comments so feel free to drop in!


    The RMC takes a substantial amount of time and effort to build and maintain. There's many more things I'd like to do it with, and other related tools I'd like to build. As much as I like just working on it, the reality is there's other things I can do with my time. To be able to justify the time commitment, I'm asking for support. Additionally I will be releasing an extended version of the RMC in the, hopefully, near future that just brings additional abilities, and useful tools to the RMC. The current "community" version will remain free, but the extended version will not be.

    To find out more information on how to support the project, and on the upcoming extended RMC, see here!
    Last edited by Koderz; 06-20-2018, 02:00 PM.

    Leave a comment:


  • replied
    Originally posted by MrCheese View Post
    Yeah, that's what I'm using. AFAIK, it's not a material deformer, it's working on the mesh directly.

    I'll explain what I'm doing, that might help. I have a project that we use for sciencey work that allows you to change the the shape of a person with 20+ morph targets. I can get loads of useful data, but ideally I'd like to be able to take measurements of the body shape after various morphs have been applied. Everything I've got to work so far just gets me the base mesh shape. I suspect that the new version of the skeletal mesh might help, but I'm not a very experienced programmer and got stuck when ComputeSkinnedPositions wanted me to stop rendering before reading data.

    Your idea will work if I rebuild the morphs using RMC, so thanks for that. I was hoping this plugin had a portion for reading data from existing meshes, but it doesn't seem that way.
    I yet did not work with skeletal meshes. I gues that the visual transform of the skeletal mesh you see when playing is rendering only + updates of the collision volumes for physics, otherwise you would need to transform all meshdata for every skeletal mesh every frame on the CPU.

    There is a function to retrieve the mesh data of a static mesh. I gues its called GetSectionFromStaticMesh or something like that.

    Leave a comment:


  • replied
    Yeah, that's what I'm using. AFAIK, it's not a material deformer, it's working on the mesh directly.

    I'll explain what I'm doing, that might help. I have a project that we use for sciencey work that allows you to change the the shape of a person with 20+ morph targets. I can get loads of useful data, but ideally I'd like to be able to take measurements of the body shape after various morphs have been applied. Everything I've got to work so far just gets me the base mesh shape. I suspect that the new version of the skeletal mesh might help, but I'm not a very experienced programmer and got stuck when ComputeSkinnedPositions wanted me to stop rendering before reading data.

    Your idea will work if I rebuild the morphs using RMC, so thanks for that. I was hoping this plugin had a portion for reading data from existing meshes, but it doesn't seem that way.

    Leave a comment:


  • replied
    Originally posted by MrCheese View Post
    Does this plugin allow me to work with a mesh that's had morph targets applied to it? Collision doesn't update when morph targets applied and I *really* need to be able to do something like that. Nothing I've done so far get the vertex data out of a mesh that accounts for morph targets.
    Are you refering to this? https://docs.unrealengine.com/en-us/...s/MorphTargets
    I know there is morph target stuff with animation setups as well. But did not work with it.
    At least with the material version: Vertex position changes with material does not affect collision as it is only rendering data. Don't know whats the case with animation stuff.

    If you realy need that with the RuntimeMesh, export your Mesh in its original and morphed states. Then write some logic that interpolates (not big of a deal, node/functions are already there) the mesh data (Vertex, normals. tangents (and colors if needed)) between the original and the morphed. Destroy the mesh section and Create it again (dunno if collision update is possible with UpdateMeshSection). This however can get quite expensive depending on the complexity of the mesh and number of meshes you need to update per frame. Maybe Destroy and Create only if the morph value (interpolation alpha) delta is to high, update in the meantime, depending on your collision accuracy need.

    Leave a comment:


  • replied
    Does this plugin allow me to work with a mesh that's had morph targets applied to it? Collision doesn't update when morph targets applied and I *really* need to be able to do something like that. Nothing I've done so far get the vertex data out of a mesh that accounts for morph targets.

    Leave a comment:


  • replied
    How can I get the runtime mesh section out of the runtime mesh component? Just like you do with static or procedural? I need to read vertices and triangles data in order to copy it into another mesh section. Thanks

    Leave a comment:


  • replied
    Hey everyone! I’ll have more of an update soon but for now I just wanted to open up a new discord server dedicated to the RMC. It’s far faster to get my attention that way and easier for me to respond as well as for people to be able to help each other.

    https://discord.gg/KGvBBTv

    ill be posting more information there first and more frequently.

    PS there is a 4.19 and 4.20 update coming soon.
    Last edited by Koderz; 06-18-2018, 03:11 PM.

    Leave a comment:


  • replied
    So, 4.20 is adding 3 addition UV channels for the Procedural Mesh Component. 4.19 on the left and 4.20 on the right.

    Leave a comment:


  • replied
    Hello Koderz, I'm running into a few problems with flipped and invisible faces when trying to update the Runtime Mesh Component; for some reasons these problems only happen in the packaged version of our project though and not in the editor. Are you aware of any such issues that are specific to packaged projects and/or might you be able to help me out with these problems if I provide you with a detailled description of what is going wrong?

    Leave a comment:


  • replied
    Hi, my packaged project crashes after I use SetRuntimeMesh.
    We work with the custom UE 4.18 using the plugin from github. The RuntimeMeshes are initialized at the begin and stored inside a map for later use. When we spawn a new Actor with a RuntimeMeshComponent and set the RuntimeMesh of the RuntimeMeshComponent we are able to see the mesh for a few frames.
    Inside the editor, everything works like a charm.

    Any ideas?

    PS: Thank you Koderz for this amazing plugin ♥

    Edit: I figured out it's not SetRuntimeMesh. The Game crashes after the actor with the runtimemeshcomponent gets set to a new location.
    Last edited by janouschSB; 05-25-2018, 10:56 AM.

    Leave a comment:


  • replied
    Hey guys. I've been using this plugin for a while. Even contributed to make it compatible with 4.17 once upon a time.
    https://github.com/Koderz/RuntimeMeshComponent/pull/61

    Could you please explain where 50% memory reduction is coming from? Is there some tricky stuff with collision cooking? Or smth else?

    Leave a comment:


  • replied
    Originally posted by Rumbleball View Post

    Tried today as we were still on 4.16 and tons of crashes and bugs kept me from continuing work. Thus I now forced the project update to 4.19 and stuck on this stuff :/
    Had no compile errors but crashes as you mentioned. Could easily fix one, but now I get crashes in rendering stuff.
    I found this Bug Entry, that is exactly my issue I get with the RuntimeMesh. Seems to be a general issue with dynamic mesh rendering.
    https://issues.unrealengine.com/issue/UE-56516
    Fix is 4.20 ...

    This seems related to: https://github.com/Koderz/RuntimeMes...nent/issues/87

    Leave a comment:


  • replied
    Originally posted by BurakCognite View Post

    We managed to get rid of compile errors, but unfortunately still getting crashes. Better to wait Koderz's offical update.

    Burak
    Cognite Inc.
    Tried today as we were still on 4.16 and tons of crashes and bugs kept me from continuing work. Thus I now forced the project update to 4.19 and stuck on this stuff :/
    Had no compile errors but crashes as you mentioned. Could easily fix one, but now I get crashes in rendering stuff.

    Leave a comment:


  • replied
    I'm really eager to see this be updated to 4.19, I've done extensive work to my projects in 4.19 and I'm not sure if its viable or even possible to rollback a version without losing a lot of progress.

    I'm using procedural mesh component for a large pocedurally generated open world terrain mesh but its is really slow loading sections limiting the overall size of the world and making instantiated areas that require a level change an impossibility because the load time on the terrain will take forever. So the forums have brought me here in hopes that you may have a solution.

    Thanks for your contribution.

    Leave a comment:

Working...
X