Planetside Software Forums

Support => Terragen Support => Topic started by: mathieubr on January 17, 2014, 05:57:05 AM

Title: Export gathered forgets .mtl files?
Post by: mathieubr on January 17, 2014, 05:57:05 AM
Hi,
Just had a very painful experience (moneywise) in RanchComputing renderfarm because the export gathered function of terragen seems to forget to gather the .mtl files that goes along my .obj files in the project. .obj and textures are exported, but no .mtl ...
This resulted in a rendering with broken links between textures and their objects, not detected by the renderfarm filters.

Am I wrong? Is there a way to avoid this? Or do I just have to copy the .mtl manually ?

Thanks
Title: Re: Export gathered forgets .mtl files?
Post by: jo on January 17, 2014, 06:35:30 AM
Hi,

You shouldn't need the MTL files. The MTL files are only be needed when the OBJ is first loaded into the project. Once that happens all the material nodes are created in the project. When you save the project all those nodes are saved as well of course, and so the MTL file is no longer required. When you gather the project the paths to the image files are rewritten to point to the files in the Project Assets folder inside the folder you saved the gathered project in.

You can verify everything is working as it should. The best way is to try opening the gathered project and checking everything is ok. You will get warnings from the Obj reader nodes that the MTL file can't be found but they can be ignored.

Another way to verify things is to open the Project Assets window from the "Show Project Assets" item in the Project menu. Any assets which can't be found will be shown in red. You can click the "Only show assets with problems" checkbox to just show assets with problems. You can check that assets are you expect them to be by selecting them and looking at the "Asset path" text. It should be something like:

<Path to the gather folder>/<Gather folder>/<Project Assets>/filename

It is important to note that the actual path in the shader node itself will be a relative path and not that full path. This works because the OBJ file will be in the same folder as the image files (the Project Assets folder).

There is more info about the Project Assets window here:

http://planetside.co.uk/wiki/index.php?title=Project_Assets_Window

If you have any other questions please ask.

Regards,

Jo
Title: Re: Export gathered forgets .mtl files?
Post by: mathieubr on January 17, 2014, 03:41:15 PM
Thank you for your answer.
Made me dig deeper into how I created the object from C4d with Riptide plugin for export, and realised that some materials were missing from the start in those files, but were replaced by the grey default diffuse color when rendering on my computer. When gathering the project though, the missing materials are actually not detected by terragen, trigger a warning, and then appeared black in the render instead of grey on my computer, which was misleading for me and made me think it was loaded correctly.
My bad,
Thanks a lot!
M