OBJ import problems

Started by firesuite, September 12, 2007, 12:11:47 AM

Previous topic - Next topic

firesuite

First off i apologise if this has been asked before, ive done a search on this forum and found many topics on obj's but none that help.

Has anyone sucessfully imported objects from Maya into TG2, i can get the model in fine but none of the shaders appear, the model is a nice solid white.
i remember vaguely reading about this somewhere months ago but have now got round to it myself and im having a hard time figuring it out.

Could anyone point me in the right direction  ??? again i apologise if im going over familiar ground to some of you :P

Many thanks

Oshyan

There are definitely a number of topics on the subject but they can be hard to wade through. Documentation on this subject will be much better when we ship. For now there are a couple major things to check.

First, make sure the textures you're using in Maya are not procedurals. If they are they won't translate into an exported OBJ to *any* program, TG2 or otherwise. If Maya has a method of rasterizing textures for export then you can use that.

Second, load the OBJ in any other 3D program you might have to make sure it's a TG2 problem and not just a general OBJ export issue. Blender is free, or you can try Poseray (also useful for other purposes, see below) or Meshlab. If the object loads and looks ok (with textures) in another app then you definitely know it's a TG2 problem.

Next try opening the .mtl file with a text editor, something like like Notepad (Windows) will work fine, or use the editor of your choice. If no .mtl file is exported with the OBJ then that's the reason for the lack of textures and no other app will probably show textures either (unless it supports texture embedded OBJ's which I *think* is an obscure and seldom used feature). In the .mtl file you should see references to 1 or more UV map areas and associated texture image files. If there are no image file paths in the .mtl then it is not being exported correctly from Maya or the textures aren't image based to begin with and are thus not able to be exported (see point 1). If there are paths to images then it is probably working correctly and may just take a little tuning.

If the paths were in the .mtl file but the textures were stored in a folder other than where the OBJ is, try copying the textures into the exported OBJ folder and re-export from Maya, or edit the .mtl manually to point to the new location.

You can also try loading the object in Poseray and re-exporting. Poseray seems to have one of the better (or at least more compatible) OBJ export systems out there. You may need to do some more advanced material assignment/reassignment in Poseray - search for "poseray" in the forums and you should get instructions on that.

Finally you can try exporting a simple, smaller model and post it here so others can test and help you diagnose.

OBJ loading is still not as simple and problem-free as it could be but more often than not with the newer versions the problem lies somewhere in-between the modeler and TG2, not necessarily in TG2 itself.

- Oshyan

bigben

Quote from: Oshyan on September 12, 2007, 01:26:22 AM
... If no .mtl file is exported with the OBJ then that's the reason for the lack of textures and no other app will probably show textures either (unless it supports texture embedded OBJ's which I *think* is an obscure and seldom used feature)....

PoseRay has good support for this in my experience. I've loaded several obj files that had no mtl but the textures loaded (and exported correctly)

If your textures are tiled, you may also need to do some post work in TG2 to re-tile the texture. The default shader doesn't have options for repeating/flipping images.

rcallicotte

PoseRay is the best I've seen and it's free.
So this is Disney World.  Can we live here?

Ogre

I use Maya for this  all the time with no issues. Are you generating an OBJ and a MTL file? Make sure you have the appropriate options selected before you export.
"If you find me feeding daisies
please turn my face up to the sky and leave me be watching the moon roll by.
What ever I was it was all because I've been on the town washing the BS down."

-Gordon Lightfoot

DeathTwister

HAha, my 2 cents as well.

  You cannot bring in multi-sub maps i have found, and yes most times you have to go in and remap the textures by re-adding in the multi texture tab using a image shader so you can also re-tile them as well. Mine come out black when not there on the model.  And of course remember to not use more then 16 textures on a model for now.  I am working on a workaround for that, so if I find one, I will post it until PS can get a final solution for it. I know they are working on that as well. I had a dream the other night on how I may be able to do a workaround on multi textures, but have not had the time yet to see if it will work, sure do hope so though /winks.

  Myself? I use 3d Max and then export out to XSI 6.2 and make them .obj there.  It seems to work the best for me.  And tgd2 seems to understand the XSI texture shaders.  Make some stuff in Bryce as well and bring them into XSI to tgd2, but that is just my workaround.  I am sure there are much better. But max flat out sucks when it comes to .obj export, and not sure why, but it has for the last few years anyway.
Maylock Aromy DeathTwister Stansbury
ATOMIX Productions

EBAndrew

These are good tips, and questions I'm sure I would have asked shortly enough when I get our modeller to make me stuff in Maya. Though I didn't ask the initial question, thanks for the pointers!
-Andrew

DeathTwister

Hehe NP my friend, Theres plenty of tuts around for modeling, and I will see if I can get on that work around for multi textures this next week.  I need it bad as well, but been busy with other Apps atm.

DeathTwister
Maylock Aromy DeathTwister Stansbury
ATOMIX Productions