Planetside Software Forums

General => Terragen Discussion => Topic started by: Fierys on December 23, 2006, 11:18:37 AM

Title: Problem with 3d object composed of many materials
Post by: Fierys on December 23, 2006, 11:18:37 AM
I have tried to import a 3d object composed of 38 parts (each part has its own material). The problem is that only the first 16 materials from MTL file were applied to the surface shader through multi shader. The rest 22 materials were not connected to the surface shader. I have created another multi shader and have connected the next 16 materials to it. Then I have disconnected the first multi shader from the surface shader and have connected the second multi shader to the surface shader to see what happens. I tried to change materials connected to the second multi shader. The interesting thing is that when I changed materials connected to the multi shader the changes were applied to the parts/materials connected to the first multi shader. For example, when I changed color of the 10th material connected to the second multi shader the change was applied to the 10th part/material connected to the first multi shader although it wasn't connected to the surface shader.
My question is: How to apply the 17th material and the next ones mentioned in the MTL file to an imported 3d object composed of more than 16 parts/materials?   
Title: Re: Problem with 3d object composed of many materials
Post by: Tim O'Donoghue on December 23, 2006, 12:25:28 PM
Can the multi-shaders be daisy-chained? i.e. make another multi-shader the 16th item in the first multi-shader, etc.
Title: Re: Problem with 3d object composed of many materials
Post by: Fierys on December 23, 2006, 12:43:00 PM
I tried to do it but it doesn't work.
Title: Re: Problem with 3d object composed of many materials
Post by: Ricowan on December 23, 2006, 12:51:45 PM
I've run into this problem too.  Luckily the object still looks ok in my case:
(http://www.ricosweb.net/images/Tower2.jpg)
Title: Re: Problem with 3d object composed of many materials
Post by: manleystanley on December 23, 2006, 01:22:21 PM
Ya, but it sure screwed up the car I imported  :D
Ya, it was a bit highpoly, but surprisingly rendered, just most of it was default gray. 4 objects, 28 materials, and 93k verts.
Title: Re: Problem with 3d object composed of many materials
Post by: Fierys on December 23, 2006, 01:32:20 PM
One of the solutions can be changing succession of materials in MTL file in a text editor but we are still limited to 16 materials. But this way we can apply materials to the parts which are seen by the camera.
Title: Re: Problem with 3d object composed of many materials
Post by: Moose on December 23, 2006, 02:09:23 PM
I haven't tried it, but you maybe able to combine the two multi shader nodes with an add colour node (listed under functions) - might work??
Title: Re: Problem with 3d object composed of many materials
Post by: Fierys on December 23, 2006, 02:18:46 PM
It probably will not work because materials connected to the second multi shader which was connected to the surface shader directly don't work.
Title: Re: Problem with 3d object composed of many materials
Post by: Oshyan on December 23, 2006, 05:15:58 PM
The current 16 texture limitation is temporary. We will be implementing capabilities to import objects with an arbitrary (hopefully unlimited) number of textures for the final release.

- Oshyan