Planetside Software Forums

Support => Terragen Support => Topic started by: Eric Johannsen on December 26, 2016, 11:21:22 PM

Title: All-or-Nothing Opacity
Post by: Eric Johannsen on December 26, 2016, 11:21:22 PM
I have a model that renders fine in Blender. I exported it to an .obj + .mtl and imported it into TG4. The .mtl didn't include map statements to reference the texture and opacity maps, so I tried to add those into the imported .obj file's internal node.

Most everything looks great, except for a glass sphere at either end of the model. It renders entirely white.
(http://puu.sh/t2b1T/080eabe06c.jpg)

If I click Invert Opacity Image, the glass is entirely clear (absent from the render).

(http://puu.sh/t2bg4/79869c95c8.png)

(http://puu.sh/t2bcn/4c4a3e9253.jpg)

The image used for opacity has an alpha of 128 and RGB 254,254,254.
How can I get the glass to render, well, like glass?
Title: Re: All-or-Nothing Opacity
Post by: Kadri on December 26, 2016, 11:27:53 PM

Try the "Glass" shader (right click+create shader+surface shader).
Title: Re: All-or-Nothing Opacity
Post by: Eric Johannsen on December 26, 2016, 11:52:56 PM
The transparent shader was created by the OBJ importer and is part of the internal node of the OBJ's Parts Shader. I'm not sure how I would go about replacing the transparent shader from the internal node with a glass shader.
Title: Re: All-or-Nothing Opacity
Post by: Kadri on December 27, 2016, 01:48:27 AM

If you know how to handle nodes Eric just change the old one with the new one.
Or you can put it below the old one.

Title: Re: All-or-Nothing Opacity
Post by: Dune on December 27, 2016, 04:50:28 AM
Don't forget that your object has shadows turned on, so the glass will also have shadows and thus will be pretty dark. Best is to separate glass parts of the object as separate objects, in which you can turn shadows off.
Title: Re: All-or-Nothing Opacity
Post by: Eric Johannsen on December 27, 2016, 02:01:46 PM
Quote from: Kadri on December 27, 2016, 01:48:27 AM

If you know how to handle nodes Eric just change the old one with the new one.


The OBJ importer created a Parts node, the internal node of which has one node per material in the OBJ that isn't connected to anything else in the object graph.

(http://puu.sh/t2JuR/733b305478.png)

How exactly do I replace the automatically created "transparent shader" that is not connected to anything else?
Title: Re: All-or-Nothing Opacity
Post by: Kadri on December 27, 2016, 06:14:45 PM

If you mean the white "Transparant" node it doesn't have to be connected anywhere.
Just try the same as i wrote above.
I changed that example according yours below.

Title: Re: All-or-Nothing Opacity
Post by: Eric Johannsen on December 27, 2016, 08:17:24 PM
Thanks, it's working now.

I do see dark shadows. Looking into splitting the OBJ into two.