Import "voxel" model with texture

All topics about ZGameEditor goes here.

Moderator: Moderators

Post Reply
User avatar
Ats
Posts: 603
Joined: Fri Sep 28, 2012 10:05 am
Contact:

Import "voxel" model with texture

Post 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!
User avatar
Kjell
Posts: 1876
Joined: Sat Feb 23, 2008 11:15 pm

Re: Import "voxel" model with texture

Post 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
Attachments
Monu.zgeproj
(59.54 KiB) Downloaded 352 times
User avatar
Ats
Posts: 603
Joined: Fri Sep 28, 2012 10:05 am
Contact:

Re: Import "voxel" model with texture

Post 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 :)
Post Reply