All-or-Nothing Opacity

Started by Eric Johannsen, December 26, 2016, 11:21:22 PM

Previous topic - Next topic

Eric Johannsen

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.


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





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?

Kadri


Try the "Glass" shader (right click+create shader+surface shader).

Eric Johannsen

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.

Kadri


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.


Dune

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.

Eric Johannsen

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.



How exactly do I replace the automatically created "transparent shader" that is not connected to anything else?

Kadri


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.


Eric Johannsen

Thanks, it's working now.

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