importing OBJ and MTL files

Started by Balletdude, July 14, 2021, 12:54:54 PM

Previous topic - Next topic

Balletdude

I'm trying to import an OBJ into terragen. I have no issues doing that, but no matter what settings I use it doesn't import any of the materials I have set, in my original program (blender)
From what I've read Terragen  can read material data from an MTL file referenced by the OBJ file, and a Parts Shader with its associated nodes will be created and assigned to the Surface shader input (this info copy and pasted from the from the wiki)
I have searched online and it suggested looking at the obj file with a text editor to see if there are any spaces in the name of the material file listed in it, and that the names match. Having done this there are no spaces in the file names, and they do match.
I have tried all configurations of exporting the obj to no avail and even created a simple cube with materials added and imported into a new terragen scene, but nothing.
Parts shaders are created, but they are all set to the same default value (i.e. the default values of the default shader). I have managed to get some colour applied when imported but all other settings eg roughness, metalness are just their default values Am I trying to do some thing that is impossible or am I doing something wrong?

Best 

Simon

WAS

Some object exporters write the data a little funny and Terragen ignores it. I use poseray to set materials and it reads those MTL files. However Materials are never really read right, or complete, and require manual setting up in Terragen. I linked you to that PBR Node creator in your last post, which can be used to setup materials.

Dune

WAS is right; it's always best to edit any imported obj's by hand. Also because one (I do) often adds internal shaders/mergers, be them procedural (color variation, skin faults...), or by image map, or world opacity, distribution of certain parts or additions with regard to slope or altitude, that sort of thing. And my experience is that solid colors are often much lighter in TG than the original colors looked (in Poseray, e.g.).

Balletdude

Thanks everyone Just upgraded to 4.5, so just getting use to the new features

digitalguru

This page shows the format of how the .mtl file can define the imported shader parameters. Some apps set this up better than others:
http://paulbourke.net/dataformats/mtl/