Voxels with MagicaVoxel

Handy guides on how to do things, written by users for users.

Moderator: GZDoom Developers

Forum rules
Please don't start threads here asking for help. This forum is not for requesting guides, only for posting them. If you need help, the Editing forum is for you.

Re: Voxels with MagicaVoxel

Postby ramon.dexter » Tue Nov 01, 2016 7:00 am

RSSwizard wrote:How exactly do you model in a program like this, id think it would be like pixel art but i cant figure out how to carefully (precisely) place the blocks where I want them. Like restricting it to one Z slice at a time like a 3d printer does.


What?

Basically, using magicavoxel is close to working with pixelart. If you want to place it exactly, you need to use grid+edges...
User avatar
ramon.dexter
rudebwoy
 
Joined: 20 Oct 2015
Location: Kozolupy, Bohemia

Re: Voxels with MagicaVoxel

Postby Kullenberg » Tue Nov 08, 2016 4:08 pm

Is a voxel sprite more "cost effective" in ZDoom software mode than the same converted 3d faux voxel in GZDoom?

How about, say a regular billboarded sprite for decoration vs the same sprite converted to (true) voxels with just a one voxel thick extrusion? I'm assuming sprites are less taxing to draw for the system but since I'm more of a artist than a tech guy I wouldn't know.
Kullenberg
 
Joined: 31 Oct 2016

Re: Voxels with MagicaVoxel

Postby Rachael » Tue Nov 08, 2016 4:30 pm

Kullenberg wrote:Is a voxel sprite more "cost effective" in ZDoom software mode than the same converted 3d faux voxel in GZDoom?

Way more.

A faux voxel model in GZDoom has at least 14 structures for every "pixel" - that includes its 8 vertices and 6 box-face sides. All of this is carefully rendered by the GPU, whereas in ZDoom the structure is only a single pixel.
User avatar
Rachael
Webmaster
 
Joined: 13 Jan 2004
Discord: Rachael#3767
Twitch ID: madamerachelle
Github ID: madame-rachelle
Graphics Processor: nVidia with Vulkan support

Re: Voxels with MagicaVoxel

Postby Gez » Tue Nov 08, 2016 5:15 pm

It is probably possible to turn each voxel into a simple billboarded quad, then it'd look closer to how software renders it and you could reduce it to four pixels and one side. At least it's an effect I have seen in the NIF format when modding TES games; not to make voxels obviously but to do stuff such as the light halo of a candle or the foliage of a tree.
Gez
 
 
 
Joined: 06 Jul 2007

Re: Voxels with MagicaVoxel

Postby Major Cooke » Mon Dec 26, 2016 11:23 am

I wish this software could go bigger than 126x126x126. I wonder why it's limited.
User avatar
Major Cooke
Do unto others as you would have unto you. Judge yourself first.
 
Joined: 28 Jan 2007

Re: Voxels with MagicaVoxel

Postby worldendDominator » Wed Jan 04, 2017 10:31 am

Voxelbro wrote:+a bad workaround for copy/paste

How do I use that?
User avatar
worldendDominator
 
Joined: 17 May 2015

Re: Voxels with MagicaVoxel

Postby Nash » Wed Jan 04, 2017 10:37 am

Gez wrote:It is probably possible to turn each voxel into a simple billboarded quad


I asked Graf about this before and this is what he said:

Graf Zahl wrote:Not going to happen. The current approach is very efficient and allows to render the entire voxel with a single draw call. Doing per-column billboarding would really add up to a lot of processing time.
Not to mention that voxel rendering in the software renderer is rather glitchy if you know where to look. The way GZDoom does it is rock-solid 3D and won't exhibit any strange quirks.
User avatar
Nash
 
 
 
Joined: 27 Oct 2003
Location: Kuala Lumpur, Malaysia
Github ID: nashmuhandes

Re: Voxels with MagicaVoxel

Postby ramon.dexter » Mon Feb 27, 2017 9:49 am

Major Cooke wrote:I wish this software could go bigger than 126x126x126. I wonder why it's limited.

I'm wondering the same. As I understood, voxel models used in build engine were limited to 256x256x256 voxels...
User avatar
ramon.dexter
rudebwoy
 
