Opacity Woes

Started by PeanutMocha, August 29, 2012, 02:26:46 AM

Previous topic - Next topic

PeanutMocha

I'm trying to understand exactly how opacity works in TG2.

To that end, I created a simple sphere.  Setting Default shader 01 (sphere's surface shader) opacity setting anywhere from 0.5 to 1.0 has no apparent impact on the render.  Setting the opacity to 0.49 or below causes the sphere to disappear, but not its shadow.

I would expect that moving the slider would allow increasing amounts of light to come through from the other side.

Opacity 0.50
[attach=1]

Opacity 0.49
[attach=2]

The TGD file I used is attached.

What am I not understanding?


Dune

Opacity is either 0 or 1, no gray scale variation.

PeanutMocha

So... TG2 does not support partially transparent surfaces?

Upon Infinity

It certainly appears that way.  I always just assumed it did support them, although I've never had a need to use partially transparent surfaces.

dandelO

#4
To have working opacity/transparency on general surfaces, set a flat 'water shader'(no waves/roughness/patch effect/etc), as the child layer to a surface layer, uncheck 'apply colour' on this surface so that all that is appearing is the water shader in this layer.
Now, you can use your opacity function, be it fractal, opacity map, noise function etc. as the 'blend shader' to the surface layer. Where the opacity map is white, fully transparent surfaces will appear. And it will blend out towards the black areas, becoming fully opaque.

Zeroing the reflectivity in the water shader gives you basic transparency, enabling reflectivity will let you make glass and such. Use the subsurface tab settings to control the amount of transparency.

Here's an example:
[attachimg=1]

Nodes for wings part:
[attachimg=2]

The wing transparency blender image is just a basic greyscale opacity map, white is transparent(membranes), black is opaque(veins). Shades of grey in between will apply the appropriate amount of transparency in grey areas, just like true opacity would.

:)

PeanutMocha

Excellent!  Thank you for sharing that.

gregsandor

Quote from: dandelO on August 30, 2012, 11:18:17 AM
Zeroing the reflectivity in the water shader gives you basic transparency, enabling reflectivity will let you make glass and such. Use the subsurface tab settings to control the amount of transparency.

When I set Reflectivity to 0 the parts that ought to be transparent are just black, no transparency.  What am I doing wrong?  Anyone have a working clip file of this setup or a screenshot of the internal settings I should use?

Greg

pixo

Quote from: Dune on August 29, 2012, 03:07:28 AM
Opacity is either 0 or 1, no gray scale variation.

Hmmm...

Why not?  Seems kind of like rendering 101.

Dune

TG is a 'work in progress', so not all parts are finalized yet. Updates are frequent, so this will be handled as well, I'm sure.

bobbystahr

Wow...can't believe I missed dandelO's brilliant solution {many thanks man} from Aug. 2012. Here's a pic I did using the technique both on the lamp and the windows but went with a translucent effect on the lamp and transparent on the windows which luckily have front and back components so the outside ones use a dirt map to control the opacity and simulate dirt, and the inside planes are glass like with higher reflectivity.
All the light in the room comes from the lamp so you'll notice the light isn't being coloured as I had hoped bit still lights the room decently. It's a large radius light(width of the room) with falloff twice that and the light set at 500, 000
something borrowed,
something Blue.
Ring out the Old.
Bring in the New
Bobby Stahr, Paracosmologist

TheBadger

Bobby,
Can you render a shot closer to the window, where the camera is mostly looking out? And also one from outside looking in. Both with the same settings that you have now.
It has been eaten.

bobbystahr

Quote from: TheBadger on January 25, 2014, 11:54:19 PM
Bobby,
Can you render a shot closer to the window, where the camera is mostly looking out? And also one from outside looking in. Both with the same settings that you have now.
tomorrow...packing it in for tonight...
something borrowed,
something Blue.
Ring out the Old.
Bring in the New
Bobby Stahr, Paracosmologist

bobbystahr

Quote from: TheBadger on January 25, 2014, 11:54:19 PM
Bobby,
Can you render a shot closer to the window, where the camera is mostly looking out? And also one from outside looking in. Both with the same settings that you have now.

here 'y go.

Bobby
something borrowed,
something Blue.
Ring out the Old.
Bring in the New
Bobby Stahr, Paracosmologist

pixo

Quote from: Dune on January 24, 2014, 09:11:57 AM
TG is a 'work in progress', so not all parts are finalized yet. Updates are frequent, so this will be handled as well, I'm sure.

Yes, I understand that the priority has been on realistic landscape rendering and that 8 bit transparency may not be critical to that end.  I was just surprised.

And, I should add that Terragen's realistic landscape rendering is as good as it gets.

TheBadger

It has been eaten.