Planetside Software Forums

General => Terragen Discussion => Topic started by: AstroStudio on November 03, 2011, 04:41:04 PM

Title: Material (.mtl) file help -- or, how to skin a fish?
Post by: AstroStudio on November 03, 2011, 04:41:04 PM
Hey everyone,

I bought a fish this morning, and he wasn't cheap: http://www.3drivers.com/catalog/329/1939/

But I'm having trouble with him.   I have downloaded the object (.obj) format version.  It came with a materials (.mtl) file and a "textures" directory with jpeg images and ".tga" (targa graphic??) files.  The .mtl file does not appear to be useable.   It only references the .tga files.   When I import the object into Terragen2, I end up with a clay/grey fish.

It seems that I need to build a proper .mtl file that makes use of the jpegs.  I do have PoseRay installed.  I'm kind of confused though -- I'm not seeing changes in the preview window when I apply an image.  Can someone tell me if I'm on the right track?

Attached is a screenshot of the texture files I have to work with.

Title: Re: Material (.mtl) file help -- or, how to skin a fish?
Post by: rcallicotte on November 03, 2011, 11:21:14 PM
Usually, you need to verify the path to your files in the MTL file per texture.  This has been my issue, usually, when I don't see the texture.
Title: Re: Material (.mtl) file help -- or, how to skin a fish?
Post by: AstroStudio on November 03, 2011, 11:49:21 PM
That's good advice, calico.  Indeed I already checked that and did insert the missing subdir "textures/" to point to the .tga files, and also removed quote characters from the path name.  Still no luck, though.   :-[
Title: Re: Material (.mtl) file help -- or, how to skin a fish?
Post by: Kadri on November 04, 2011, 12:48:29 AM

Did you tried it in another 3D software? Does it have an UV map ?
Maybe you have to make one or use another kind of mapping.
Title: Re: Material (.mtl) file help -- or, how to skin a fish?
Post by: Klas on November 04, 2011, 02:05:55 AM
Are there any tabs or spaces at the beginning of the lines in the mtl-file ? TG2 do not like them.
Title: Re: Material (.mtl) file help -- or, how to skin a fish?
Post by: AstroStudio on November 04, 2011, 02:55:37 AM
Bingo!  Deleting the leading spaces made all the difference.  Example results attached.  Thanks, Klas!

Next challenge: what extra steps are needed to make opacity (transparency) and speculars (reflectivity) work for objects in Terragen?
Title: Re: Material (.mtl) file help -- or, how to skin a fish?
Post by: Dune on November 04, 2011, 03:29:04 AM
You should point the tabs in the fish's default shader to the files for opacity and speculars. Interesting fish. As a biologist I would very much like to see your final render, by the way. I hope you'll post!
Title: Re: Material (.mtl) file help -- or, how to skin a fish?
Post by: Klas on November 04, 2011, 04:44:50 AM
The opacity: You can use the opacity tab of the default shader to add the opacity image, but if the image contains gray parts sometimes the results are better when its blended by a surface layer. But in this case the invisible parts will give shadows. The attachment contains a clip file with an example. Point the image map shader to the images and attach the reflective shader (rs) to the Object part.
Title: Re: Material (.mtl) file help -- or, how to skin a fish?
Post by: AstroStudio on November 04, 2011, 06:32:48 AM
Dune: I think you mean that I must assign a default shader and set 'Reflectivity image' to spec.jpg and 'Opacity image' to opa.jpg -- if so, I get a bad result: the object loses its skin and I'm back to a clay/grey fish.

Klas: I loaded your clip file, but I'm not exactly sure where the nodes are supposed to connect.   :-\

Thanks for your patience with me.   I am learning a lot from you all.
Title: Re: Material (.mtl) file help -- or, how to skin a fish?
Post by: Klas on November 04, 2011, 07:14:19 AM
In the node network find your object. Right click->Internal Network. There you should see the "Parts parts 01". Right click->Internal Network. There are the gray (grey?) "Object parts" with the connected "Default shader". If there are more then one object part find the part for the skin. Load the clip file and connect the "rs fish" with the part.
Quote from: AstroStudio on November 04, 2011, 06:32:48 AM
Dune: I think you mean that I must assign a default shader and set 'Reflectivity image' to spec.jpg and 'Opacity image' to opa.jpg
And the diffin.jpg to the "Colour image" on the Colour tab.
Title: Re: Material (.mtl) file help -- or, how to skin a fish?
Post by: AstroStudio on November 04, 2011, 11:51:31 AM
Quote from: Klas on November 04, 2011, 07:14:19 AM
And the diffin.jpg to the "Colour image" on the Colour tab.

Ah, of course.  ::)  Alles ist schön, mein Freund.  8)



Title: Re: Material (.mtl) file help -- or, how to skin a fish?
Post by: Klas on November 04, 2011, 05:01:46 PM
 :)
Title: Re: Material (.mtl) file help -- or, how to skin a fish?
Post by: inkydigit on November 05, 2011, 07:42:47 PM
 :) :)
looks good!
Title: Re: Material (.mtl) file help -- or, how to skin a fish?
Post by: bobbystahr on November 09, 2011, 10:22:36 AM
" looks good!"......and so it should man, at 99 bux for a fish. .. ...
Title: Re: Material (.mtl) file help -- or, how to skin a fish?
Post by: rcallicotte on November 09, 2011, 01:12:37 PM
Oooh, now this would be fun - http://www.3drivers.com/catalog/329/12556/ or this one - http://www.3drivers.com/catalog/329/12549/

I like the fish!
Title: Re: Material (.mtl) file help -- or, how to skin a fish?
Post by: Klas on November 09, 2011, 04:06:35 PM
http://www.3drivers.com/catalog/331/9707/
:)