Too many similar actors causing lag

So… in order to create a roof, I made tile for tile. Like this:

But all I have now is lag. There is something I can do to make, I don’t know, all of them be just one object to increase my fps?
If there is no way, how can I make a roof like that? (I’m knew at UE)

No wonder it lags if those are all seperate Meshes o_O

You can make a BP with an InstancedStaticMesh and spawn all Instances inside the Construction script.

…Or just install Rama’s Victory Plugin and do it with a single Key :wink:

while rama’s plugins are awesome, you really need to learn how to build 3d models, get a copy of blender (free) maya or 3ds max (subscription)
blender tutorials
maya tutorials
3ds max tutorial

You can get blender for free on steam http://store.steampowered.com/app/365670/ or in their page http://blender.org (also modo and maya at less a subscription version, but blender is full yours and Open source)

Wow that’s awesome! Thank you.
And I know I need to learn how to build 3d models. I already have blender, but I started like 2 days ago… it will take a little longer to learn. :smiley:

Hint in the mean time you can use pre made things, like on blender swap :wink: (or other sites, but yeah, there is nothing like your own game idea aesthetics, which for me at the moment are difficult to visualise xD for a little game).

Unless you are going to need to manipulate every object separately at runtime, generally it’s a much better idea to use a modeling program like maya, 3dsmax, or blender to create bigger models. Instead of having 400 separate tiles, model and import that roof, or even the entire building as one object. This greatly reduces the overhead that the game engine needs to render the objects in many cases. This is because for each object, a draw call is made to the GPU and these have a certain amount of overhead, so it’s often better to make a few draw calls than it is to make thousands.

Aside from modeling things in bigger sections, instancing is also able to reduce overhead a lot, but it does take a bit more to set up and is generally best for things that you will have a lot of in your scene but with different positions/orientations etc. Generally things like grass, foliage, trees, rocks are good candidates for instancing.

In your example, the reason I’d suggest larger models vs instancing is that the roof tiles probably won’t need to be changing position in respect to one another during your map creation or at runtime, so it’s much better to lower the overhead by importing that roof as one object. The other thing this opens up for you is the ability to handle some of that tile detail in your texture or material instead of using geometry. This can also be a tremendous method for lower overhead in respect to rendering.

I don’t know what is wrong. I can’t install the victory plugin. My editor crashes all the time because of that script lines. It doesn’t matter if the plugin is enabled or disabled, allways crashes. It works only if I comment on the script lines, but the plugin doesn’t work without the script. Already tryed everything that came in mind. Anyone have an idea?