Announcement

Collapse
No announcement yet.

Instance Static Mesh with Spline Component

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

  • [FEATURE REQUEST] Instance Static Mesh with Spline Component

    I tried to build a road with Static mesh Component with Spline Component, but the frame rate drops. I tried to use Instance Static Mesh Component with Spline Component but it doesn't support Instance Static Mesh nor hierarchical Instance Static Mesh either. So I have made it with a Mesh in my 3d modelling program and have Instanced it. If Spline Components supported Instancing, it would help for low end computers.

  • #2
    I second this.
    Spline-Enabled Fence Pack - "Great pack, huge time-saver, top quality and enough variety to really make the assets unique." -Dark Acre Jack
    Destructible Road Signs - "Seriously awesome. Single blueprint for pretty much all the road signs you'll ever need." -thankstipscom
    Zipline/Teleporter/JumpPad - "This is a very flexible system for any project, and really simple to implement." -lunyBunny
    Wooden Storage Pack - "Very good high quality assets and well worth it." -Deathweave
    Digital Portfolio

    Comment


    • #3
      That would indeed help a lot. Any news on this? Is this possible to implement?

      Comment


      • #4
        In very simplified terms, when you want to render a mesh you send off the vertices, the position, rotation, scale, shader data etc. to the GPU and it will take those vertices, transform them to the correct location and draw them. This is done for every single mesh.

        Instanced static meshes work a bit differently - you only send in the vertices and shader data ONCE, but you send a bunch of transforms. The GPU then renders the same mesh a bunch of times. Due to this however you're limited to every single mesh being identical. So unless spline sheer, twist and other deformations are included into the transform being passed on, then this ain't happening.
        Ph'nglui mglw'nafh Cthulhu R'lyeh wgah'nagl fhtagn

        Comment


        • #5
          Yeah, in this case it would require to store (start&end point loc/tangents/scale) in each instance instead of (loc/rot/scale) - and then somehow offset vertex positions based on this... But this is beyond my non-math brain

          Comment


          • #6
            +1 We massively use Spline Meshes in our Project. Better Performance of them would boost our whole game performance.
            Thank you for this awesome Engine!

            Comment


            • #7
              + 1 for this feature from me.

              Spline meshes play a huge role in our project, so I'd be happy for any sort of performance improvement I can get really.

              Comment


              • #8
                I use spline meshes a lot, can we get instancing? After all, it's rare that absolutely ALL meshes would be deformed in some way. There's usually straight sections to the roads/tubes/cables/fences/whatever you're using the spline mesh for.

                Comment


                • #9
                  I would like to have instancing too! With more splines the draw calls and performance is going down and there is for runtime created splines no better solution than instancing.
                  Please could somebody of the Epic-Team give us feedback if this feature request is noticed?

                  Comment


                  • #10
                    Yeah, it is is very strange, that we have a tool, that can't be used for development. Only for visualize the idea

                    Comment


                    • #11
                      Seems pretty impossible to me.
                      Instanced Static Mesh Component does what it says: Instancing.

                      How do you want to instance something that is always unique (your Spline Mesh)?
                      Unless your Splines are the same (just with a different world transform),
                      Last edited by Raildex_; 10-23-2017, 01:40 AM.

                      Comment


                      • #12
                        It is indeed impossible by definition; spline meshes are static meshes that are deformed in the vertex shader and have generated collision geometry (where applicable). They cannot be instanced.

                        We use spline meshes here for things like walls, and it's honestly not a problem, performance is perfectly fine.

                        Comment


                        • #13
                          Originally posted by Raildex_ View Post
                          Seems pretty impossible to me.
                          Instanced Static Mesh Component does what it says: Instancing.

                          How do you want to instance something that is always unique (your Spline Mesh)?
                          Unless your Splines are the same (just with a different world transform),
                          If you are dealing with something like a road network then most of the sections will be exactly the same - straight piece of the road.
                          But anyway, I don't think there is a generic way to solve it. If someone is in real trouble with spline mesh performance, they have to find solution that will work for them.
                          - Like use spline mesh component only for creating collision and bend instances of HISM in material to follow the spline.
                          - Write a custom tool that would analyze spline actor and distribute ISM and Spline Mesh where applicable, aka using HISM on sections with no deformation.
                          - Create instances of your mesh first and then make a tool that would constraint spline "road" only to use your instances.
                          Youtube Channel

                          Comment


                          • #14
                            Adding to the above list, you can generate the geometry in the editor and save it as an asset, then replace those with instances.

                            Comment

                            Working...
                            X