guillaumechereau / goxel

Goxel: Free and Open Source 3D Voxel Editor
GNU General Public License v3.0
2.83k stars 226 forks source link

Texture not available #321

Closed Te3Que closed 1 year ago

Te3Que commented 1 year ago

When exporting in goxel to .obj the texture is visible in meshlab. But if it's imported to Unity 2022.3.0 the texture is not visible. Is this a know issue?

Te3Que commented 1 year ago

so in blender 3.5 when opened it does not show the texture/material either. It is possible to see the texture/material this way: Viewport Shading > Color > Attribute

So the .obj not having it's color have something to do with how it's stored in a specific way?

guillaumechereau commented 1 year ago

Yes the obj export put the color as vertices attribute only. You can use the glTF export that supports using a texture for the colors.

Te3Que commented 1 year ago

So for anyone that comes looking for a solution, here is one way of getting textures in Unity: Export from goxel in .gltf Open the .gltf in blender Export the model in .obj Then in blender go-to Texture Paint In the 2d view, default the left window. Select the image that have a few colours and rest is black. Then go-to Image > Save as In Unity import the .obj and the .png from blender Make a material and add the .png as base map. Apply material to .obj