Shapr3d .obj export to Unity3d

Hi,

Is it somebody else that have used Shapr 3d obj files imported in Unity3d?

I can easily import all the files but I can’t manage to get textures right in the unity. If someone can help me I will be grateful!

I love Shapr3d!

Hi, the engineering team fixed this issue! Will come in next release. :wink:

1 Like

Nice!:+1: When will this release be available?

Thanks

You are welcome! No ETA yet. Will let you know once it’s out.

Great news! This is exactly what I came here to find out. Unity, but also other apps - a good obj that we can convert to USDZ to put our objects in AR, particularly architectural models.

Just to be clear - Are you changing the obj export from vertex colors to texture with material? I just struggled for a while to find a conversion process. Close but no luck in Meshlab.

Can you point us to a conversion method/tutorial while we are waiting for the new version? Thanks!

Okay, I have found a way to convert obj vertex colors to texture using Meshlab. It involves seven steps:

Export from Shapr3D
Import mesh from Shapr3D into Meshlab
Filters/Normals, Curvatures, and Orientation/Transform: Flip and/or swap axis
Filters/Texture/Parameterization: per Triangle
Filters/Texture/Transfer: Vertex Attributes to Texture (1 or 2 meshes)
Export Mesh…
Import into Unity (or other app)

I will expand this with parameters and tips for each step, but I wanted to get this out there.

Thanks
Dave

I’m
Curious can any of these models be used in a game engine?, I was under the impression it would be all triangulated and require remeshing in maya or zbrush?.

If a clean game ready asset is possible that’s awesome. I work in gaming and would use it professionally if it works well in real-time pipelines

I just tested this workflow several times with Unity. That is my goal also. Meshlab seems to do the triangulation, the reorientation of the Z axis, and the texture creation just fine. I shudder to think of the complication taking it to Maya or Zbrush (even Blender) would involve.

Since I know there is someone as eager as I am, I will expand this workflow outline so you can try it. It took me a few tries to get the parameters and the filter order correct, but the model comes into Unity like a normal obj import, texture, material and all. Stand by - should have it done this weekend.

Happy to contribute to the community here. Shapr3D (I’m pretty new to it) seems to be a good tool. But you have to have the Pro version to color the model and do the exports.

(Expanded tutorial - I will post this as a new item in the forum also)

How to convert Shapr3D export obj with vertex colors to obj with texture using Meshlab.

Export from Shapr3D
In Export, choose 3D model, then Obj
Third choice determines whether export is one mesh or several
Click Advanced Options (tiny, dim at bottom) and turn on Include Vertex Colors

Import mesh from Shapr3D into Meshlab
File/Import Mesh
It opens with the vertex colors showing, but Z axis is wrong - needs changing

Filters/Normals, Curvatures, and Orientation/Transform: Flip and/or swap axis
In panel, click Preview, Fli[p Z axis, Swap Y-Z axis, and Freeze Matrix, in that order
Confirm that the model is right side up - correct Y and Z
Apply, close

Filters/Texture/Parameterization: per Triangle
In panel, change 1024 to 2048 (worked for me YMMV)
Apply, close

Filters/Texture/Transfer: Vertex Attributes to Texture (1 or 2 meshes)
The name of your exported mesh from Shapr3D will be in in both source and target - that’s fine
Enter a new name for the png texture file (especially if you are doing multiple tries at this)
Texture width and height change to 2048
Enable (check) Assign Texture and Fill Texture
Apply, close

Export Mesh…
File/Export Mesh as……
Give your exported mesh a name
At bottom make sure you change to Alias Wavefront Object (obj)
Pick a destination for the file and press Save

NOTE: the obj and mtl files will save where you specified… If the original export is not in the same place, you will find the png texture in the same directory as the original file

Create a new folder for your export and drag all three files into it

Import into Unity (or other app)
Open Unity
Drag the folder with the three files into the Assets folder
In Unity, open the imported folder - there will be a prefab cube, an obj and a texture file
Drag the prefab into your scene

2 Likes

Hi, I’m new to shapr3d and unity, I have done designs at shapr3d but exporting the .obj files to unity by following your procedures still shows gray colored objects. I have tried both old (July 2020) and new version (Feb 2022) of meshlab. As the new version of meshlab, the assign texture option is missing. Any help is greatly appreciated and thank you.