Joined: 20 Oct 2015
Location: Kozolupy, Bohemia

Re: Voxels with MagicaVoxel

Postby Gato303 » Thu Dec 06, 2018 5:35 pm

Voxelbro wrote:1- Done with that voxel? now it's time to get it working. Open the export tab and click slab. Pop. A file named howyounamedyourvoxel.slab.vox should have apeared in the export subdirectory of your MagicaVoxel folder.
2- Open it up in SLAB6. Open the Tools tab and click Adjust pivots. Mouse into the boxes on the left and use the arrow keys to move the base point. You just need to put it at the base of the model, so it doesn't clip though the floor in-game.
3- Save it as .kvx, the number of Mips doesn't matter.


Thanks a lot for the "export" tip on Magica Voxel, I was using Goxel on Linux and was exporting my test model to VOX (Magica Vox) format but it never open in Slab6 (not in Windows7 nor under Wine on Linux - not compatible), so I am opening it now on MagicaVoxel (running through Wine too), and with the option Export to Slab6 VOX, now it opens on Slab6 and it lets me save as KVX and now I can see it in game, gotta check how to fix the pivot point tho...
User avatar
Gato303
 
Joined: 30 Mar 2016
Location: Colombia

Re: Voxels with MagicaVoxel

Postby Cherno » Thu Dec 06, 2018 6:34 pm

Gato303 wrote:
Voxelbro wrote:1- Done with that voxel? now it's time to get it working. Open the export tab and click slab. Pop. A file named howyounamedyourvoxel.slab.vox should have apeared in the export subdirectory of your MagicaVoxel folder.
2- Open it up in SLAB6. Open the Tools tab and click Adjust pivots. Mouse into the boxes on the left and use the arrow keys to move the base point. You just need to put it at the base of the model, so it doesn't clip though the floor in-game.
3- Save it as .kvx, the number of Mips doesn't matter.


Thanks a lot for the "export" tip on Magica Voxel, I was using Goxel on Linux and was exporting my test model to VOX (Magica Vox) format but it never open in Slab6 (not in Windows7 nor under Wine on Linux - not compatible), so I am opening it now on MagicaVoxel (running through Wine too), and with the option Export to Slab6 VOX, now it opens on Slab6 and it lets me save as KVX and now I can see it in game, gotta check how to fix the pivot point tho...


You do this in Slab6 by moving the mouse cursor over the small rectangle that represents the axis (it will start glowing) in the bottom left corner, then hitting the arrow keys until the pivot point is at the required position.
User avatar
Cherno
 
Joined: 06 Dec 2016

Re: Voxels with MagicaVoxel

Postby Gato303 » Tue Dec 11, 2018 9:27 pm

Cherno wrote:
Gato303 wrote:
Voxelbro wrote:1- Done with that voxel? now it's time to get it working. Open the export tab and click slab. Pop. A file named howyounamedyourvoxel.slab.vox should have apeared in the export subdirectory of your MagicaVoxel folder.
2- Open it up in SLAB6. Open the Tools tab and click Adjust pivots. Mouse into the boxes on the left and use the arrow keys to move the base point. You just need to put it at the base of the model, so it doesn't clip though the floor in-game.
3- Save it as .kvx, the number of Mips doesn't matter.


Thanks a lot for the "export" tip on Magica Voxel, I was using Goxel on Linux and was exporting my test model to VOX (Magica Vox) format but it never open in Slab6 (not in Windows7 nor under Wine on Linux - not compatible), so I am opening it now on MagicaVoxel (running through Wine too), and with the option Export to Slab6 VOX, now it opens on Slab6 and it lets me save as KVX and now I can see it in game, gotta check how to fix the pivot point tho...


You do this in Slab6 by moving the mouse cursor over the small rectangle that represents the axis (it will start glowing) in the bottom left corner, then hitting the arrow keys until the pivot point is at the required position.


Thank you, I could find it out how to make it work ^_^
User avatar
Gato303
 
Joined: 30 Mar 2016
Location: Colombia

Re: Voxels with MagicaVoxel

Postby GraveUypo » Sun Sep 08, 2019 6:46 pm

