Page 1 of 1

Import "voxel" model with texture

Posted: Sun Nov 15, 2015 6:17 pm
by Ats
Hi everyone, It's been a long time...
Currently I'm playing with MagicaVoxel (https://voxel.codeplex.com/) and I was wondering, once you have converted the obj file to 3ds, how do you import it WITH it's texture to ZGE? Thanks for your help!

Re: Import "voxel" model with texture

Posted: Sun Nov 15, 2015 9:04 pm
by Kjell
Hi Ats,
Ats wrote:Currently I'm playing with MagicaVoxel (https://voxel.codeplex.com/) and I was wondering, once you have converted the obj file to 3ds, how do you import it WITH it's texture to ZGE?
Make sure to include the texture coordinates when converting from OBJ to 3DS and when importing the 3DS file into ZGE ( and rotate the mesh 90 degrees as the 3DS format uses Z-axis as up ). After that it's simply a matter of importing the PNG that is also exported from MagicaVoxel ( to the export folder ) as Bitmap in ZGameEditor, using that Bitmap as Texture on a Material with TexCoords set to ModelDefined and you're good to go. Attached is the Monu example that comes with MagicaVoxel exported to ZGE.

K

Re: Import "voxel" model with texture

Posted: Mon Nov 16, 2015 12:12 am
by Ats
Oh! I was using an online converter to obtain the 3ds file, and I didn't know that it was removing the texture coordinates...
Now it's working. Thanks Kjell :)