Need info on Hierarchical Instanced Static Mesh Components

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?

[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 :frowning:

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)

Hi @IceDealer! 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! :slight_smile: You can check my next video, where I explain it:

https://.com/watch?v=J5LXIApQmzA

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?

@MaxPower42: https://www…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

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 ?