GothicVRProject / GothicVR

Fan project recreating the classic Gothic I and II experience in VR.
GNU General Public License v3.0
24 stars 2 forks source link

Load worlding stops sometimes incomplete #343

Closed JaXt0r closed 2 months ago

JaXt0r commented 2 months ago

image

Different level elements are broken when loading. Setting: Only spawned Vobs.Spots, 1 NPC and the world mesh.

Affected:
Only Devs who want to disable Vobs for faster loading of the game.

Workaround:
When starting game, have at least Vobs+VobType.Light active to spawn the world correctly.

JaXt0r commented 2 months ago

image

It also happens when you deactivate every other FeatureFlag except the world mesh loading and main menu skipping.

JaXt0r commented 2 months ago

If spawning at least VobLights, it's working. Seems like it can't handle mesh separation when there are no lights as of now: image

JaXt0r commented 2 months ago

Ok. So it's related to WorldCreator.MergeWorldChunksByLightCount --> If we have no lights, the Parallel.() calculation gets confused.

JaXt0r commented 2 months ago

Recommendation from Thomas:

Hmm, I guess it will merge the entire world. Not sure yet why it then creates gaps. There are other metrics you could check on, such preventing a merge if the 65k vertex limit would be exceeded. You could also have arbitrary other metrics, such as only merging to a defined level in the tree (using CalculateTreeHeightAscending to check how far we are from the root).

JaXt0r commented 2 months ago

Closed with the debug fix for now. We can reopen the ticket if it occurs again.