userJake_Richcancel
branchrust_reboot/main/optimize_train_track_meshescancel

17 Commits over 31 Days - 0.02cph!

Yesterday
Fix IsAnyLODVisible() not being inverted in OnMeshJobFinished() causing rail meshes to be always deleted instead of only deleted if the LOD was hidden before the mesh generation job finished
Yesterday
Fix filter to only generate lowest LOD only checking if filter is null, not if filter is empty - fixes rivers + roads + train track meshes not generating at all
Yesterday
merge from main -> optimize_train_track_meshes
Yesterday
Fix "Double invocation of a deferred action"
Yesterday
Fix null check using .Equals() instead of == null
Yesterday
Fix CLIENT compile errors
Yesterday
merge from main -> optimize_train_track_meshes
14 Days Ago
merge from main -> optimize_train_track_meshes
18 Days Ago
Rename PathMeshLOD -> RailMeshLOD, less generic but much clearer what it does
18 Days Ago
Fix the AddToHeightMap at the end of GenerateRailMeshes not having a collider available due to the client deferring the generation of meshes & therefore mesh colliders - still generate meshes for colliders right away on servers - generate the lowest LOD in the rare case that a client is generating a map (and not loading a cached map) - keep PathMeshLOD components disabled until procgen finishes to ensure they don't update LODs mid-map generation and start deleting the colliders
18 Days Ago
Rename CreatePathMeshJob -> PathMeshTemplate to make it clearer
18 Days Ago
Defer the integration of the generated mesh by sending it to the load balance - it would be quick but Unity doesn't letting us assign the UV distribution float manually from C# so we have to call mesh.RecalculateUVDistributionMetrics() on main thread which takes 0.8ms
18 Days Ago
Add `printrails` command to print all the railroad meshes currently active
18 Days Ago
Add profiling markers Destroy mesh instead of assigning to MeshLOD if the railroad LOD is hidden before the mesh generation request finishes
19 Days Ago
merge from main -> optimize_train_track_meshes
20 Days Ago
More progress - generate meshes right away when running on server (so they can be assigned to colliders) while keeping it defered on the client so we only generated meshes when in LOD range - create PathMeshLOD which is MeshLOD + request mesh generation when the lowest LOD becomes visible & destroy when no LOD is visible - fix the "job" version creating a job per mesh segment instead of batching every 5 segments together - some more fixes with the mesh generation (stuff like handling both 16bit and 32bit indicies instead of assuming every mesh is <65k verts)
20 Days Ago
Wrap PathList.CreateMesh() with a request class - preparing to generate and destroy the meshes when the rail segments are loaded by WorldGrid instead of generating all rail meshes at startup and keeping them in memory for the whole session - proxy the normal CreateMesh() method to use the "job" class internally (even though it runs on worker threads instead of the job system) - switched to the NativeArray mesh building methods instead of using MeshCache.Data for storage