Announcement

Collapse
No announcement yet.

Runtime Mesh Component

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

    The snapshot of the last downloaded from github gives build error:
    RuntimeMeshComponent\Source\RuntimeMeshComponentEditor\Private\RuntimeMeshComponentDetails.cpp(28): error C2228: left of '.GetSelectedObjects' must have class/struct/union
    RuntimeMeshComponent\Source\RuntimeMeshComponentEditor\Private\RuntimeMeshComponentDetails.cpp(28): note: type is 'const IDetailsView *'
    RuntimeMeshComponent\Source\RuntimeMeshComponentEditor\Private\RuntimeMeshComponentDetails.cpp(28): note: did you intend to use '->' instead?

    Replacing . with -> makes it buildable, but leaves doubts...

    Comment


      Yes that's the fix for the latest 2.0.
      George Rolfe.
      Technical Coordinator at Orbit Solutions Pty Ltd.

      Comment


        Originally posted by duke22 View Post
        Did some include fixes in V3

        You probably have unity build on which hides these errors.

        https://github.com/GeorgeR/RuntimeMe...ee/Version3Dev
        Thank you for doing that duke22

        I couldn't get this to compile though, I got a ton of errors about things not being 16-bit aligned (need use const & for those parameters)


        I also tried the absolute latest on git, and could not get it to compile in 4.17 due to the unity build issues as well as other errors even after I attempted the unity build fixes myself.

        Thank you so much for this plugin Koderz I can't wait to try update 3 when it will compile for 4.17+

        Thanks again!



        Rama
        UE4 Marketplace: Melee Weapon Plugin & Compressed Binary Save System Plugin | Rama's C++ AI Jumping Videos | Vertex Snap Editor Plugin

        ♥ Rama

        Comment


          Originally posted by Rama View Post

          Thank you so much for this plugin Koderz I can't wait to try update 3 when it will compile for 4.17+
          I'm probably not using the latest release on github, but I am running V3 in UE 4.18.3.

          Comment


            Originally posted by Rama View Post

            Thank you for doing that duke22

            I couldn't get this to compile though, I got a ton of errors about things not being 16-bit aligned (need use const & for those parameters)


            I also tried the absolute latest on git, and could not get it to compile in 4.17 due to the unity build issues as well as other errors even after I attempted the unity build fixes myself.

            Thank you so much for this plugin Koderz I can't wait to try update 3 when it will compile for 4.17+

            Thanks again!



            Rama
            Hey Rama,

            I've applied those unity build fixes duke22 did several commits back. Granted I haven't tested it again since I added a couple things, but I'll check that later if I have some time.

            Right now v3 should run fine on 4.17 and 4.18. I have a local branch for 4.19 since some RHI stuff changed but that should show up on GH soonish. As far as I know it will compile fine for windows/linux/html5. I don't have the ability to test mobile/console so can't guarantee those. What platform/compiler are you using that's complaining about 16-bit alignment? If you can send me the error output I'll gladly take a look.
            Runtime Mesh Component - The best way to render procedural/runtime created meshes! - Version 4.1 out now!

            Come talk about anything RMC or Procedural Mesh Related in our Discord!

            Comment


              I've been testing out UE4 for a few months now trying to validate how well it would work for a project. Really like the runtime mesh component and was testing out V3. I can't seem to get collisions to work in a packaged build. Works fine in the editor. I know you said it needs async cooking to work, is there something special I have to do to make that work?

              Thanks!

              Comment


                Think I got it, though it was a little fun to find. I was calling SetCollisionUseAsyncCooking(true) right after I created the RMC (NewObject<URuntimeMeshComponent>()) figuring I would set it there to be sure. For some reason that doesn't seem to work and the underlying bUserAsyncCooking was getting set from the post load. Seems to work fine if I call SetCollisionUseAsyncCooking(true) right before I call CreateMeshSection.

                Thanks so much for this plugin, I'm coming from Unity and all the infrastructure I had built there around doing this very thing, unreal looks much more promising.

                Comment


                  Originally posted by alfiare View Post
                  Think I got it, though it was a little fun to find. I was calling SetCollisionUseAsyncCooking(true) right after I created the RMC (NewObject<URuntimeMeshComponent>()) figuring I would set it there to be sure. For some reason that doesn't seem to work and the underlying bUserAsyncCooking was getting set from the post load. Seems to work fine if I call SetCollisionUseAsyncCooking(true) right before I call CreateMeshSection.

                  Thanks so much for this plugin, I'm coming from Unity and all the infrastructure I had built there around doing this very thing, unreal looks much more promising.
                  Yeah there's some usability improvements I want to do to a couple of those things. I don't like the part where I had to move those settings down into URuntimeMesh but that's a side-effect of trying to separate mesh data from the component so multiple components could share it. Glad you got it to work. Not quite sure why that'd be changed in postload, where was that happening? I'm going to try to push a PR to Epic this weekend to solve that issue but that's still likely to take weeks to months to get into a released version of the engine. When I do that though I'll push the PR into my GitHub fork of the engine for anyone willing to compile the engine themselves.

                  I might actually force async cook on known engine versions that are broken for synchronous cook. I actually have an idea on a way to get around it, but it's far from ideal and tricky to setup but I might still do it for the interim.

                  Btw: Welcome to UE4! I gave up on Unity for this type stuff a long time ago simply because I couldn't make it do what I wanted!
                  Runtime Mesh Component - The best way to render procedural/runtime created meshes! - Version 4.1 out now!

                  Come talk about anything RMC or Procedural Mesh Related in our Discord!

                  Comment


                    Originally posted by Koderz View Post

                    Hey Rama,

                    I've applied those unity build fixes duke22 did several commits back. Granted I haven't tested it again since I added a couple things, but I'll check that later if I have some time.

                    Right now v3 should run fine on 4.17 and 4.18. I have a local branch for 4.19 since some RHI stuff changed but that should show up on GH soonish. As far as I know it will compile fine for windows/linux/html5. I don't have the ability to test mobile/console so can't guarantee those. What platform/compiler are you using that's complaining about 16-bit alignment? If you can send me the error output I'll gladly take a look.
                    Hi there! Thank you for the reply Koderz

                    Sorry for the confusion, I was compiling the RMC plugin using the Clang workflow that is used to compile plugins for Marketplace distribution, and I had to modify the build.cs of the RMC modules to negate the -iwyu flag that the UE4 CLang batch file defaults to:

                    Code:
                    //Add to build cs's
                    PCHUsage = PCHUsageMode.UseSharedPCHs;
                    CLang auto-build workflow for UE4 Plugins:

                    !!! Make sure to run this batch file inside of an empty folder called PluginStaging, the batch file nukes anything in its path !!!
                    Code:
                    "C:\Program Files\Epic Games\UE_4.18\Engine\Build\BatchFiles\RunUAT.bat" BuildPlugin -Plugin="E:\YOURPROJECTPATH\Plugins\RuntimeMeshComponent\RuntimeMeshComponent.uplugin" -Package="%CD%\RMC18" -Rocket
                    I use this workflow for all my plugins to generate all binaries for a plugin for all platforms I want to support, I was initially told about this tool by Marketplace staff when code plugins first became a thing.

                    whitelisting so the batch tool works:

                    Code:
                    //.uplugin
                     "Modules": [
                        {
                          "Name": "RuntimeMeshComponent",
                          "Type": "Runtime",
                          "LoadingPhase": "Default",
                                "WhitelistPlatforms" :
                                [
                                    "Win64",
                                    "Win32"
                                ]
                        },
                    If I compile RMC as part of my project it works fine

                    ~~~

                    formal parameter with requested alignment of 16 won't be aligned

                    Originally posted by Koderz View Post
                    What platform/compiler are you using that's complaining about 16-bit alignment? If you can send me the error output I'll gladly take a look.
                    Regarding the 16-bit alignment, I still get those errors when compiling for Win32 using the Clang workflow for plugins, and it errors out on the following:

                     
                    Spoiler



                    Solution:

                    The easy solution is to just make sure these parameters become const &

                    So here's an example from RuntimeMeshBuilder

                    Code:
                    FORCEINLINE static void WriteNormalTangentPackedRGBA16N(int32 Index, FVector4 Value, TArray<uint8>* Data, int32 Stride, int32 Offset)
                        {
                            return Write<FPackedRGBA16N>(Index, Value, Data, Stride, Offset);
                        }
                    becomes

                    Code:
                    FORCEINLINE static void WriteNormalTangentPackedRGBA16N(int32 Index, const FVector4& Value, TArray<uint8>* Data, int32 Stride, int32 Offset)
                        {
                            return Write<FPackedRGBA16N>(Index, Value, Data, Stride, Offset);
                        }

                    Why It's Important

                    The reason this bit alignment matters as far as I know is if anyone is using the RMC plugin on consoles like XBox or shipping win32 builds

                    Epic's Ben Marsh explains here:
                    https://answers.unrealengine.com/que...ign16-won.html



                    Thank you again for the RMC, and thank you for the new version of the RMC you are making, URuntimeMesh for multiple components = awesome!!!



                    Rama
                    Last edited by Rama; 03-11-2018, 02:46 PM.
                    UE4 Marketplace: Melee Weapon Plugin & Compressed Binary Save System Plugin | Rama's C++ AI Jumping Videos | Vertex Snap Editor Plugin

                    ♥ Rama

                    Comment


                      4.19 of Pre Version 3 or after Version 3?

                      Anyone have a working version of RMC for 4.19, possibly even pre-version 3?

                      I tried to do the update but I am getting a crash on attempt to access the tangent data:

                      Code:
                      void FLocalVertexFactoryShaderParameters::SetMesh(FRHICommandList& RHICmdList, FShader* Shader, const FVertexFactory* VertexFactory, const FSceneView& View, const FMeshBatchElement& BatchElement, uint32 DataFlags) const
                      {
                      SetSRVParameter(RHICmdList, VS, VertexFetch_PackedTangentsBufferParameter, LocalVertexFactory->GetTangentsSRV());
                      I presume I have to indicate somehow when tangent data is not present

                      Someone made an issue related to this:
                      https://github.com/Koderz/RuntimeMes...nent/issues/87

                      I know Koderz mentioned making a 4.19 branch, I was hoping to not pressure him and see if we could figure it out while waiting



                      Rama
                      Last edited by Rama; 03-13-2018, 02:04 AM.
                      UE4 Marketplace: Melee Weapon Plugin & Compressed Binary Save System Plugin | Rama's C++ AI Jumping Videos | Vertex Snap Editor Plugin

                      ♥ Rama

                      Comment


                        Originally posted by Rama View Post
                        4.19 of Pre Version 3 or after Version 3?

                        Anyone have a working version of RMC for 4.19, possibly even pre-version 3?

                        I tried to do the update but I am getting a crash on attempt to access the tangent data:

                        Code:
                        void FLocalVertexFactoryShaderParameters::SetMesh(FRHICommandList& RHICmdList, FShader* Shader, const FVertexFactory* VertexFactory, const FSceneView& View, const FMeshBatchElement& BatchElement, uint32 DataFlags) const
                        {
                        SetSRVParameter(RHICmdList, VS, VertexFetch_PackedTangentsBufferParameter, LocalVertexFactory->GetTangentsSRV());
                        I presume I have to indicate somehow when tangent data is not present

                        Someone made an issue related to this:
                        https://github.com/Koderz/RuntimeMes...nent/issues/87

                        I know Koderz mentioned making a 4.19 branch, I was hoping to not pressure him and see if we could figure it out while waiting



                        Rama

                        As a warning, this isn't going to be an easy fix, and may require a drastic structural change in how the RMC works. It appears the StaticMesh Rendering now uses 4 independent buffers, {Position}, {Normal/Tangent}, {UVs}, {Color} and each has an associated SRV with their datatype. Since the position/tangents/uvs/colors don't share a datatype I think it might be required to keep them in separate buffers now. This isn't exactly hard to support, and it'd be nearly invisible for anyone using the blueprint API, or the MeshBuilder, but that'd be the end of single/dual/triple buffers and it'd just become a quad buffer full time, so if you set the mesh data with the single array of FRuntimeMeshVertexSimple it'd end up having to split it, so that'd slow that function down a bit, same with dual buffer, same with triple. So the best solution would be to pretty much rely entirely on the meshbuilder from this point forward and deprecate out all the old API but not sure that's what I want to do. Will have to investigate this more once I have some more time.
                        Runtime Mesh Component - The best way to render procedural/runtime created meshes! - Version 4.1 out now!

                        Come talk about anything RMC or Procedural Mesh Related in our Discord!

                        Comment


                          Originally posted by Koderz View Post


                          As a warning, this isn't going to be an easy fix, and may require a drastic structural change in how the RMC works. It appears the StaticMesh Rendering now uses 4 independent buffers, {Position}, {Normal/Tangent}, {UVs}, {Color} and each has an associated SRV with their datatype. Since the position/tangents/uvs/colors don't share a datatype I think it might be required to keep them in separate buffers now. This isn't exactly hard to support, and it'd be nearly invisible for anyone using the blueprint API, or the MeshBuilder, but that'd be the end of single/dual/triple buffers and it'd just become a quad buffer full time, so if you set the mesh data with the single array of FRuntimeMeshVertexSimple it'd end up having to split it, so that'd slow that function down a bit, same with dual buffer, same with triple. So the best solution would be to pretty much rely entirely on the meshbuilder from this point forward and deprecate out all the old API but not sure that's what I want to do. Will have to investigate this more once I have some more time.
                          Nuts, I'm trying to get a packaged build working of 4.17 with RMC 2 with using light propagation volume, the packaged build doesn't work in 4.17. (This issue: https://issues.unrealengine.com/issue/UE-49205).

                          It got fixed for 4.19 but then I can't use RMC, I'm thinking to reproduce the change in 4.17 made to make LPV work, but I've never edited or compiled the engine before, anyone who can deduct what files I'd need to change?

                          Edit: I'm trying to just comment out the assert that makes it fail, no idea what it'll do though.
                          -> This resulted in the packaged build being able to run, but lpv didn't work. Guess I'm waiting for 4.19 then.

                          When opening my project I get a message stating that I need to rebuild the RMC plugin, after agreeing it rebuilds the entire engine, how do I prevent that behaviour?
                          Last edited by housekiller; 03-13-2018, 11:33 AM.

                          Comment


                            Originally posted by Koderz View Post
                            So the best solution would be to pretty much rely entirely on the meshbuilder from this point forward and deprecate out all the old API but not sure that's what I want to do. Will have to investigate this more once I have some more time.
                            Thank you for letting me know Koderz, and thank you again for your work on the RMC



                            Rama
                            UE4 Marketplace: Melee Weapon Plugin & Compressed Binary Save System Plugin | Rama's C++ AI Jumping Videos | Vertex Snap Editor Plugin

                            ♥ Rama

                            Comment


                              For those of you wondering if I'm going to support 4.19... Yes, but unfortunately it might be a little bit, due to some non-trivial changes in the engine. For more information see here...

                              https://github.com/Koderz/RuntimeMes...nent/issues/87
                              Runtime Mesh Component - The best way to render procedural/runtime created meshes! - Version 4.1 out now!

                              Come talk about anything RMC or Procedural Mesh Related in our Discord!

                              Comment


                                Originally posted by Koderz View Post
                                For those of you wondering if I'm going to support 4.19... Yes, but unfortunately it might be a little bit, due to some non-trivial changes in the engine. For more information see here...

                                https://github.com/Koderz/RuntimeMes...nent/issues/87
                                Thank you for the update Koderz, if there's anything I can do to help let me know!



                                Rama
                                UE4 Marketplace: Melee Weapon Plugin & Compressed Binary Save System Plugin | Rama's C++ AI Jumping Videos | Vertex Snap Editor Plugin

                                ♥ Rama

                                Comment

                                Working...
                                X