Instancer Redesign #524
Closed
TokisanGames
announced in
Architecture
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Questions
What size of grid?
32x32
@ 1024 region size = 32x32 = 1024 cells
Min viewable 2 regions = 64m
User specified variable size?
Data stored at 32x32
Possible user option for generating larger chunks (eg. for lower lods @ longer distances) later
Share grid w/ collision, streaming?
Yes, possibly
Example Scale of Data
Live
Stored
Process
Data Storage
Terrain3DRegion
Current:
_multimeshes {mesh_id:int} -> Multimesh
New:
_instances { mesh_id:int } -> cell{v2i} -> [ TypedArray(Transform3D), PackedColorArray, modified ]
Terrain3DInstancer
Current:
_mmis { v3i(location.x, location.y, mesh_id:int) } -> MMI node
New:
_mmi_nodes { region_loc } -> mesh{ v2i(mesh_id, lod) } -> cell{v2i} -> mmi
Tree
Current:
New:
Implementation Plan
1. Embed vertex_spacing in transforms, relative to local region.
Add vertex_spacing to Terrain3DRegion.
Only change vertex_spacing of transforms on load/set_vs().
2. Split MM data down to 32x32 storage
append_location -> append_region -> append_cell -> storage in 32x32
3. Change MM/MMI generation off of new data structure
4. Add region container in tree / instancer
5. Support changing region size
6. Upgrade old data
Progress in #523
Plans for the Future
Beta Was this translation helpful? Give feedback.
All reactions