106
Offtopic / Re: XCOM Inspired Fantasy Game
« on: July 18, 2020, 01:17:46 pm »
Asked a professional graphics artist what they use, and he pointed me to the VDB format:
https://www.openvdb.org/documentation/doxygen/faq.html#sGeneralizedOctree
But apparently VDB can't be modified in real time, and is useful only rendering precomputed scenes, since you have to recompile whole structure for each frame.
https://www.openvdb.org/documentation/doxygen/faq.html#sGeneralizedOctree
Quote
Is OpenVDB merely a generalized octree or N-tree?
No! While OpenVDB can conceptually be configured as a (height-balanced) octree, it is much more than an octree or N-tree. Whereas octrees and N-trees have fixed branching factors of respectively two and N in each coordinate direction, OpenVDB’s branching factors typically vary between tree levels and are only limited to be powers of two. To understand why and also learn about other unique features of OpenVDB, refer to the paper in ACM Transactions on Graphics.
Is OpenVDB an adaptive grid?
Let’s first stress that the term "adaptive grid" is somewhat ambiguous. Some use it to mean a grid that can store data sampled at adaptive voxel sizes typically derived from a so-called "refinement oracle", whereas others mean multiple grids with different fixed voxel sizes all sampling the same data. An example of the former is an octree and of the latter is a mipmap. Since OpenVDB stores both data values and child nodes at each level of the tree, it is adaptive only in the first sense, not the second. The level of adaptivity or refinement between the tree levels is defined by the branching factors of the nodes, which are fixed at compile time.
OpenVDB stores voxel data in a tree with a fixed maximum height (chosen at compile time), with a root node that has a dynamic branching factor, with internal nodes that have fixed branching factors, and with leaf nodes of fixed dimensions. Values can be stored in nodes at all levels of the tree. Values stored in leaf nodes correspond to individual voxels; all other values correspond to "tiles" (see below).
But apparently VDB can't be modified in real time, and is useful only rendering precomputed scenes, since you have to recompile whole structure for each frame.