Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Instanced Static Mesh Component AddInstance performaces issue


I'm working on a simple voxel engine for research purposes and for UE4 Learning. I've some experience with other game engines like Unity.

Try to ask my question per points:

  • In my prototype, basically, we would to create the entire world procedurally via Perlin Noise functions, in some way.

  • The world is subdivided by chunks of 16x16x16 blocks

  • At each frame, the engine compute the chunks to spawn, generate it in terms of blocks, create a "InstancedStaticMeshComponent" dinamically and attach it to the Chunk (a simple SceneComponent).

  • For each ISMC created, add all blocks

So the Actor's hierarchy is:

 Actor (World)
 |--Chunk1 (SceneComponent)
 |------ISMC (filled with an instance per block)
 |--Chunk1 (SceneComponent)
 |------ISMC (filled with an instance per block)

The world works well, and the engine generate it correctly in front of the Player.

My problem is about performances. Each time I add blocks (instances) to the chunk (ISMC), 16x16x16 = 4096 instances, there is an Hitch. I can try to work on chunk visibility optimization, but the spawn of a single chunk create an hitch, so I believe something escapes me.

I've checked the Engine code, and somewhere it speacks about Physics, that I absolutely don't need. May be the ISMC try to work on some physics and I can disable it?

Thanks in advance for any kind of tip you can give me. Regards, Marco

Product Version: UE 4.18
more ▼

asked Dec 05 '17 at 11:44 AM in C++ Programming

avatar image

Marco Jacovone
1 1

avatar image Marco Jacovone Dec 09 '17 at 06:21 PM


no one played with these things?

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

I just called SetSimulatePhysics(false) and SetCollisionEnabled(ECollisionEnabled::NoCollision) of the ISM component itself. That seems to disable physics/collision for all the instances.

more ▼

answered May 11 '18 at 09:48 PM

avatar image

4.4k 32 79 42

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question