-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make wearables way more awesome #10
Comments
Some wearables were saved with different versions of magicavoxel, this could be an issue later on |
That looks beautiful.... 💯 I wanna convert all the vox files into smooth vox and export HTML previews, batch process everything basically. Didn't know some files were corrupt, I wonder if there's a way to scan through all of them and check |
Batch processing to export is the difficult part, that will automatically also tell you which files are corrupt. I can imagine something like https://github.com/gftruj/electro-aframe (haven't used it myself) combined with some code from the svox playground for the MagicaVoxel conversion and the svox library itself should get you a long way to generating the preview. But I'm not sure if you can then actually batch save all the output files. A live preview would be easier (and way cooler), but I'm assuming you want to show a list and I'm not sure how many live previews on one page would start breaking peoples browsers. |
Oh wow just realized I have 633 0 byte vox files in this dataset, thanks for noticing gunna look into that first |
Alternative to serverside rendering: Create a client side application using the svox MagicaVoxel conversion that loops over all vox files, converts them, show them in A-Frame, get the base 64 image data (convert the A-frame screenshot component to get the data instead of saving the file) and then post all images as base 64 to a server to store. That circumvents the whole server side rendering part. |
Yep I was thinking vox2svox and svox2gltf (and maybe svox2vox) would be great standalone binaries to create. (With switches for compression, and if to add deform by default, etc) You’ll need to get it running in node but probably not too hard. I’m working on carving out the parts of the playground that seem generally useful (vox/gltf/generate) into core in my fork, so will let you know if I get node working. I’d like to make it so you can run these operations in a cloudflare worker in addition to command line, but not sure if I’ll get that far. fyi this can be used to make an executable: |
Ah yes, extracting the reusable parts of the playground, another thing on my todo list I never got around to :-) I also wanted to do the svox2vox, but never found a library that did svox writing and I didn't want to spend my time there. |
Yep, makes sense. I've never written VOX export either, just import. |
wrt vox2svox was thinking interface like:
Could also add additional switches obv but these seem the most important |
That would be a node application, right? Even though I always write them under each other, the model settings can also be comma separated like so: So you could perhaps do something like this for maximum flexibility:
|
oh I forgot it will be a single material. yeah an open-ended format like that is probably smarter. especially because it can just pass it through making it so there's no work to be done to upgrade it to new features. |
and yes it would be nodejs |
I’ve got this mostly working - should have it released tonight hopefully |
OK! This is released: https://github.com/jel-app/svox-tools |
I experimented with opensea's metadata using wearables. Use whatever you'd like: Opensea page: Uses this metadata: Which visualizes the wearable using threeJs using this client-side code:
|
Answer on question 1.: When you export to A-Frame from the svox playground you get a piece of javascript code, which is an A-Frame component with the complete mesh of the model (i.e. arrays with vertices, normals, colors, etc.). |
Metadata is currently centralized
All the vox files are about 133MB total which is very affordable to store on arweave or IPFS
Make better previews
The preview image gifs average around 1.2 MB and the magicavoxel format .VOX is not a standard file format so it does not preview properly on Opensea.
Some ideas:
Smoothvoxels supports many types of export options, the A-Frame javascript export options in the playground support all material types unlike the gltf / glb export (see beginning of documentation): https://svox.glitch.me/
The text was updated successfully, but these errors were encountered: