Skip to main content
Question

Write textured OBJ to FBX

  • November 20, 2018
  • 8 replies
  • 220 views

maciejm

Hi Everyone, I have problem with exporting textured OBJ file to other 3D files. Only geometry was exported. It is even possible?

 

 

8 replies

owen
Forum|alt.badge.img+1
  • November 20, 2018
Hello, yes it doesnt work! I submitted a support case about this and I think it has been added to the fix list. My workaround is to open the obj in 3dsmax and save out the fbx from there. Not that seamless though! Owen

mark2atsafe
Safer
Forum|alt.badge.img+43
  • Safer
  • November 20, 2018

As Owen mentioned, it seems that writing textures to FBX format doesn't work (other formats should be OK, I think). For your info, the reference number for this issue is FMEENGINE-56272. I've added this thread to the issue so that you'll be informed here when it is fixed. Unfortunately I don't see a planned target date for this fix, so I can't say when that might be. Apologies for any problems this is causing you. If there's any assistance we can give re Owen's workaround, do let us know.


daveatsafe
Safer
Forum|alt.badge.img+19
  • Safer
  • November 20, 2018

Hi @maciejm,

The FBX writer seems to be sensitive to how the texture is applied to the 3D object.

If you would like to send me a copy of your workspace and the source OBJ data, I may be able to produce a workaround for you that will enable the texture output. If you don't want your data made public, you can send it to me directly: .


maciejm
  • Author
  • November 21, 2018

Thank you Mark for your information. I will be in co-action with Dave.


daveatsafe
Safer
Forum|alt.badge.img+19
  • Safer
  • November 26, 2018

Hi @maciejm,

The texture information on the OBJ file you sent seems to be from colors set on the mesh vertices. This isn't standard for OBJ, and I admit that I hadn't seen it before. However, FME does read this color information, and will show the texture in the Data Inspector.

 

 

However, FME's FBX writer does not use the vertex colors when writing to FBX. The FBX format does seem to be capable of storing vertex colors, so I have created an enhancement request to add this capability to FME's FBX writer as well.

 

 

In the meantime, the vertex colors must be converted to an image based texture. There is presently no simple way to do this in FME, but it can be done in the free utility MeshLab.

 

 

Please install and start MeshLab and do the following steps:
  • File -> Import Mesh, then choose the OBJ file
  • Pick Filters -> Texture -> Parameterization: Trivial Per-Triangle - set Texture Dimension to 8192
  • Pick Filters -> Texture -> Transfer Vertex Attributes to Texture (1 or 2 meshes) - set texture height and width to 8192
  • File -> Export Mesh As - Save to another OBJ in same folder.

The new OBJ file has a standard image texture applied to it, and there will be new sidecar image and .mat files to accompany the OBJ.

The new OBJ has the specular color set a little bright, so the surface looks quite shiny. The attached workspace will adjust the the appearance to better match the original when converting from OBJ to FBX.

obj2fbx.fmw


  • January 12, 2021
daveatsafe wrote:

Hi @maciejm,

The texture information on the OBJ file you sent seems to be from colors set on the mesh vertices. This isn't standard for OBJ, and I admit that I hadn't seen it before. However, FME does read this color information, and will show the texture in the Data Inspector.

 

 

However, FME's FBX writer does not use the vertex colors when writing to FBX. The FBX format does seem to be capable of storing vertex colors, so I have created an enhancement request to add this capability to FME's FBX writer as well.

 

 

In the meantime, the vertex colors must be converted to an image based texture. There is presently no simple way to do this in FME, but it can be done in the free utility MeshLab.

 

 

Please install and start MeshLab and do the following steps:
  • File -> Import Mesh, then choose the OBJ file
  • Pick Filters -> Texture -> Parameterization: Trivial Per-Triangle - set Texture Dimension to 8192
  • Pick Filters -> Texture -> Transfer Vertex Attributes to Texture (1 or 2 meshes) - set texture height and width to 8192
  • File -> Export Mesh As - Save to another OBJ in same folder.

The new OBJ file has a standard image texture applied to it, and there will be new sidecar image and .mat files to accompany the OBJ.

The new OBJ has the specular color set a little bright, so the surface looks quite shiny. The attached workspace will adjust the the appearance to better match the original when converting from OBJ to FBX.

obj2fbx.fmw

This post was helpful to me as well but for dealing with the PointCloudSurfaceBuilder. It appears the only way it stores texture info is from storing colors on the mesh vertices.

 

It has been two years since this was posted. Is there now a way to convert vertex colors to an image based texture via FME? Or would it be best to save the mesh as an OBJ with 'Write Mesh Vertex Colors: Yes' and use MeshLab to do the conversion?


chrisatsafe
Contributor
Forum|alt.badge.img+2
  • Contributor
  • January 13, 2021
nosradom wrote:

This post was helpful to me as well but for dealing with the PointCloudSurfaceBuilder. It appears the only way it stores texture info is from storing colors on the mesh vertices.

 

It has been two years since this was posted. Is there now a way to convert vertex colors to an image based texture via FME? Or would it be best to save the mesh as an OBJ with 'Write Mesh Vertex Colors: Yes' and use MeshLab to do the conversion?

Hi @nosradom​ ,

 

It sounds like we don’t have anything that can do what Meshlab does, so the process Dave mentioned above is the best for now - at least until the FBX writer has this functionality. Could be worth posting a new idea for this :)


  • January 14, 2021
nosradom wrote:

This post was helpful to me as well but for dealing with the PointCloudSurfaceBuilder. It appears the only way it stores texture info is from storing colors on the mesh vertices.

 

It has been two years since this was posted. Is there now a way to convert vertex colors to an image based texture via FME? Or would it be best to save the mesh as an OBJ with 'Write Mesh Vertex Colors: Yes' and use MeshLab to do the conversion?

Posted as a new idea


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings