Combining imported object with mtl file

Started by rosoule, February 02, 2018, 12:58:07 PM

Previous topic - Next topic

rosoule

 :'( :'( :'( :'( :'( :'( :'( :'( :'(
Of all the things that REALLY frustrate me it is the importation of Obj files and mtl files. I am sure the fix is simple, but like so many things TG, not obvious.
I have Poseray, run the files through it no problem and save it as an OBJ file.
When I import it and render it the 3D object is there, but with no mat'l at all.
I open the internal network and the material file is there, but disconnected.
Can someone explain how to connect them. Do I use the Node function or menu function and, step-by-step how?

D

Dune

How do you mean, material file is there but disconnected? If you assign materials in Poseray, at least color and opacity are taken over correctly. Displacement, reflection not, iirc. So best is to reconnect everything anyway in TG.

luvsmuzik

double click select the red material node to open your mtl shader...when you are in the node network

luvsmuzik

also in Poseray, overwrite the mtl file should be selected when you export adjusted obj....usually

Oshyan

When you load the model in Poseray, does it appear correct, with the right textures, etc?

- Oshyan


Dogtrack

Hi. I've been exploring TG for the past few weeks and both impressed and daunted :-[

One persistent problem I've had in the last few days has been importing objects and getting their textures to stick. My main issue is with a birch tree model I found on line for free (the files are obj, mtl with associated bark and leaf jpegs textures, bump textures, alphas). I've disappeared down a rabbit hole of trying to sort the issue out in Blender, Maya, POV-Ray (the Mac eq. of Poseray- for my purposes incomprehensible!). I've been trying to figure out the mtl references opening the file in Textedit but fear this is another red herring.

In the forums I can't find any easy way of re-linking texture files to particular obj components within TG and tbh I think that it's technically beyond my capabilities.

The scene I have in mind is not hugely ambitious- a leaf-littered forest floor with silver birches (a la Gustav Klimt's forest paintings).

Any advice would be much appreciated!

Dune

In any of the tabs in an object (in the default shader, inside parts shader, inside object, inside population -  if used in a pop) you can import an image map, so you'd need to import one in color, one in displacement (usually a greyscale bumpmap) and one in opacity tab. If there's an alpha channel in the texture map, import the same color map in opacity tab and check 'use alpha'. That's simply the basics.
If you want them, and other shaders you add inside the object, to stick, save the object as tgo for future imports. All shaders will be there.

Dogtrack

Many thanks, Ulco. I seem to be making progress, though the tree trunk seems to be going transparent where it should be white. I think some more hitting my head against the screen may be called for! Super website, btw!

sboerner

The first couple times you import obj files it can be perplexing. I think everyone goes through some trial and error with this, so don't be frustrated.

Since this is a free model I'd be willing to take a look at it if you want to upload it here (along with any related material files). There might be some incorrect normals or something else going on.


Dogtrack

#10
Thanks, Steve, that would be a huge help! Have sent an email. Richard

Oshyan

We are working to make some improvements to OBJ import for situations where there is no MTL included. But there are serious limits there. With no MTL, there is no way to auto-load the textures. What happens now without an MTL, though, is that you don't even get "parts shaders" where you *could* successfully connect new e.g. Default Shaders or Image Map Shaders to manually load your images. That's what we're aiming to improve on. So basically right now without an MTL you may not even be *able* to texture an OBJ properly inside of Terragen alone, and while MTL files should always be included when textures are used, many other applications don't do it (which is very frustrating). The current workaround is to go through an app like PoseRay that can create MTL files, but you have to know how to manually assign textures there too.

With an MTL Terragen should handle OBJ loading fairly well. If you have an object it's not working well with, let us know, ideally share it with us via email to support AT planetside.co.uk. Hopefully we can make improvements based on an example of particular issues.

- Oshyan

Dogtrack

Many thanks, Oshyan.

I've sent an email with a dropbox link containing the obj, mtl, jpg files to the support address.

sboerner

QuoteThanks, Steve, that would be a huge help! Have sent an email. Richard

Richard, did you receive my email response?

Dogtrack

Hi Oshyan and Steve
Your email responses were so helpful- thank you both for your efforts in remedying the files!