5,389
edits
(a few notes on the theoretical limits; and the obligatory "smaller boxes" joke) |
(update) |
||
Line 41: | Line 41: | ||
:The above leaf does not intersect any quads, has its maximum corner at (-2048.0, -2048.0, -2048.0), a size of 2048.0, no neighbours for all negative faces (it's right in the negative corner of the environment) and positive faces have leaves as neighbours (no quadtree nodes here). | :The above leaf does not intersect any quads, has its maximum corner at (-2048.0, -2048.0, -2048.0), a size of 2048.0, no neighbours for all negative faces (it's right in the negative corner of the environment) and positive faces have leaves as neighbours (no quadtree nodes here). | ||
;Theoretical limits | ;Theoretical limits | ||
:If the 8192x8192x8192 environment is subdivided into 16x16x16 cubes in all three directions, the total number of leaves is 512x512x512 = 134,217,728. Theoretically the data structures allow for a densely packed level where each 16x16x16 volume has some quads inside it (theoretically up to 4096, i.e., a maximum of 549,755,813,888 quads per level). In practice, the engine imposes much more modest limitations: | :If the 8192x8192x8192 environment is subdivided into 16x16x16 cubes in all three directions, the total number of leaves is 512x512x512 = 134,217,728. Theoretically the data structures allow for a densely packed level where each 16x16x16 volume has some quads inside it (theoretically up to 4096, i.e., a maximum of 549,755,813,888 quads per level!). In practice, the engine imposes much more modest limitations: | ||
:*only up to 8196 environment triangles are expected to be ''visible'' (rendered) at any given time (they can be packed as 4096 quads, or as 8196 actual triangles, or any combination of tris and quads). If you attempt to view more geometry at once, Oni will ''not'' crash, but: it will complain with the dev-console message "Exceeded max visible GQs #", where # is the number of ''triangles'' in excess of 8192; it will start dropping random triangles from the rendering pipeline; collision will start to fail on the "dropped" quads. The amount of other visible geometry (characters, particles etc) does not affect this limit. | |||
:*only up to 262140 triangles (e.g., as 131070 quads) are allowed in a level's environment. Attempting to load a level with 262141 environment triangles (as any combination of triangles and quads) will cause Oni to [[Blam]]. | |||
{{OBD_File_Footer | type=OTLF | prev=OTIT | next=PLEA | name=Oct Tree Leaf Node Array | family=Level}} | {{OBD_File_Footer | type=OTLF | prev=OTIT | next=PLEA | name=Oct Tree Leaf Node Array | family=Level}} | ||
{{OBD}} | {{OBD}} |