Hello I am trying to optimize the performance for my game. Working here with railings and fences containing multiple parts… but I’m having a hard time deciding whether I should continue putting individual parts of my models in one union and set collision fidelity to box/hull, or just keep the multiple parts as is?
another follow up question… which is more better for performance… putting multiple parts in a model? or putting multiple parts in a folder?
Mutliple parts would be better since it’s not trying to load the union from the cloud. If you’re not gonna modify the model and want to keeo it singular, you can also make it a mesh (more optimized than unions). Also, model vs folder is no difference other than sorting preference.
This isn’t really right. You shouldn’t use 100 parts over 1 single union, generally - especially if it’s an asset that is going to be reused. Roblox’s instancing for meshes also applies to unions, I think - so a single union (or ideally a mesh) would likely be far better.
Not only that, but you’ve presented it very one-sided. There’s positives and negatives to both, potentially, and I’d say it leans more in favour of unions in this case.
Can you send a picture of the fence/railing? @PERMAFROST194
I imagined simple wooden fences or simple metal railings in this case. As mentioned, it all comes down to how detailed the model is needed. My idea is that, if the same pattern of the fence is repeated, a mesh is the best option (because of instancing). Unions, other than being a really niche resource of Roblox’s, is not that performant. Because, when you get asked this question:
you get the impression one wants maximum performance.
We don’t have many details to go off of here.
For this type of model, regular parts suit your best need. If you want you can use unions to change the support’s color without selecting hundreds, it’s mostly preference. Roblox was indeed built to support a medium amount of parts in a singular space. There’s always more ways to optimize a game, such as streaming, which works best with separate parts.
You might be thinking about how Unions were many years ago. They have been improved significantly since then. I wouldn’t call them “really niche”.
Of course, meshes would be the best way to go, but if that’s not an option, unions or regular parts can suffice.
In the case of that image @PERMAFROST194 I’d make it into a few Unions with the CollisionFidelity set to Box or Hull, or maybe even disable collision entirely if people aren’t going to be touching it. There are a few sections of that which could be made into a single union and then copy+pasted, which would boost performance.
Alternatively, you could also use an image for the grating, but it may not look as nice. Would definitely be more performant though.
If you do use Parts though, definitely turn collisions off for them if they’re not going to be interacted with.
Going even further, a Texture instance would be the most optimal. Just needs the right “singular line” image and boom. Ofcourse, material shading gets nullified using this method
fyi just converting to mesh wouldn’t do anything performance-wise, you have to actively optimize the actual mesh in something like blender, whether it be decimating or simplifying topology, getting rid of faces etc.
as per your situation, as mentioned previously you could turn this group of parts into a union if you’re planning to use it several times elsewhere, however it wouldn’t be any significant boost in performance (if at all) compared to leaving it as is, this isn’t a very complex model and shouldn’t cause any major issues (in both cases turning off collisions and setting box geometry is optimal)
if you’re still unsure, the best way to test any performance concern alike to get a definite answer would be to simply open a new file, paste this model a couple of hundred times and check the performance, then do the same for the union version.
in general part-building if done correctly, should rarely be an issue perfomance-wise, personally I only ever use unions nowadays if it’s for some specific (but simple) shape, achievable with csg operations (and is too simple to open blender for), or making materials appear seamless in for ex. walls.
for what you’re doing I wouldn’t worry about performance so much, you can always come back & re-optimize things later