Previous topicNext topic

Working with Voxel

Live performances or exported movies created with Magic.
Post Reply
TanookiMonk
Posts: 131
Joined: Sat Sep 19, 2015 12:27 am

Working with Voxel

Post by TanookiMonk »

Hi there,

So i just want to share with you 2 very good software for making easy voxel that you can import in magic. There is more other software but my goal here is to share the best ones i could find.

First one is VoxelShop :
Link : https://blackflux.com/node/11

Second is MagicaVoxel :
Link : https://ephtracy.github.io/

Here is a very basic example of me making a very basic usage of voxel in magic :
Here is the original Magic Project file containing all voxel that you can feel free to use :
https://www.dropbox.com/s/03s4n9zab8mlm ... k.zip?dl=0
Magic
Site Admin
Posts: 3440
Joined: Wed Apr 09, 2014 9:28 pm

Re: Working with Voxel

Post by Magic »

Awesome! :)
artnik
Posts: 268
Joined: Tue Jan 05, 2016 5:33 pm

Re: Working with Voxel

Post by artnik »

I was playing with MagicaVoxel on OS X just this weekend.

Have you managed to get the .OBJ files to import with their correct colours? The geometry came in fine, but the colours were all messed up.
TanookiMonk
Posts: 131
Joined: Sat Sep 19, 2015 12:27 am

Re: Working with Voxel

Post by TanookiMonk »

artnik wrote:I was playing with MagicaVoxel on OS X just this weekend.

Have you managed to get the .OBJ files to import with their correct colours? The geometry came in fine, but the colours were all messed up.
Yes you are right, the closest thing i could come up with is actually load the obj in VoxelShop and then export it in dae format. But this make a weird lightning effect on final result combined with weird colors too. And the conversion make a "Smooth effect" so we lose the voxel cubic style.

I also tried to load it into blender and export it in blender format. This works with Legacy option enabled but come with similar effect. So in the end yeah this is kind of sad as the only choice (For now) is to create model and color them in magic or use Voxelshop
artnik
Posts: 268
Joined: Tue Jan 05, 2016 5:33 pm

Re: Working with Voxel

Post by artnik »

I had some luck running the .OBJ through MESHLAB, but like you, the best I could do was convert the texture colours to vertex colour and it shows smooth shading across the tri's.

It's interesting, because just importing the .OBJ file comes in with the colours showing the correct, square, hard-edged boundaries, just the wrong colour. It's as if the various faces have been assigned to groups, but that they are pointing to the wrong colours.
Magic
Site Admin
Posts: 3440
Joined: Wed Apr 09, 2014 9:28 pm

Re: Working with Voxel

Post by Magic »

It's interesting, because just importing the .OBJ file comes in with the colours showing the correct, square, hard-edged boundaries, just the wrong colour. It's as if the various faces have been assigned to groups, but that they are pointing to the wrong colours.
That could be a bug -- I'll have a look. Can you post an .obj file which shows up with the wrong colors in Magic?
artnik
Posts: 268
Joined: Tue Jan 05, 2016 5:33 pm

Re: Working with Voxel

Post by artnik »

Hey Eric,

Seems I can't add .ZIP files, so here's a WeTransfer link to the .OBJ and associated .MTL file: http://we.tl/qfuuFpFJiu
It's one of the example files included with the software.

Here's a screenshot showing the file in MagicaVoxel, and imported to Magic:
Screenshot showing colours
Screenshot showing colours
Screen Shot 2016-01-25 at 11.33.05 AM copy.png (99.17 KiB) Viewed 26266 times
Magic
Site Admin
Posts: 3440
Joined: Wed Apr 09, 2014 9:28 pm

Re: Working with Voxel

Post by Magic »

Thanks. The problem appears to be that the .png texture file generated by MagicaVoxel isn't well formatted. Specifically, it is 32 bits per pixel, which you might think would mean RGBA, but it doesn't actually have an alpha channel.

I can probably make Magic handle this, but another way to easily solve it is to open the .png file in Photoshop (or a similar image-editing program) and re-save it *without* transparency. Try it out and let me know how it goes.
artnik
Posts: 268
Joined: Tue Jan 05, 2016 5:33 pm

