Open LoipesMas opened 1 year ago
Oh right, because the colliders are added through the physics server when the transforms are generated, they're not saved in the scene.
The easiest way to fix this is to disable Show output on tree
(keep the other settings as is) and add a ScatterCache
node to the scene instead.
(Also, make sure you manually create the cache folder in res://addons/proton_scatter/cache
if you're using the asset lib version, that's something I fixed this morning, so it's only on the GitHub version for now)
Thanks for the quick response!
The easiest way to fix this is to disable
Show output on tree
(keep the other settings as is) and add aScatterCache
node to the scene instead.
This technically works, but sadly it is as slow as Force rebuild on load
without the cache.
Both of them take ~8 seconds to fully load my scene. Pre-baked (i.e., Show output on tree
enabled) is pretty much instant.
This would suggest that the multi-mesh generation is the slow part. Also Create copies
and Use particles
render modes load faster than instancing, which supports that claim. I would test that hypothesis, but I don't know how to profile that (built-in Godot profiler has failed me).
Turns out the slow part was LOD Generation. If I disable it (in the ScatterItem
node), the scene loads fast! About as fast as the pre-baked setup.
Would it be possible to keep the pre-baked meshes (with their already generated LODs), but re-generate colliders, using the ScatterCache
? Otherwise I'll have to work around the lack of LOD generation or accept the long load times.
I can probably store it on the cache too. I'll look into it.
I would like to have working colliders and pre-bake my multi-mesh instances.
Current situation
Currently (with the version from AssetLib), with the following settings:
Show output in tree
:On
Render mode
:Instancing
Keep static colliders
:On
Force rebuild on load
:Off
there are no colliders in-game. If I enable
force rebuild on load
, the colliders are created, but then there is a long load time (I have a big map with lots of props). I can also useCreate copies
render mode, but that has obvious performance impact.Expected result
Colliders are either also pre-baked, or created on load time (assuming that generating just the colliders would take less time than full rebuild)
I hope that this is technically feasible. Maybe going through the pre-baked multi-mesh instances on load, extracting data from them and creating colliders based on that? Or maybe pre-baking intermediate
CollisionShape3D
nodes and on load adding them directly to thePhysicsServer
?It's probably related to #111
PS: Thanks for the great addon! :heart: