#[ProBuilder] Performance differences between probuilder and imported models

1 messages · Page 1 of 1 (latest)

rustic gale
#

I want to ask about the differences between probuilder and models imported from blender (or any other modelling software).
Is creating stuff with probuilder the exact same as using a blender fbx? For example, if I create 10 different houses with probuilder (each of them is constructed by extruding a single probuilder mesh) then is it the same as importing 10 different houses from blender?
I am specifically talking about the differences in the size of the game, memory used, batching etc. Even if it is a very little difference, I am interested in knowing. For example the blender models will appear as prefabs in your assets folder so wouldn't these take more memory or increase build size or something?
Source 2's hammer editor's meshes are extremely efficient so probuilder could do it like they do, but I don't think this is the case?

Could the developers of probuilder elaborate on the things I said and the technical details of potential build size or performance or memory usage (during runtime) differences when compared to importing blender models?

tender anvil
#

Hi @rustic gale, thanks for the question. We're not experts in how Blender exports its meshes but there's definitely going to be topological differences in some way or another as the underlying data structures do not match 1:1. Though I'll say that ProBuilder does try to actively optimize its meshes, for example, merging coincidental vertices when that's possible in order to reduce vertex count. Generally, ProBuilder meshes will take more memory and scene space in the editor as it serializes extra data to support the modelling operations, however this extra data can be stripped off for builds.

What I'd stress the most is that, unless the ProBuilder mesh GameObject is converted to a prefab, even if the extra data is stripped, the unity mesh will stay serialized in scene - this can heavily increase the scene's footprint and load times. Converting to prefab moves the unity mesh data from scene and onto the prefab asset. This improves can improve things a lot especially when you have many duplicate meshes. On the otherhand, ProBuilder does not support prefab overrides well and therefore all modifications should be applied (vs kept as overrides) and if variations are needed then, unfortunately, each should be converted to unique prefab.

rustic gale
tender anvil
#

Yes, as soon as you have any duplication of meshes, using prefab instead of regular scene objects will improve performance, at least from the standpoint of scene load time and memory footprint.

rustic gale
tender anvil
#

For example, if you have 1 tree mesh that you modelled in PB and you copy/pasted it 100 times in the scene, then all these 100 instances will serialize separate into the scene. By contrast, if it was a prefab, then all what's serialized in the scene would be the GO copies and the prefab instance data pointing to the mesh data on the prefab asset. If there's no duplication then the gains should be none or negligible.