Voxels with MagicaVoxel

Handy guides on how to do things, written by users for users.
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.

Voxels with MagicaVoxel

Postby Voxelbro » Thu Apr 17, 2014 8:40 pm

Edit: 21/04/14- MV just got support for pngs, removed tgas from tutorial. Dev uploaded a tutorial that cover 70% of this at https://voxel.codeplex.com/wikipage?tit ... Title=Home

Why MagicaVoxel :
Most other tutorials on how to do voxels for Doom recommend a SLAB6 + strip2voxel combo. Every little second I used the combo I couldn't help but wonder if there was any other method, and that was no small amount of seconds as voxels took hours. Strip2voxel isn't easy and thinking with slices is counterintuitive. And then MagicaVoxel appeared.

Things only it can do:


+Undo and redo
+import sprites right into the editor
+Face and brush edit ( Now you can paint/remove/add more than 1 voxel at time!)
+rotate, flip, move around
+a bad workaround for copy/paste (comparing to no copy/paste SLAB6 has, it's mighty good)
+Mirror
+Custom edge color
+Grid
and more


Cons (For now)

-Requires OpenGl
-Can't set offset

Needed tools
the MagicaVoxel itself- https://voxel.codeplex.com/
we can't completely break free from SLAB6 yet - http://advsys.net/ken/download.htm
Something to convert pngs to tgas, for example, png2tga - http://www.easy2convert.com/png2tga/


The actual Tutorial

Part 1- Importing that sprite

1- Pick any sprite you want to do. The sprite I'll use is ww-doomnukem's STIMA0
Image


2- MagicaVoxel can't import png files, but it can import .tga ones.Use the png2tga to create the tga, or whatever method you may choose


3- Execute MagicaVoxel. Drag the .png to palette first and then drag the png again, this time into the cube

Image

Part 2- Modeling

you should have something like this
Image

1- Get used to the hud. Most functions are named after letters, so if you want to know what the g,e and f under Line tab mean click the circled i next to the console. Next time you mouse over a function it will tell it's name and hotkeys

Very important functions to know:

v,f and b are brush settings.
V works like pencil in paint ( not very useful)
F is face edit and works like a bucket ( you can change if it's color or geo based in the Face tab)
B adds/paints/erases every cube from the cube you clicked to the last cube you dragged

picking colors is done by holding alt and clicking on the cube with desired color

In the same bar as the console icon next to the ruler toggles freemode camera

How to copy/paste(kinda): under the shape tab, there's a pattern function. It places wherever you point at the voxel specified in the pattern tab on the lower right. Copying is done by saving the desired cubes in another voxel and pasting is done by using that voxel in the pattern function

2-You probably want your voxel to be deeper than 1 cube. As shaving is easier than adding cubes, Decide how large your voxel will be at it's maximum. For example, I want my syringe to be
5 cubes large at it's maximum. Then go to Scale and write "y (insert how large here)"

Image

(Hint: some voxels need more precision than 1 pixel : 1 cube. You can scale them 2X the original sprite, work in detail, and then scale them back to the original size with voxeldef)

3- Remove voxels until it's at desired shape

4-Touchups. Don't deviate too much from the original in the parts that the original sprite doesn't cover

Part 3- Exporting and Loading

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.
Done! Now you have an working voxel. It needs to be in a voxels folder if it's in a pk3 or between VX_START and VX_EN if it's in a wad
Last edited by Voxelbro on Mon Apr 21, 2014 9:34 am, edited 1 time in total.
User avatar
Voxelbro
If it's possible to get lost in a given map, I will
 
Joined: 22 Feb 2014

Re: Voxels with MagicaVoxel

Postby Tormentor667 » Fri Apr 18, 2014 9:02 am

Very cool tutorial :)
User avatar
Tormentor667
needs more detail
 
Joined: 16 Jul 2003
Location: Germany

Re: Voxels with MagicaVoxel

Postby YukiHerz » Fri Apr 18, 2014 2:32 pm

I'll give this a shot, seems interesting

Edit: WHOOOSH!.

Image
User avatar
YukiHerz
Cheap Spaghetti Dude
 
Joined: 02 Dec 2013
Location: Why tho.

Re: Voxels with MagicaVoxel

Postby wildweasel » Fri Apr 18, 2014 4:03 pm

This doesn't look too difficult at all. I don't suppose MagicaVoxel can edit existing KVX files, can it? (I cannot confirm, since I'm on my Linux netbook at the moment.)
User avatar
wildweasel
Your Toast is Mine.
 
Joined: 15 Jul 2003
Location: Netherpost (the 11th Circle of Post Hell)

Re: Voxels with MagicaVoxel

Postby YukiHerz » Fri Apr 18, 2014 4:13 pm

i could import a .vox by dragging it into MagicaVoxel, but it didn't work for .kvx, so no.
User avatar
YukiHerz
Cheap Spaghetti Dude
 
Joined: 02 Dec 2013
Location: Why tho.

Re: Voxels with MagicaVoxel

Postby Voxelbro » Fri Apr 18, 2014 6:15 pm

wildweasel wrote: I don't suppose MagicaVoxel can edit existing KVX files, can it?


Just open the kvx in SLAB6 and save it as .vox. MV can import slab's .vox


HazeBandicoot wrote:Edit: WHOOOSH!.


nice one.
User avatar
Voxelbro
If it's possible to get lost in a given map, I will
 
Joined: 22 Feb 2014

Re: Voxels with MagicaVoxel

Postby agaures » Fri Apr 18, 2014 8:47 pm

First attempt at using this program:

Spoiler:


I quite like it. Found it relatively easy to use.
User avatar
agaures
Stop sitting on me scalliano.
 
Joined: 07 Jan 2013
Location: New Zealand

Re: Voxels with MagicaVoxel

Postby Enjay » Sat Apr 19, 2014 2:54 am

While I'm not trying to rain on anyone's parade, I'm still not feeling the love for voxels. I'd rather see either of the first two of these in game over the third:

Image

While I can see it's a well enough made voxel model, most of the time, I just don't think voxel models look particularly good. They have a use but, IMO, it's not the wholesale replacement of sprites.
User avatar
Enjay
Everyone is a moon, and has a dark side which he never shows to anybody. Twain
 
Joined: 15 Jul 2003
Location: Scotland

Re: Voxels with MagicaVoxel

Postby agaures » Sat Apr 19, 2014 5:24 am

Enjay wrote:Stuff


Ah. Thank you for your kind words and support.
User avatar
agaures
Stop sitting on me scalliano.
 
Joined: 07 Jan 2013
Location: New Zealand

Re: Voxels with MagicaVoxel

Postby Enjay » Sat Apr 19, 2014 7:12 am

It's not a problem with what you did - you made a good, little model. It's just that I personally find the voxel format itself not very nice to look at. YMMV as they say. :)
User avatar
Enjay
Everyone is a moon, and has a dark side which he never shows to anybody. Twain
 
Joined: 15 Jul 2003
Location: Scotland

Re: Voxels with MagicaVoxel

Postby Voxelbro » Sat Apr 19, 2014 7:41 am

but Enjay, the comparison you posted is unfair. agaures posted the image with advanced shading on,which makes extra blocky voxels looks nothing like in game. Compare in-game pics of the three
User avatar
Voxelbro
If it's possible to get lost in a given map, I will
 
Joined: 22 Feb 2014

Re: Voxels with MagicaVoxel

Postby Enjay » Sat Apr 19, 2014 8:08 am

True, but I don't have a picture of his model without the advanced shading. I had the sprite though, and I whipped up the MD3 model in 5 minutes.

Regardless, advanced shading or no, the IMO, the blocky, graininess of voxel models makes them quite ugly in my eyes when they are used in game. As a general rule, I don't find them to be an improvement over sprites and with curved models (e.g. your avatar, a soul sphere, etc) I think they look borderline dreadful. I'm not saying that they don't have their place. For example, I think making cunning parts of map architecture with voxels rather than mid-textures can work very well (e.g. diagonal beams "holding up" a roof, a bridge etc etc). However, I simply don't think that they work well for many sprite replacements.

I am, however, also aware that I'm not going to convince anyone otherwise (nor am I trying to) so it's possibly best if I just butt out of the thread. I've expressed my thoughts on the matter but I don't want to bog things down with an argument over something very subjective where I'll probably just end up annoying people who like voxels and who feel I'm trying to undermine their efforts (which I'm not).
User avatar
Enjay
Everyone is a moon, and has a dark side which he never shows to anybody. Twain
 
Joined: 15 Jul 2003
Location: Scotland

Re: Voxels with MagicaVoxel

Postby ephtracy » Mon Apr 21, 2014 9:20 am

Hi Voxelbro,
just discovered this cool post:)
so I improved MagicaVoxel based on your tutorial to make things a little easier :

1. Support PNG format sprite/palette import/export
2. Now it will use the first 255 individual colors from image to generate the palette
( before it used the first 255 pixels of image, so may not be very accurate )

Here are some details, Thanks:) https://voxel.codeplex.com/wikipage?title=How%20To&referringTitle=Home
Image
ephtracy
 
Joined: 21 Apr 2014

Re: Voxels with MagicaVoxel

Postby Voxelbro » Mon Apr 21, 2014 12:42 pm

I'm flattered you posted here! Your software made my work way better and my life easier!

And now you're here, time for some feedback.
Is it possible to instead of attaching a cube of a selected color,I toggle a function, and now it attachs a cube with the color of the face I'm pointing at? This would make adding as easy as shaving.
Looking foward sub folders in the models list, as I have over 200 of them.
User avatar
Voxelbro
If it's possible to get lost in a given map, I will
 
Joined: 22 Feb 2014

Re: Voxels with MagicaVoxel

Postby torridgristle » Mon Apr 21, 2014 11:02 pm

After extruding, is there a way to cut down on the thickness by removing voxels from the middle to preserve the front and back faces?
User avatar
torridgristle
Sprites will be 120% tall in-game.
 
Joined: 23 Aug 2013

Next

Return to Tutorials

Who is online

Users browsing this forum: No registered users and 1 guest