Announcement

Collapse
No announcement yet.

Need info on Hierarchical Instanced Static Mesh Components

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

    #16
    I don't know whether this is working the way it should.

    I have a HISMC and there are some speedtree trees inside. They are moving with the wind.

    But every time I add a new tree to the HISMC, the wind movement get's reset to 0. This is how it looks with one new tree per second:





    I need to add and remove trees while the game runs, not only 1 per second but more like 10 per second. Then it looks as if there would not be any wind. How can I fix this?
    Easy to use UMG Mini Map on the UE4 Marketplace.
    Forum thread: https://forums.unrealengine.com/show...-Plug-and-Play

    Comment


      #17
      Originally posted by Zeustiak View Post
      I think I missed this when you posted it, so I apologize.

      The problem we are having is that we are trying to use the HISM node, but FPS drops from 55 to 6 with a mere 30K HISM trees in the world. Each is a speed tree with 3-4 LOD's all the way down to the billboard. The LODs transition, and don't seem to make a difference on FPS, whether the trees are in billboard or not.

      It seems like we either don't know how to use the node, or it is broken in blueprint.

      We use the AddHISMComponent node, then use it to set a variable of the HISM type. We then feed that into AddInstance. It should be pretty straightforward, yet the results are pretty bad.
      I've uncovered the same issue - have you tested it with no collision on the HISMC? When there's no colliders the performance is phenomenal! However, it would appear that the HISMC does not cull colliders and therefore even when it is completely culled, or LOD'ed out to a mesh with no collider you incur a massive cost because colliders still are present on each instance even the culled ones. I confirmed this because I was able to trace to an HISMC that was completely distance culled.
      Trevor Lee

      Comment


        #18
        Originally posted by Hyperloop View Post
        I've uncovered the same issue - have you tested it with no collision on the HISMC? When there's no colliders the performance is phenomenal! However, it would appear that the HISMC does not cull colliders and therefore even when it is completely culled, or LOD'ed out to a mesh with no collider you incur a massive cost because colliders still are present on each instance even the culled ones. I confirmed this because I was able to trace to an HISMC that was completely distance culled.
        Hmm, I will have to check on that. And you mean collision on, or even just having a collision mesh? Don't need any collision whatsoever for these trees either way.
        Map Generator 1.0
        Map Generator 2.0
        Map Generator 3.0

        Comment


          #19
          I finished an extensive tutorial on Hierarchical ISMs yesterday. A lot of setup tips & troubleshooting included. So I hope it makes some things more clear

          Tech Art Aid tutorials - shaders, procedural techniques, optimization

          Comment


            #20
            Originally posted by Oskar Świerad View Post
            I finished an extensive tutorial on Hierarchical ISMs yesterday. A lot of setup tips & troubleshooting included. So I hope it makes some things more clear

            Very informative. Thank you!
            Contact me: (Steam: Neillithan) (E-mail: neilvmoore@gmail.com)

            Comment


              #21
              Bit sad at the moment, spent a couple of weeks integrating a HISM with a scalar field to do a galaxy.

              I crank the instance count up in the HISM past a couple of hundred, performance goes through the floor, and if I select the actual HISM component it takes my whole computer down (hard).

              Btw I'm using 4.14, has anyone else had any luck/problems with HISM in this version?

              Comment


                #22
                [MENTION=5535]Oskar Świerad[/MENTION]: Hey! Thanks for the explanation video, really helped understand how all of that works. Now I have one question: in the foliage tool you can randomize the scale of trees for example but you say in the video that you should not change the scale and leave it at 1.0 since it can cause some issues. Is it no longer instanced once you change the scale value ? Why does it work in the foliage tool ?

                Now I'm currently trying to create an environment system using my own trees which can grow and change state (dry, wet, burned etc.) at runtime. How would be the best approach on doing this ? I thought about a blueprint which spawns HISMs , create the variables for the "age" of each instance and let them increase by a timer (simulating the growth at runtime). But I guess this would also "break" instancing ? Do I need to have different static meshes for the different "ages" of the trees ? Can I even change the material to be "wet" on a group of instances ? I'm a bit lost here

                Thanks in advance!

                *Update* I removed and added instances at runtime (made them bigger) . This seems to work as long as I don't remove/add too many instances at once (to avoid lag spikes)
                Last edited by IceDealer; 02-15-2017, 10:25 AM.

                Comment


                  #23
                  Hi [MENTION=30556]IceDealer[/MENTION]! I meant the scale of the entire object containing the HISM component. With scale other than 1, culling and LOD calculations went haywire in my tests.

                  Replacing trees to bigger ones could be imitated with multiple HISMs. Delete an instance from "Small Trees" HISM and create one in the same place in a "Big Trees" HISM.

                  As for changing materials - you're right, you can't do it directly because it breaks instancing. But you can mix multiple material functions or texture sets in a single material! You can check my next video, where I explain it:

                  Tech Art Aid tutorials - shaders, procedural techniques, optimization

                  Comment


                    #24
                    Hi. I am currently trying to create a system for randomized, modular level geometry with small elements like wall-segments that get re-used many times.

                    It seems that a HISMC is the way to go, but I don't know how to handle collisions. I need info on which instance gets hit in order to implement destructible walls etc.
                    Is there even a way to get the index of the instance for overlaps or collisions from the component?

                    I'm not sure I understand previous posts correctly. Should colliders in HISMC/ISMC be completely avoided, because of a lack of culling functionality?
                    Would it be best to use seperate, individual colliding actors (that don't render) for every "element" instead?

                    Comment


                      #25
                      [MENTION=189843]MaxPower42[/MENTION]: https://www.youtube.com/watch?v=bOjYP-c4qhA&t=759s

                      Basically, you'd create the collision in an actor which is "linked to" a HISM instance.
                      You can also download their project and open the "WeakBrickCollision" blueprint to see what they did.

                      Cheers,
                      Dave

                      Comment


                        #26
                        Now I'm confused. Let's say I had the money and resources to create a city (much like GTA5) and needed thousands of different buildings. Would I create a Blueprint Actor with multiple HISM Components to build those buildings (with modular pieces) or better just use Static Mesh Components ? In the TechArtAidUE4 project you are using Static Mesh Components to build your buildings but wouldn't instances of those "parts" be better performance wise ?

                        Does the building in the TechArtAidUE4 project have LODs ?
                        Last edited by IceDealer; 07-06-2018, 08:12 AM.

                        Comment

                        Working...
                        X