Nexus: a multiresolution mesh visualization library (in C++)

Technical report


1) The multiresolution structure based on MT
   Point clouds for free.
2) construction of the model
       new spatial subdivision
       streaming approach
       error computation and saturation
       patch structure
        1) Stream
        2) Simplification
        3) Multipartition.
           3.1) create partition at level 0
                while(! single node partition)
                   simplify each bin to a tmp file
                   ADD ALGORITHM: grid clustering simplification.
                   OPTIMIZE: we could use threads here easily.
                   OPTIMIZE: the tmp file is needed because we will need multiple pass while streaming
                              but could be more efficient in space (no need for fixed size: 
                              when we add a bin we know how big it is
                              we could also save the mesh here in indexed format, saving even more space.
                   create partition at level i+1 streaming from tmp.
        4) Nexusbuilder
           4.1) each triangle in the temporary files of the multipartition have a 'part' field, 
                which remember the partition in the previous level.
     point cloud (differential)

     projective textures
       Main idea: texalign with weights creates a projective atlas.
       Optimize it by taking the cube infinite projective textures (doubling when needed by occlusion)
       a sort of marching intersection.
       we render the model using the texalign atlas as seen ftom the 6 directions (using depth peeling
       to solve oclcusionsl and record color and depth map. We can also record resolution.
       Simplify matrix computations taking XYZ? would that be significant?
       The 6 directional maps are split hierarchically *taking also Z into account)
       when makeing deferred shading rendering, we store depth and normal in the buffer.
       We traverse the 6 trees and get a cut of projective textures, draw the volumes shadow map style.

       Weighting and blending: we could use the square of the normal component along the direction of the 
       map to weight the contributes (always 3, unless normal is close to one direction, we would not need
       a final pass to normalize :)
       Other problem: blending between adjacent leaves of the same directional view;
         1) ignore it. (ugly!)
         2) duplicate one row of samples (good for same level, bad for different levels:
            we would get a T intersection...
         3) 2 rows of duplication with on-the-fly blending to zero on the borders, and we allow at 
            most 1 level between leaves of the xtracted tree
     What about the same thing as a rendering technique?
     We keep the geometry as height map with corresponding normal texture and color texture each with 
      independernt resolution :)
     Yes if we can blend the Z. (and we should be able to.... always based on the normal of the face)
     but would need a test  to be sure.

3) rendering of the model
     models & instances & controller.
       memory management
     mode, error
       you can have mode per instance and error per instance, but then you need to set up all of them.
     dag & traversal
     occlusion culling

     deferred shading



//memory mapped, binned. WARNING: do not cross bin boundary
class TemporaryFile: QTemporaryFile {
  quint64 bin_size;
//can be used as an array, bins are only for out-of-core automatic management
template <class V> TemporaryArray: public TemporaryFile {

class BinFile: public TemporaryFile {

class Bin {