You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently all NPCs are loaded immediately and shown all the time. We need to implement proper culling for performance reasons.
Investigation
Analyze the value from original G1 about the distance for culling --> ~10-15m (First mesh is made transparent, +5m, the NPC is despawned and respawned if reached)
Implement an NPC culling manager similar to the Vob culling manager. (Maybe reuse it?)
Handle G1 behaviour (please check with Marvin mode spawns and G1 checks for yourself):
It seems that culled out NPCs are still "working". It means for a certain distance their invisible but still doing their routines? - yes. ~+5m distance after invisibility, they will be removed from game.
It seems that if you're really far away, they will be completely being disabled and re-enabled when you're close by again.
To be handled: Whenever an NPC is brought back again (e.g. Marvin mode in G1 spawning to a far away WP), the routine (e.g. for walking) is being interpolated between Routine-start and Routine-end. (You can check with the two swamp Templar walking between swamp and old mine. When you spawn next to them, they will immediately spawn at their interpolated routine route)
Implementation
v1:
Spawn all NPCs+Monsters when world is loaded (and do not render them until you reach their spot)
Culling out of NPCs/Monsters after x-meters
When spot is reached again, make the meshes visible again
NPCs/Monsters just restart their routines from scratch
v2:
Load SaveGame and NPCs/Monsters which are inside RootObjects, will go on with their current routine status and spawn points based on the information stored
v3:
Optimize Culling spheres: If NPC is walking, then alter culling-array's value
Implement culling logic similar to G1: (1) fade out NPC/Monster, (2) destroy ~+5m further away
As Wld_InsertNpc() is called only once per new game start, we need to ensure, that our culling data stays the same across world switchings
The text was updated successfully, but these errors were encountered:
JaXt0r
transferred this issue from Gothic-UnZENity-Project/binary-dependencies
Jun 21, 2024
Currently all NPCs are loaded immediately and shown all the time. We need to implement proper culling for performance reasons.
Investigation
Implementation
The text was updated successfully, but these errors were encountered: