voxel-model's People
Forkers
gdlinklock xxnwxf bcmissrain daisysmeng saulochina xubingyue bradparks mela2048 dimxenon drancom wty0512 gowinder gdseller hengle lcs1608 gefenglaodie gamzzaa nbright ml-lab bitmess codebee-fr lovedna ypypjay prabhjotsl ipud2 losinglin taotao111 lihuilai ye-za santosh90n markstinson lawkapala lkjx82 katastic aiekick sangohan tkxcrf garameki epick362 chucklab samuraiowl cartblanche kamal01k byluolu0 hemipod cjschneider2 oskarsigvardsson pclod random-person-001 u3dc nextmap marcthenarc randomdeveloperm lxzyhmfk arronmabrey hurricankai voxelmap yizhang-zju sutao80216 batz925 berserk77 brucelevis yazici z-zlll tomwor ncoder sahwar mchorse ujjwal3067 badrixa hengtek tseve02 alexis27s danil-dani rickomax cleancoindev scottvelasquez gituff badclone 979070830 f2k60 kentbarber lp249839965 hugodecasta alecxdev godisclown pclc7z2 1e50a2 nikodaring xxxqueen-10-12-xxx zed4v knut0815 cybersys cualquiercosa327 yas ttcoecop dkodnik bacusio colourxz tranoovoxel-model's Issues
Is there a linux version
I am on Mint Linux and was wondering if there was a way to run from linux.
Maybe building from source?
Texture is too small for some programs
I tried putting the .obj in Blender. That still was fine, but then it crashes when I put the textures in. It does not crash when I put in a bigger texture. Is there a way to solve this?
add editor settings to .vox file format
the current .vox file format doesn't save the editor, especially the Render, settings
i suggest to create a new chunk 'EDTR' and save all editor's settings as a JSON (eventually zipped, so to freely add parameters to be saved without worrying about file format and retrocompatibility
-------------------------------------------------------------------------------
# Bytes | Type | Value
-------------------------------------------------------------------------------
1x4 | char | chunk id
4 | int | num bytes of chunk content (N)
N | string | chunk content (JSON)
-------------------------------------------------------------------------------
Reducing "canvas" size
Hey, I have models on grid 32x32x32 and magica voxel resizes grid to smaller when I save it and load it later. Is there option to turn that off? I'm reporting this as Issue because it seems to be like a bug that interupts proper work.
@edit
Sorry, my 3D Artist is stupid ;___;
Btw, it can be option as a feature....
Anti aliasing creates white line around exported snapshopt
Rendering does not work. (Direct X 11)
(Shader model 5)
Title says everything.
PACK chunk is absent, but I have 22 saved models in the file
I tried to write my own .vox parser to easier implement new models to my game, but meet some troubles with detecting "PACK" chunk. So, I decided to use already existing solution. But it also throw a few errors. So, I just converted the file to byte[] and look at bytes, and... There isn't any byte row that can be converted to the "PACK" string.
File in bytes:
Editor.log
File:
Tank.zip
Open .obj files
When I import an exported .obj from magicavoxel into mixamo.com, it seems not to be a closed mesh. I mean, I've got to open it on 3dmax and weld all the vertexes because mixamo wont import open meshes.
Minecraft schematics render using command line script
I have 12000 minecraft schematics. I want to render it automatically from specific camera angle.
Is it possible to do it with MagicaVoxel? I'm trying to write a script that will run 12k times MagicaVoxel.exe with args[] that can automatically read a schematic, render it and save the picture to an image file like png.
I can't find "rounded grids" shape in "shapes"
and "Rounded Edges" also ;((
What are the nTRN, nGRP, and nSHP chunks for?
Currently, I need the positions of each model. I think I might have found that in the position data right before the nSHP chunk which I read in backward. However, this is really hacky and I need a better way to read position data. So my question is: How are the nTRN, nGRP, and nSHP chunks formated?
MagicaVoxel for game dev [FBX animation export request]
MagicaVoxel is realy good software. Rich in functions, open-source and with good interface. Only thing what killing me is lack in export file format support. Frame-by-frame animations are good but unusable for games because i can't export them to anything usable. Right now most supported file format is FBX, and why not ? FBX contains mesh, UVs and animations while keeping small file size. FBX sdk is avalible on autodesk's website here for free. Besides, FBX models with UVs and animations can be imported to almost anything because simple c++ sdk allowing add import/export support to any project. If i can create such beatyful models and animate them, it will be nice to be able to export them and use in things like Unity3D game engine or XNA framework and that was only from C#... it can be used everywhere in every language.
File Format 1x4
I have the feeling that this might be a stupid question and that I'm going to facepalm myself when I get an answer but... what do 1x4
bytes mean below? why isn't it just 4 lime in the next line?
MagicaVoxel .vox File Format [10/18/2016]
1. File Structure : RIFF style
-------------------------------------------------------------------------------
# Bytes | Type | Value
-------------------------------------------------------------------------------
1x4 | char | id 'VOX ' : 'V' 'O' 'X' 'space', 'V' is first
4 | int | version number : 150
Any way to change the maximum box size?
Actually, the maximum box size is 126. I just need to set it to 128. Can I change this limit from the script? In which script the limit is set and where?
File format not really optimal for converters
This is nitpicking, but the current file format version(150) isn't really optimal for converters, as the chunk data has to be cached until the entire file is read, before it can be converted, which means a small memory overhead. This, or the file has to be read multiple times.
This is due to the fact that(at least the file format description specifies) that the palette and materials can be at the end of the file. To handle this correctly, one would have to read all the different chunks, store them in memory until everything is read, then scan through and convert each model. Another method is to read through the file multiple times, doing a pass for metadata, and a pass for chunks.
My suggestion is seperating metadata into their own chunk, always at the beginning of the file.
This would let converters have all required metadata at hand for when chunks appear in the file, allowing for direct conversion in a lot of cases.
My suggestion for a more "easy to convert" chunk setup:
Chunk 'MAIN'
{
//Always the first
Chunk 'META'
{
// pack of models
Chunk 'PACK' : optional
// palette
Chunk 'RGBA' : optional
// materials
Chunk 'MATT' : optional
Chunk 'MATT'
...
Chunk 'MATT'
}
// models
Chunk 'SIZE'
Chunk 'XYZI'
Chunk 'SIZE'
Chunk 'XYZI'
...
Chunk 'SIZE'
Chunk 'XYZI'
}
Advantages of suggested format:
- Color palette and materials are all loaded, ready for creation. A converter could read and dispose of a voxel immediately after converting it, and there is no reason to keep XYZI-chunks in memory.
this could also be solved by specifying that material and palette chunks ALWAYS have to appear before XYZI chunks, but putting them all in a metadata chunk would use the child chunk feature of the format, which is only used once
Graininess or Noise in 0.98.2 glass
Noticed that the glass render material doesn't seem to be as clear as before. The clearer one is from 0.98.1 and has a glass material for the water. Used an older model that still had the 0.98.1 settings saved, with the same material settings for both versions as much as I can get them. The newer render still seems to have a lot more noise and grain. Just wondered if I'm doing something incorrectly or if the new features might be causing something like this.
(Thanks so much for all the work on this! It's an absolutely amazing application.)
Can't Desrialize "rObj" chunk
can't not find doc in the readme of MagicaVoxel-file-format-vox-extension.txt
Optional optimised format
Feature
An optional optimised version of the normal vox format which would use less disk space.
How
If i understand correctly, every voxels of a model are saved in the file. This is an easy way of doing it but not the most optimised.
I would suggest a "Group/*Chunk" saving technique. It would save not every voxels but chunk of voxels with the same property.
Ex : A cube with a side of voxel with pallet index 1 and the other with index 2.
Old : Every voxel would be saved.
New : 2 chunk whould be saved.
Format(xs, ys, zs, xe, ye, ze, index)
The first 6 values represents the start/end of the chunk bounds.
The last value represents the pallet index of the voxels inside that chunk.
the default palette is described as RGBA in the comment
But the values aren't looking like RGBA for little endian, they more look like ARGB for little endian - or are they stored in big endian order?
Edge color selection in v0.99
Hey mate, great work with MagicaVoxel!
But I noticed that edge color selection, though exists in render mode, is gone from the editor. Meanwhile it is a very useful feature when editing dark palette scenes.
Ammend VOX file format to include optional section for arbitrary metadata
This is somewhat related to #10 but also seemed different enough to merit its own thread.
In working on the voxel rendering library https://github.com/tommyettinger/WarpWriter with @tommyettinger, I have run into the problem of needing to include metadata about voxel models in the file format, such as connection points between voxel models intended for use in skeletal animation and for constructing procedurally generated voxel models from parts. At least for now, the plan is to include the metadata in a separate JSON file for each model, but it would be ideal to be able to include data like this within the actual .VOX files.
If we try to add such a section, MagicalVoxel strips it out if we ever edit the model in MagicalVoxel again. All MagicalVoxel would have to change is to stop doing that.
A few questions about the vox format
Everything is tied to be little endian, right?
"4 x N | int | (x, y, z, colorIndex) : 1 byte for each component"
If x, y and z coordinates of a voxel can only be a byte, how do you create big models? Maybe this is a typo and should be int, too? Because the size of the whole volume is int, too - imo that wouldn't make sense if the max coordinates can only be in 0-255 range.
the main chunk always has a 0 for "num bytes of chunk content"?
"4 * N | float | normalized property value : (0.0 - 1.0]" The N here is it the chunk content bytes?
Says that the palette is 256 colors but it's 255
I think it's 4 x 255, and not 4 x 256
MATL chunk bloats size on each .vox file?
Seems the MATL chunk adds a fixed 40k overhead to each .vox file now, even on small 8^3 models that would have otherwise been just 2k or so. This is on models where I've never done anything with materials, its all just default diffuse, default palette. Is there any way to turn saving of this chunk off? Or, err, optimize it?
nTRN translation STRING value is not 12 bytes
According to the spec, the value component of the translation string should be 12 bytes in size (int32x3, an int32 (4 bytes) per dimension)...
... but the actual format seems to be different. In my .vox
model, my nTRN translation is less than 12 bytes. I've seen it 8 bytes, and I've seen it 9 bytes (in the same model).
It's obviously not "int32x3". What's the format?
Support densely packed index chunk?
The current XYZI
chunk is somewhat wasteful if >25% of voxels are solid, which is not uncommon.
How about supporting an IIII
chunk, storing only palette indices, including for empty voxels? Exactly the same size in bytes as SIZE
indicates.
MagicaVoxel would save whichever is smaller.
While I am fantasizing, an IRLE
chunk would be nice too ;)
Image Import not working
I've resized my image and saved as PNG after pixelating it with this website called "Pixel it". It wont show up after dragging and dropping into MagicaVoxel. Any Solutions?
Need support for custom chunk
I made a chunk "RIGG" for rigging data but will be delete by MagicaVoxel. Is it okay to keep the unknown chunks while saving file?
Document changes to the file format more thoroughly
I am maintaining a project with its own vox parser and since Magicavoxel 0.99.7 the parsing is broken.
I think every developer who wants to use this format would benefit from clear documentation of what changes have been made to the file format.
Other established file formats would also not dare to randomly change things and leave them undocumented. This just makes everyone's life unnecessarily hard and prevents easy use of this file format, not to mention compatibility breaks.
I just can not comprehend, why a software engineer would leave possible compability-breaking changes to their widely used public file format undocumented.
Performance issues with backups
Hello so, MV apparently is saving backups of my files every few clicks and that's normally not an issue but I use a good old hard drive and the saving process is pretty slow and the problem with the backups is that every few clicks I have to wait like 10 seconds for the backup to complete (program locks up until complete) which can make the process pretty tedious. So I don't know if I'm missing how to disable backups or maybe there should be an option in there.
0.99.7.1
size of PACK?
I found that the size of MagicaVoxel-0.98 doesn't match the definition in MagicaVoxel-file-format-vox.txt.
Here is an working example from official website:http://github.dev7.jp/vox.js/test/meshbuilderTest.html
I cloned it, and use MagicaVoxel-0.98 open that ship.vox then save, then if crashed with:uint8Array index out of bounds: 12500(…)
After an byte to byte comparion, I found what's wrong.
In the old file, the PACK chunk is omitted, but new one has.
However, according to the definition in MagicaVoxel-file-format-vox.txt, it will like this in binary:
"VOX" 0x???? "MAIN" 0x???? 0x???? "PACK" 0x0004 0x???? "SIZE"
however, after resave using MagicaVoxel-0.98 , this is the binary file looks like:
"VOX" 0x???? "MAIN" 0x???? 0x???? "PACK"# 0x0004 0x???? 0x???? "SIZE"
so looks like it record the size of SIZE chunk and XYZI chunk separately, but treat him as one when counting the size, is this an bug?
Translation and rotation format
Hi there.
While writing a parser for the .vox files, I discovered that the documentation doesn't quite match what MagicaVoxel actually produces for the translation and rotation of nTRN
chunks.
(Tested in the most recent, unstable 0.99.5).
voxel-model/MagicaVoxel-file-format-vox-extension.txt
Lines 77 to 78 in eed2ea1
Both of these are actually ASCII encoded versions of what they describe.
For the translation, instead of just three int32
packed after each other, there is a string of the format "x y z"
, i.e. the three integers encoded as ASCII and separated by a space.
Similarly, for the rotation, instead of a single byte, there is a string containing a decimal representation of that byte which then matches the format described in the documentation:
voxel-model/MagicaVoxel-file-format-vox-extension.txt
Lines 24 to 41 in eed2ea1
As an example,
0 -1 0
1 0 0
0 0 1
is packed into 0b0010001
which is then written into the file as the string "17"
, i.e. the bytes 0x31 0x37
.
Hope this helps anybody stumbling across the same issue, or that @ephtracy perhaps updates the repository to include this information.
Mouse offset and editor resolution problem
I have only had this problem with my new laptop, it's a dell xps 15 with resolution 1920x1080 and Windows 10. I am using MagicaVoxel 0.99a but it also happens with older versions of the editor, in fullscreen and windowed mode.
Notice the position of the cursor in the first picture and where it is actually pointing (the button on top of it), and also the top and bottom parts of the UI are cut. The hit regions of the UI appear to be offset or scaled smaller than the actual display, as a result in order to click a button I actually have to click underneath it. Very awkward to work with. This appears to be localized to the upper half of the window, as the bottom half of the UI functions as expected (as shown in the second picture).
More features?
Hi, my team is currently using this as a model program, we are wanting to request a feature of export animation support of FBX so we don't have to pay $20 more for software. Have a nice day, if I am being too vague, please tell me. (We are requesting an export animation of FBX if possible please, thank you.)
Please update the file spec to version 0.99
Magicavoxel 0.99 supports world editor and render settings saved in vox file. Please update the file spec.
Render mode has great features but can not export to Unity with same effects
It is wonderful to have so many options in the render mode of MagicaVoxel but it kills me that I can not import as is rendered model (with lights/emissions/glass/metal effects) to Unity.
Undocumented File Format Structures (as of 0.99)
There exists undocumented data members inside the VOX file format. Proceeding the XYZI data, we can see tags labelled:
- nTRN
- nGRP
- nSHP
- LAYR
These appear to be non-standard when compared to the other Chunk types as they don't seem to be 4-byte aligned and are may be terminated with 0xFFFFFFFF.
Furthermore the old description for materials MATT appears to have been replaces by a new descriptor MATL which uses strings to identify material properties rather than pure binary.
can I get Render property value?
I can't find out whether some attributes in the renderer, such as metallicity, are saved in the vox file
My interface has something wrong
My RENDER icon is gone..
And when i click an icon ,i always got a wrong result just as runing an other order beside the icon.
The example .vox models are not licensed
It would be good to know how those models/files are allowed to be used.
i wrote an .vox importer for the godot engine and would love to add a few of these models as examples into the plugin. eg: i would redistribute them.
so ye. would that be fine?
Small fixes/QoL improvements and feature requests
Fit to Model Size
- Now that we can create multiple objects, some of us are cutting dynamic objects out of the static scene, going to world view, and pasting the object. This object retains the same dimensions as the object it was cut from, instead of fitting to its own size. When clicking "Fit to Model Size", it keeps the object's center at the same coordinates, pulling the actual voxels out of their correct alignment, requiring them to be realigned. Could "Fit to Model Size" use the bottom-most voxel as its anchor when resizing?
Color Picker
-
In the color picker, any way to add the ability to manually modify saturation and brightness by number, just like R,G,B is currently modified?
-
Also, the ability to copy and paste color hex-values would be handy for matching up our colors to outside sources.
-
The ability to assign textures to voxels instead of just colors would be amazing, a save from needing to use 3rd-party and less user-friendly programs such as Blender.
Pattern Tool
-
When switching between patterns, is there any way to have it default to keeping the same offset and rotation as the previous pattern? Having it reset every time makes using this feature much more time consuming.
-
Also, when in pattern mode, it would be wonderful to be able to have a snap to grid ability, with offset. This allows this pattern tool to be used much more easily for modular environment design.
Export
- When exporting, could we have the ability to scale the model on export? Some tools, like Assetforge, require all models to be a certain size. If we could scale by percentage and by a set size, it would be immensely helpful.
Other
- I would be most thankful for the ability to use angled voxels, a simple 45 degree wedge, outside and inside corners would be wonderful. I don't know if this is possible with how Magicavoxel is designed or if this would anger the cubist purists, but this would extend Magicavoxel's usefulness considerably. I was thinking it could be a chamfer selection feature, with the ability to select and remove chamfer just as simply.
MagicaVoxel freezes when I click 'Render'
Hello. I have a problem. When I'm done with a project, I hit Render, and suddenly MV freezes and pulls a "(Not Responding)" in front of me. Is there a fix for this?
How to check if a nTRN chunk is a duplicate of geometry?
The way I have the .vox reader set up is that it reads each object in as a texture. Then it reads the position and rotation of the object in the nTRN chunk. However, since the objects that are stored in the XYZI chunks are not duplicated then how do you know which object the nTRN data belongs to?
I assume that happens in the nGRP or the LAYR chunk but after testing the output of both the chunks I can't find anything that correlates to the object reference. Or does that not exist?
Exporting materials from MagicaVoxel
Hello. I've got a question regarding exporting materials from MagicaVoxel. Currently, if you export the whole word (save with ctrl + S) the materials applied to colors also save, but if you export with export menu to .vox all objects of the world separately the materials are lost.
Question: is there a way to export objects from the world separately and at the same time save their materials' data?
PS. The version I use is 0.99.6.4
Object mode: move tool. Shift+select do not work
Should it work so?
Is there a reason to prevent multiply selection with shift click same way as I can do it with frame-select tool?
It will be handy select and move without changing tool to frame-select and back
rotation matrix : how does it work for flip?
Hi,
I just realised that both flip and rotation informations are in the rotation matrix (_r), but how does it work exactly?
How can I say when it is rotation or when it is flip? How can I know that there is a rotation and a flip at the same time?
Rotation and flip are two differents thing right? So I don't get why there is not two different attributes?
Exemple (based on datas collected from .vox file):
Rotation Z 90° :
0 -1 0
1 0 0
0 0 1
flip Y :
1 0 0
0 -1 0
0 0 1
Rotation Z 90° + flip Y :
0 -1 0
-1 0 0
0 0 1
So, from the last one, how can I extract the two first to apply them both?
DX,DY,DZ,I format
Heya,
If we use x,y,z,i,... format, you can't RLE/Deflate/Brotli the output.
eg a solid run of yellow (color 8):
1,2,3,8,2,2,3,8,3,2,3,8,4,2,3,8,5,2,3,8,....
But if we use dX,dY,dZ,i format it works:
1,2,3,8,1,0,0,8,1,0,0,8,1,0,0,8,1,0,0,8,...
Since we're sending position deltas. Then you can just slap .gz
on the whole file to compress real good.
Parser for .rsvo format
Have you implemented a parser for the .rsvo format published in
https://github.com/ephtracy/voxel-model/tree/master/svo
that you can share?
language changing not working on MacOS
I move Chinese language locale.txt
, dict.txt
to config/
directory, and NotoSansSC-Bold.otf
to config/font/
directory.
But the language changing not working and keeps English.
The MagicalVoxel.app
version is 0.99.6
System: MacOS Big Sur 11.1
How to relate nSHP to corresponding SIZE/XYZI ?
Hi,
I'm currently working through all the documentation and wrote my own VOX importer in C# for Unity.
Everything works so far except the correct positioning of the models in world space.
I can get the translation information from the frame attributes of the nTRN chunks (?) but how do those relate to the actual voxel data in SIZE/XYZI?
Can't find it.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.