TG Final won't open my mtl files

Started by bobbystahr, May 08, 2009, 10:02:02 PM

Previous topic - Next topic

bobbystahr

Now this isn't at all normal as I've had great luck with PoseRay conversions. I'm at my wits end with this so I've attached a zip called text files which has a naked tgd with the Tin Garage added, the .mtl for the Tin Garage and another for Station and Trailer which although TG presents a Parts Shader, she won't fetch the parts. Any help would be greatly appreciated....thanx in advance
something borrowed,
something Blue.
Ring out the Old.
Bring in the New
Bobby Stahr, Paracosmologist

buzzzzz1

There's no object in the zip, just 2 mtl files and the tgd, so I can't really test it.
XFX 750i SLI  nFORCE Mobo
Intel Core2 Duo E8400 3.00 GHz Wolfdale
8 Gig Corsair DDR2 6400
Nvidia GForce 9600 GSO 768 MB
XP Pro 64 bit OS

bobbystahr

Quote from: buzzzzz1 on May 08, 2009, 10:24:08 PM
There's no object in the zip, just 2 mtl files and the tgd, so I can't really test it.
Well what I was hoping for was that someone who knew about .mtl files could have a look see in the text files and maybe tell me why these can't be found in TG Final..that's the error message it gives 'Can't find the matlib files I think it says....I could upload the model as well if you want to have a go at it cuz I built it myself...
something borrowed,
something Blue.
Ring out the Old.
Bring in the New
Bobby Stahr, Paracosmologist

latego

If it says that it can't find the MTL file, the problem is the mtllib statement in the OBJ file. I noticed that your paths contain blanks: I don't know whether OBJ files specification handles this case; you might retry using a blank-less path.

Bye!!!

jo

Hi Bobby,

MTL files shouldn't have spaces in their names. I wrote something up about this in another thread. To get it to work open the OBJ file in a text editor, find the name of the MTL file ( IIRC it will be on a line starting with mtllib, but I may be wrong and can't check it right now ) and rename it so it doesn't have spaces. Then rename the MTL file to that same name. The model should now load correctly.

We are going to have to look into some ways to make TG2 guess at the MTL file when an incorrectly formated OBJ file is being loaded.

Regards,

Jo

rcallicotte

Really?  Is there a good way to do that?


Quote from: jo on May 09, 2009, 06:29:33 AM
We are going to have to look into some ways to make TG2 guess at the MTL file when an incorrectly formated OBJ file is being loaded.

So this is Disney World.  Can we live here?

jo

Hi Calico,

Quote from: calico on May 09, 2009, 07:20:04 AM
Really?  Is there a good way to do that?

Well, you can look at the whole mtllib line and if it has spaces and there happens to be an MTL file which matches that name then it's reasonable to assume that's a match. There may need to some user interaction as well to confirm it, something like that. We'll see when we are able to look into it more.

Regards,

Jo

bobbystahr

Thanks Jo, for taking the time to look and reply. I have eliminated all spaces, as near as I can tell, so what I'm going to do is zip the whole shebang up with all relevant files, post it to sendspace as it'll be too big for the forum and post the link. As I built this model from scratch, anyone who wants can have it, but if y'all solve the problem please post how the heck y did it. This is a garage for a truck I also built in the same program which I had zero problems with so I went ahead and converted the tin garage. I will also include the truck for comparison's sake...well if y fix the garage you can park it there...LOL...thanks again for all the help.. ...
something borrowed,
something Blue.
Ring out the Old.
Bring in the New
Bobby Stahr, Paracosmologist

bobbystahr

O K...here's the whole directory...about 33M so I've put it up on sendspace...very handy free service...good luck to any and all who try this conundrum on for size.. ...

http://www.sendspace.com/file/yc7dj8
something borrowed,
something Blue.
Ring out the Old.
Bring in the New
Bobby Stahr, Paracosmologist

Phoenixf2b

I am having a similar problem.  I am new to Terragen, and I am trying to learn objects.  I am currently making simple shapes in 3D Max with just colored textures and exporting them as .obj files.  When I import them into Terragen the object imports but the texture doesn't.  The warnings box says "OBJReader: could not open mtlib".   I can only see the bounding box but not the object itself, but when I render it's there only completely black.

Any ideas what could be causing this?  Thanks!

neuspadrin

#10
Your mtl file must also not have any spaces in its name. 

@bobbystahr
I took your files you uploaded, and just took the 3ds file (Assumed it was the source)
In poseray, i just went to obj output,  had save normals, save texture, and fix material and group names checked.  When I exported I exported to Tin_Garage (note, underscore instead of a space ;))

Basically process the obj's or original files through poseray, and when you export the obj, make sure you rename it to to something with no spaces in it.

below is quick render of that object (not all black).


and here is also the internal of the parts shader below (crazy number of materials in your file :P)

bobbystahr

A million thanks neuspadrin...that damn underscore in the object name was indeed the culprit...dunno why I never tumbled to that..again thank you...hope you can use the models..all original from Imagine3D, coverted to 3ds in accutrans and then to obj with U/V mapping in PoseRay. I use identical methods as you but it was that silly_...LO .. ...
something borrowed,
something Blue.
Ring out the Old.
Bring in the New
Bobby Stahr, Paracosmologist

Phoenixf2b

my file names are one word names only, no spaces. 

Also, is it possible for a model created in 3D Max go straight into Terragen?

neuspadrin

Quote from: Phoenixf2b on May 09, 2009, 11:44:17 PM
my file names are one word names only, no spaces. 

Also, is it possible for a model created in 3D Max go straight into Terragen?

If you export it from 3dsmax as a obj its possible.  But terragen sometimes is a little picking on formating of the obj file, as theres tons of different ways to write one really.  So if that fails often putting it through poseray just loading and then saving will fix problems.

What files are you having trouble with? can you upload them so we can take a glance.

Phoenixf2b

right now all I am trying is making a sphere in Max and exporting it as an .obj and trying to import that into a new terragen file.  Trying to keep it as simple as possible since I am trying to learn.  Do you know what settings are needed in max to export as an .obj?