Replies: 13 comments 41 replies
-
|
My thoughts on requirements (not set in stone):
|
Beta Was this translation helpful? Give feedback.
-
|
My thoughts on potential implementations based on other file formats (an edit of what I posted on r/VoxelGameDev) The format is intended for complete scenes as well as models. There are two main transfer formats in the gamedev space, glTF and Universal Scene Description (USD), and for Voxel formats the MagicaVoxel .vox format. MagicaVoxel .voxThis is a relatively simple format which is extensible, however in my view it does not meet the requirements I have:
glTFglTF is fairly simple. It has some issues dealing with very large scenes (the binary .glb format is limited to 32bit size), but it is extensible so this could be worked around or external assets used. There's a fair amount of tooling around glTF, and hierarchies plus animations should work with this tooling even if they can't load the voxel data extension components. glTF does not have any volume description, however it has extensions for volumetric parameters which are applied to the interior of meshes such as index of refraction and transmission/attenuation. We can reuse these, and add extensions for other parameters (scattering etc.). USDUSD is more complicated, but more powerful. USD has volumes usdVol which are usually represented by an OpenVDB asset. Technically with USD one could likely throw a load of open source code at the problem and with a 40MB library (compiled) solve the problem without any further work than specifying how to handle indexed OpenVDB materials (OpenVDB can handle integer voxels). ConclusionI personally favour lightweight code, and thus glTF. There are simple C and C++ libraries for using it, and the base information is very simple JSON. On the other hand USD is far more powerful and already has volumes. Your thoughts are welcome below |
Beta Was this translation helpful? Give feedback.
-
|
Neat! Let me just quickly dump a few (very shortened) points from my previous notes on this idea... EDIT: Copying without consistency/duplicate checking t'was a bad idea; see replies.
|
Beta Was this translation helpful? Give feedback.
-
|
What's the goal of this new format ? Is it:
|
Beta Was this translation helpful? Give feedback.
-
|
First of all, thank you for initiating this discussion and i'm all for it! I already agree with many of the points made.
Those are just some quick things immediately coming to my mind. |
Beta Was this translation helpful? Give feedback.
-
|
An extra note here on things I've read here/elsewhere:
|
Beta Was this translation helpful? Give feedback.
-
|
Just also dumping this here: https://pro.arcgis.com/en/pro-app/latest/help/mapping/layer-properties/supported-voxel-formats.htm The time components on voxel layers is also kind of interesting. Also this documentation might give some general ideas: https://eisenwave.github.io/voxel-compression-docs/ And also the way to store the palette must be defined - colors could have names, materials and so on. |
Beta Was this translation helpful? Give feedback.
-
|
Hi Doug, thanks for starting this conversation. From your list of initial bullet points, the first two really stand out to me.
I propose that these two requirements could form the basis of a successful format. We've seen open formats dominate in the past; glTF, OpenGL and Vulkan being good examples. Another comment in the thread that jumped out me was:
I think this is a useful idea, and makes for an attractive method of piece-wise writing reference implementations, and the specification. My preferred method of development looks something like the following:
I've used this method for writing compilers (with formal specifications) in the past, with good success. In terms of the actual format discussion, there does exist a fourth option, which is to define our own custom format. My read on the options presented so far is as follows:
Of the above options, (2) glTF seems like the best candidate to me. This comes with two large caveats; first, glTF appears to broadly operate under the assumption that it is a wire-transfer format, and will be gzip/deflate'd. It does not appear to have any native notion of compression, which we need. Secondly, after briefly reading the specification, I propose that we would not actually re-use much of the existing glTF spec, and instead we would end up stuffing our own specification format to fit inside glTF-shaped containers. While this is not a deal-breaker, it does sound to me like we may be introducing significant friction into our lives, for yet-unknown benefit. I could be wrong about this; I only read the spec for 30 minutes, but that's my initial read. Briefly, it appears we may be able to reuse the following features to store arbitrary voxel data & scene descriptions.
I also read through the EXT_primitive_voxels proposed spec linked above and .. it looks pretty watery to me. It does appear to specify something along the lines of what we're discussing in this thread, but so far looks pretty half-baked, with some academic-looking frills that make me a bit nervous (the implicit volume stuff). The real boon that I see glTF providing is that if we adopt that format, the barrier for applications to bake the voxel representation of the world into traditional triangulated 3D meshes, textures, etc is much lower. The resulting exports could be loaded into traditional 3D editors (Maya, Blender, etc). That said, then we're more talking about an export target for applications, and not necessarily a voxel data interchange format. That observation makes the value proposition of using something like glTF basically boils down to potentially sharing a parser with another export path, which isn't nothing, but isn't much either. -- So.. that all said, I would propose adding a "novel voxel format", option to the list of candidates, with the following qualities: Pros
Cons
Thoughts? I'm between jobs right now and could spend a day to write a simple |
Beta Was this translation helpful? Give feedback.
-
|
This is most certainly pointless bikeshedding for now, but: Since the format is mainly intended for the 'transfer' of voxel(scene)s, similar to glTF, would it make sense to call the format vxTF? |
Beta Was this translation helpful? Give feedback.
-
|
I have modified the Readme.md to add Requirements. For changes to these add an issue or PR as this discussion is a bit complex. I've opened an issue for finalizing the Implementation decision: modify existing format or custom. I will then open an issue to discuss the binary voxel data format once I have time to put down some ideas. |
Beta Was this translation helpful? Give feedback.
-
|
There's now a Poll on the implementation decision to modify existing format or custom and I've added an issue to discuss the Voxel Data Format |
Beta Was this translation helpful? Give feedback.
-
|
I'd like to add a suggestion of 2 options: ParquetThe Parquet file format already has internal compression, is extensible in terms of columns that can be added, and is easily converted to the Arrow format for processing, either in memory, streaming from disk or from a memory mapped file. In any case a format that is organized as Structure of Arrays (SOA) ie each type of data is consecutive in memory/on disk is usually allows better compression and also is faster to process using SIMD/GPU than an Array of Structures. If the parquet file cannot be adapted for this use case at least there are many interesting features of the format that could be used. TiffMulti-image TIFFs, with either subfiles and image file directories, also allow unlimited extra channels, the advantage here is that it is already an image format and is designed to be extensible, https://libtiff.gitlab.io/libtiff/multi_page.html It should be possible to design a file format that is can be opened by existing software, and has extra metadata for 3d interchange and visualization. Tiff can also be memory mapped to enable random access reading without consuming GB of RAM. |
Beta Was this translation helpful? Give feedback.
-
This is a horrible idea.I appreciate the effort in proposing an open standard for voxel formats, as interoperability is a worthy goal. However, I believe this initiative is premature and, in its current form, risks becoming "yet another standard that no one will use." The fundamental issue is that the solution space for efficient, versatile voxel storage is currently too large and too fragmented. We simply have not converged on a set of dominant patterns that effectively balance all competing requirements. A standard defined now, without the backing of a mature, iterated, and proven implementation, will inevitably fail to support critical use cases. Scene DescriptionThe problem of scene description is already solved by multiple robust, engine-agnostic standards. For engine-agnostic asset and scene loading, why not utilize an existing, widely adopted standard? A glTF extension or an OpenUSD plugin would be vastly superior and immediately integrate with existing mesh-based tooling pipelines, allowing someone to mix mesh and voxel models. Emerging solutions like Bevy's BSN also exist. The requirements listed for scene description are well-covered by the industry; adding a voxel extension for one of those scene description formats would be trivial. And then there's an entirely different camp of people who believe that there's no need for a scene description format whatsoever, because they're building a minecraft game and there isn't a concept of a scene because everything is just chunks. Voxel Data: The Core Problem Lacks ConvergenceThis is the "meat" of the problem, but there are fundamental, unsolved trade-offs that require extensive real-world iteration before a standard can be defined. Geometry & Storage Trade-offsThe geometric representation alone has a vast landscape of options, each with profound implications for performance, memory, and disk usage: Geometry Options: Implicit grids, 3D mipmapped textures, explicit coordinate lists, Octrees, OpenVDB, SVDAGs, Symmetry-aware SVDAGs, etc. Should the format optimize for supercompression and small disk utilization, or should the on-disk and in-memory formats be identical for optimal loading speeds, which is critical for open-world games? With current VRAM caps (e.g., 16GB / 32GB), the in-memory format is often the main bottleneck, which makes a trade-off heavily favoring fast loading more appealing than absolute disk size for open world games, which is much cheaper and easier to add. A standard created today will inherently make an arbitrary choice that will immediately make it unusable for anyone prioritizing the opposite requirement. Material Options: Minecraft-style texture mapping, MagicaVoxel-style palette indexing, block-compressed voxel attributes, some attribute mapping scheme that implicitly derive attributes from geometry, or a mix of the above where you store attribute coordinates somewhere in the geometry then derive some other parts of the attribute coordinates. Should geometry and material be tightly coupled (e.g., deriving attributes from the voxel's geometric structure) for storage efficiency, even though it makes iteration and modification much harder? No one knows the best compromise yet. The person or team who will define the authoritative voxel data format standard will be the one who demonstrates a good balance between these competing priorities through extensive, successful iteration and a performant, shipped implementation. If that implementation sees widespread adoption, its standard will be consumed by multiple clients. It would then be trivial to integrate that into something like glTF. If multiple implementations converge to the same solution, that's when we can start talking about actually standardizing the underlying voxel data storage format. This may never happen if the solution space never converges and that's also fine - see all the GPU texture formats out there: Once a dominant, proven format emerges, integrating it into existing standards like glTF or OpenVDB will be a trivial, downstream task. Defining the standard before that implementation exists is putting the cart before the horse. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
A short discussion in the Vengi discord led to me mentioning on the VoxelGameDev subreddit that:
I'm hoping to create an open Voxel interchange/transfer format. My thoughts are that I would make this based on gltf's json format for everything but the raw voxel data, which would likely be in RLE encoded binary arrays. It would be great if it could support different bits per voxel (at least 8 and 16) and perhaps other data than just material indices (Avoyd has 8bit density), but that would be a stretch goal.
If anyone's interested in following along with this let me know. I'm thinking of starting by making a spec sheet on Github, and will notify any folk who reply when I get around to putting the first draft up.
Essentially a number of tools such as Vengi and my own Avoyd have outgrown the MagicaVoxel .vox format, and we need something else. This is the place for this discussion and perhaps an initial implementation.
Beta Was this translation helpful? Give feedback.
All reactions