Common engines project 3D space into 2D space
But that usually makes the original data (object instances, 3D coordinates) inaccessible
And you will be stuck infering it from flattened data, very cumbersome to do, and might require a lot more fetching.
The Hollows does the opposite, I projects pixels to world space,and gives them access to direct world data.
But for that to work, we need:
- a "smart" world that is VERY fast to access and iterate through, that also supports LOD "searching"
This is called "bitfield", and it's a 3D mipmap of the world, where it only stores bits that tell "are there objects here or not"
The bitfield has an identical map, but this one includes actual references to objects based on coordinates
- objects that update their coverage in space, and only do so on movement (fill their bitfields and references in all relevant cells)
- bitfields and cells CAN be nested, but bitfields are where the search happens, and these must fit into L1 cache each (one bitfield with its mips should not exceed 4 kb, an identical field will be used for transparency detection)
- a PrePass that takes the camera location, and searches the world bitfields, to early out and catch refs of objects in the way, this can go down to pixel level through 3-4 nested bitfields, some care needs to go to parallelism here since it will not be straighforward.
And most importantly: this system will NOT rasterize or use polygons/triangles to render.
Instead, it will utilize DataPoints in space, and interpolate between them.
DataPoints must have normals, and can include:
- vertices
- texture pixels
- particles
- lights
And so on..
Basically: if it exists in 3D space, it's a datapoint
It signs itself up to relevant bitfields, and removes itself accordingly.
The highest level of available data will be used for rendering (often that is texture pixels)
And each cell has its own pre-baked "average" data, to avoid going down the details when not needed