Re: Working with Voxel

Post by artnik »

BINGO!

Funny thing is, I opened that in Photoshop and checked the number of channels, only saw 3, and assumed it was good, missing that the image wasn't flattened. Nice sleuthing.

Happy to fix that as I go. Thank-you. :-)
damstraversaz
Posts: 176
Joined: Tue Aug 26, 2014 11:22 am

Re: Working with Voxel

Post by damstraversaz »

that's great ! thanks a lot for sharing this.
visuality
Posts: 116
Joined: Sat Dec 20, 2014 9:04 pm

Re: Working with Voxel

Post by visuality »

Great stuff, It would be great to see audio reactive tracing shaders ( for edges ) applied to these volumes, god I cant wait till I get grip on this glsl thing.
Magic
Site Admin
Posts: 3440
Joined: Wed Apr 09, 2014 9:28 pm

Re: Working with Voxel

Post by Magic »

Funny thing is, I opened that in Photoshop and checked the number of channels, only saw 3, and assumed it was good, missing that the image wasn't flattened. Nice sleuthing.

Happy to fix that as I go. Thank-you. :-)
It was actually pretty easy for me to handle the alpha issue internally in Magic, so in the next release you shouldn't have to do anything else to get the textures to work.
TanookiMonk
Posts: 131
Joined: Sat Sep 19, 2015 12:27 am

Re: Working with Voxel

Post by TanookiMonk »

Eric wrote:
Funny thing is, I opened that in Photoshop and checked the number of channels, only saw 3, and assumed it was good, missing that the image wasn't flattened. Nice sleuthing.

Happy to fix that as I go. Thank-you. :-)
It was actually pretty easy for me to handle the alpha issue internally in Magic, so in the next release you shouldn't have to do anything else to get the textures to work.
You are my hero !!! Eric this is the kind of things thats remind me why i am so happy i bought Magic in the first place. Those small things you do for your community makes big change for us. :)
artnik
Posts: 268
Joined: Tue Jan 05, 2016 5:33 pm

Re: Working with Voxel

Post by artnik »

Thank-you Eric.
TanookiMonk
Posts: 131
Joined: Sat Sep 19, 2015 12:27 am

Re: Working with Voxel

Post by TanookiMonk »

Ok i just tested the new beta and your fix workt perfectly. But i would like to show you eric how Light is handled weirdly.

Download a voxel model i made here : https://www.dropbox.com/s/t9wh8yj0otzo3cb/Field.7z?dl=0

And load it into magic, you will see that lighting/shadow effect act not so well. I can manage to get different result when rotating the object slightly but obviously this is not a solution :P
Magic
Site Admin
Posts: 3440
Joined: Wed Apr 09, 2014 9:28 pm

Re: Working with Voxel

Post by Magic »

Is the issue that the shadows are too dark?
TanookiMonk
Posts: 131
Joined: Sat Sep 19, 2015 12:27 am

Re: Working with Voxel

Post by TanookiMonk »

Well we could say it like that. But it looks to me that it is dark even when there is no shadow to expose !

Model Loaded :
Ex1.png
Ex1.png (24.91 KiB) Viewed 25677 times
Model Loaded with only a rotate axis :
ex2.png
ex2.png (71.82 KiB) Viewed 25677 times
Magic
Site Admin
Posts: 3440
Joined: Wed Apr 09, 2014 9:28 pm

Re: Working with Voxel

Post by Magic »

Yeah, right now the Model module just uses the default shading options, so the more a face points away from the viewer position, the darker it is.

I have it on my list to add some better lighting controls, such as being able to specify the ambient/diffuse/specular brightness.
TanookiMonk
Posts: 131
Joined: Sat Sep 19, 2015 12:27 am

Re: Working with Voxel

Post by TanookiMonk »

Hey i just found this : http://www.crocotile3d.com/
wich is similar to voxel but whit a twist :) ! Gottaaaa love those curvy pixels !!
yumatripp
Posts: 21
Joined: Fri Aug 14, 2020 9:45 pm

Re: Working with Voxel

Post by yumatripp »

Any idea on when we may see that 3D lighting?
Post Reply