Download

Is Instancing groups possible?

Hello. I’m building a huge scene, inside a pressure control room with big pilars (around 60). The pillars are layed out in a specific way, 3 in the first row, 2 in the second, 3 in the third, etc. I’d like to create the first 2 rows in my 3d program (which allows me to offset the specific uvs and get random pattern in the textures), export them as separate mehes, group them in Unreal and instance the group to complete the pillars in the room. Is It possible? If not, other than instancing the pillar one by one, is there another way?
1image3-1.jpg

So, just make what you want in you external program.

Then import and lay it out the way you want in UE.

Then select all the pillars, right click, and choose ‘merge actors’.

In the dialogue that comes up, choose the instancing option:

inst.JPG

and click ‘merge actors’ bottom right.

That’s it :slight_smile:

Ooooh, ok. Great! Thank you! Even if they’re merged, the actors will be considered as separate objects when baking lighmaps then?

Ok, I can’t find the merge mesh with a right-click on the selected objects, It seems that I have to go to “Windows/developer tools/merge actors” now. After that, I have the options to instance the newly created actor and choose to instance after 1, 2 ,3 or more copies.

Ok, It works BUT when I bake the lightmap, I get a strange result: As you can see, the first row of column, the one originally converted with merge mesh, display shading errors when the following instances copied from It don’t.

How many pillars total?
unless you are upwards of 10 there should be nearly no perceptible difference in performance between using instances and Not using instances.

That said, because the pillars (first post) seem huge, youll have a hard time getting them to cull with occlusion anyway… i would make sure that they LOD correctly more so than worry about instancing.
At a distance you can probably billboard them or impostor bake them for a somewhat significant gain.

As far as Instancing things goes.
I would suggest a manual approach.

Either:
create a pillar acror.
add a hierarchical instanced mesh component for every pillar variation.
place in level, open the actor and add instances from the details panel.

Or
Set the meshes into the foliage tool.
Spawn the pillars using the foliage tool. (Slightly better occlusion IMHO).

Around 60 pillars, and the ones I used in the example above are lights, the ones i use in the real scene are more detailed. I was just wondering for speed sake how i could build the first 2 complete rows and then instance as one actor (merge errors seems to do the job) them to fill up the rest of the scene.

Another thing, I’m moving the instances with the numeric input for each instance But there is some kind of a increment in the values that prevent the instance to be placed exactly where It should, aligned with another one for instance. How can I fine tune the placement, tried using control, shift, alt, the scrolling wheel of the mice… nothing. Any idea? I can’t even type a value as the It comes back to the previous one once I’m done typing.

The way all the systems work, you are better off with single instances.
otherwise occlusion will almost never function.

The chanches of seeing 0 out of 3 pillars are rather slim.

Yeah, that was surely a newbie choice.
So the way I do It in the end (and It works in my scene) I’m using an empty actor to host the instancer, add the “instanced static mesh” then pick the model I want to instance from the list and move / rotate the pillars so that there is no obvious repetition in the textures pattern. (It would be great to have move/rotate and scale gizmo on the instances instead of having to play with the numeric inputs, but that’s a detail.). Is It the correct way to do It?
Thank you.

hum… no.
use the hierarchical instanced static mesh component.
because it allows for LODs and occlusion. It will cost less to render.

the rest is correct. I dont think you can move instances in the level, but usually i instance them via code…

Ok, I see… I’m going to look for tutorials on hierarchical instanced static mesh , thank you for pointing me in the right direction.
.