Giter Club home page Giter Club logo

Comments (5)

davidedmonds avatar davidedmonds commented on August 22, 2024

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.

jice-nospam avatar jice-nospam commented on August 22, 2024

This is the file I'm using. It contains 6 models and a custom pallete :

elf.zip

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.

jice-nospam avatar jice-nospam commented on August 22, 2024

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.

jice-nospam avatar jice-nospam commented on August 22, 2024

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.

davidedmonds avatar davidedmonds commented on August 22, 2024

Ah - thanks very much for digging into that 👍

from dot_vox.

Related Issues (14)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.