this is pretty cool. i made a pile of rocks and it looks awesome. BUT! it's sinking into the ground, with only like the top 3 lines of voxels showing. voxels don't inherit sprite offsets? how do i even fix this?
on the left, the whole thing suspended on the air, on the right, how it sits when it lands on the floor
https://i.postimg.cc/QC9VRbg8/Screensho ... 194722.png

[edit] damn, i swear i didn't see the answer two posts above. gonna try that
[edit2] yep that fixed it. sorry for unburying this
User avatar
GraveUypo
 
Joined: 03 Jun 2017

Re: Voxels with MagicaVoxel

Postby Phoebe Mengerman » Thu Sep 12, 2019 7:49 pm

Hey, i'm back!
I found this whole process of converting a file a bunch of times a bit cumbersome, so i asked the guys at drububu.com if they would implement conversion directly from .obj to .kvx, and my request was actually fulfilled! like in the same week, which is amazing.
Here it is:
http://drububu.com/miscellaneous/voxelizer/?out=kvx
Converting directly to kvx is a new feature so it hasn't been tested properly, but it should help in skipping at least one step in this tutorial and make things a little easier. The tool itself is pretty intuitive to use so that helps. anyway, i'm off to do some testing.
Phoebe Mengerman
 

Re: Voxels with MagicaVoxel

Postby Nash » Fri Sep 13, 2019 1:05 am

Phoebe Mengerman wrote:Hey, i'm back!
I found this whole process of converting a file a bunch of times a bit cumbersome, so i asked the guys at drububu.com if they would implement conversion directly from .obj to .kvx, and my request was actually fulfilled! like in the same week, which is amazing.
Here it is:
http://drububu.com/miscellaneous/voxelizer/?out=kvx
Converting directly to kvx is a new feature so it hasn't been tested properly, but it should help in skipping at least one step in this tutorial and make things a little easier. The tool itself is pretty intuitive to use so that helps. anyway, i'm off to do some testing.


That's neat, but it doesn't seem to transfer the texture/UV map? So you end up with a colour-less/texture-less voxel object... unless I'm doing something wrong... ?
User avatar
Nash
 
 
 
Joined: 27 Oct 2003
Location: Kuala Lumpur, Malaysia
Github ID: nashmuhandes

Re: Voxels with MagicaVoxel

Postby GraveUypo » Fri Sep 13, 2019 8:29 pm

Nash wrote:
Phoebe Mengerman wrote:Hey, i'm back!
I found this whole process of converting a file a bunch of times a bit cumbersome, so i asked the guys at drububu.com if they would implement conversion directly from .obj to .kvx, and my request was actually fulfilled! like in the same week, which is amazing.
Here it is:
http://drububu.com/miscellaneous/voxelizer/?out=kvx
Converting directly to kvx is a new feature so it hasn't been tested properly, but it should help in skipping at least one step in this tutorial and make things a little easier. The tool itself is pretty intuitive to use so that helps. anyway, i'm off to do some testing.


That's neat, but it doesn't seem to transfer the texture/UV map? So you end up with a colour-less/texture-less voxel object... unless I'm doing something wrong... ?

I think we've just finished tuning the tool. I mean, i bothered Arjan for way too long with my selfish requests. It should now work straight out of the box in slade, no need to go through any conversion. All you'll need to do is to adjust the pivot in slab6 to prevent the model from sinking into the ground, but that's done in literally seconds.

As for texture, you need a model with a baked texture (a single texture and a single object). It should work automatically with some models, and with others it will ask for a texture file.
Here's a couple of tests i made using this.
https://www.youtube.com/watch?v=N_-LdLYvvWo
Colors can be a bit off at times, but if you're careful when texturing to keep within the doom palette (i asked him to implement the doom palette into the software too) it shouldn't be a problem.

[edit] welp i gave him some wrong info, so now the default pivot is now on the top row of voxels instead of the middle, and the model sinks entirely underground by default. I guess i'll bother him one last time to fix this so you don't even need to go through the trouble of fixing the pivot in slab6
User avatar
GraveUypo
 
Joined: 03 Jun 2017

PreviousNext

Return to Tutorials

Who is online

Users browsing this forum: No registered users and 1 guest