Could I save performance by turning these identical window frames into a duplicated union?

The wooden window frame in the attached image is used hundreds of times throughout my map. My question is, since all of these window frames are identical, could I increase performance by converting them all into a duplicate union?

This union would need to have default collision settings.

Thanks for any insights :slight_smile:

2 Likes

You could save performance by turning them into a Meshpart rather than a Union. You simpy just select all the wooden parts, then group them, then export the model as a .obj file. Afterwards you insert a Meshpart and insert the file into the Meshpart.

You can see here why using a Meshpart is better.

1 Like

Meshes or Unions for Parts with wood grain means the created item would have all the wood grain going the same way. I’d hate to see that. Wood grain should travel the length of the board to be more realistic.

Also why would the Union need default collision settings? In a case like this I’d make all the internal window Parts CanCollide off so that the game wouldn’t have to calculate collisions for them, and just make the 1 window glass section CanCollide on with a BlockMesh in it to make it appear thinner.

1 Like

I would suggest against using unions because of corruption reasons… Mesh parts are a better choice in my opinion.

1 Like

I’ve seen many devs suggest this lately, and while it’s good advice it’s always missing the part where the developer should clean up the new mesh’s interior geometry in modelling software before re-uploading it into the game. If they were to just turn a model into a mesh, then use the mesh without any further changes, they’d have made a ton of redundant geometry for their game.

It’s an important detail to include, so please include this in your post to avoid further confusion :slight_smile:

5 Likes

If I were to make the window frame have box collision, you wouldn’t be able to zoom out of the window and look at your character from outside (which is a feature I’d like to keep).

1 Like

Ah, in a case like that I put a Transparent Part in the window with the CanCollide on, and make the rest of the Parts CanCollide off.

1 Like