dust-engine / dot_vox

Rust parser for MagicaVoxel .vox files.
MIT License
51 stars 20 forks source link

Examples #45

Open davids91 opened 3 months ago

davids91 commented 3 months ago

Hi! I am just diving into your project, because I think it's a great candidate to use in reading in model files for my raytracing engine! :)

Are there any usage examples available? e.g. reading in a file from the system and sampling it?

I actually figured it out from docs, I just think it would be a great addition to the lib!

Neo-Zhixing commented 3 months ago

Hello,

We do not currently have any example code but PRs welcome! It’d be great if you could add some examples if you’re motivated to do so.

davids91 commented 3 months ago

I am currently working on parsing the data into my own format, but I'll see if I can rework the code into an example

davids91 commented 1 week ago

What would be the preferred operation for examples? I was thinking to print each models bottom left voxel coordinates

Neo-Zhixing commented 1 week ago

I mean basically we want to figure out the location of each model from the scene graph right? So you would want to output a list of models associated with their respective parents, and the transform relative to the parent.

I really think that traversing the scene graph would be quite engine-specific, so there's no need to build a one-size-fit-all example. It can just be a reasonable starting point for users to port to their own engine.

davids91 commented 1 week ago

Here it is! https://github.com/dust-engine/dot_vox/pull/51 any requests welcome! :)