Comments (5)
Hey - I'll take a look at this as soon as I get a chance. In the meanwhile, have you got a .vox file I can use for a test case (to prevent me from breaking things again)?
from dot_vox.
This is the file I'm using. It contains 6 models and a custom pallete :
There might be something wrong in the file instead. It seems there's a voxel with color 255 in there. Yet the color index 255 is not selectable in MagicaVoxel...
from dot_vox.
mmh something weird in the spec.
There should be 256 ints in the chunk, yet we should only read 255 of them (color index 0 being hardcoded as black?)
4 x 256 | int | (R, G, B, A) : 1 byte for each component
| * <NOTICE>
| * color [0-254] are mapped to palette index [1-255], e.g :
|
| for ( int i = 0; i <= 254; i++ ) {
| palette[i + 1] = ReadRGBA();
| }
from dot_vox.
ok this is not an issue. I simply had to index pallete using voxel.i -1 instead of voxel.i. Magica Voxel color indices range from 1 to 255, actually resulting in a 255 colors pallete.
from dot_vox.
Ah - thanks very much for digging into that 👍
from dot_vox.
Related Issues (14)
- Add palette information to DotVoxData
- Clarify that palette IDs are off by one HOT 5
- thread 'main' panicked at 'Unrecognised material type 4291624755 with weight NaN', C:\Users\xxx\.cargo\registry\src\github.com-1ecc6299db9ec823\dot_vox-1.0.0\src\material\material_type.rs:24:18 HOT 4
- upgrade to nom 4 HOT 4
- Hey! Any example how to extract rgb color from palette? HOT 1
- scene graph parsing HOT 16
- [Feature Request] Serializing a DotVoxData to VOX format HOT 2
- Prevent a panic when parsing an old format file
- rsvo files
- Model Relative Positions? HOT 1
- Version 5 uses `#![feature(let_chains)]` and will not compile on stable Rust HOT 2
- Release 5.2.0 HOT 2
- Implement Material Loading
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.
from dot_vox.