Transparency falloff ?

Started by Hannes, July 14, 2018, 08:42:45 AM

Previous topic - Next topic

Hannes

Since it had been asked several times recently how to achieve semi transparent objects like smoke or fire billboards (or spinning helicopter rotors) I decided to post a simple example file. Actually it's Ulco's idea, so credits go to him!!

You might notice that I used an inverted mask and checked "invert mask" in the surface layer. For some reason it looks better (denser) than using a regular mask (white visible-black invisible) and "invert mask" unchecked.

There are two planes. One for the smoke itself with the appropriate transparency shaders (set to not cast shadows), and another one set to invisible with the same alpha mask in the opacity slot of a simple default shader. TG can create at least semi transparent shadows, so you can play with the opacity to make the shadow even more transparent.

The ray detail multiplier is set to 1 to avoid pixellation behind the plane object. Takes a bit longer to render, but it's necessary.



WAS


Dune

Thanks for your fat lines and of course thanks for sharing!

bobbystahr

well this simplifies many things, thanks Hannes.
something borrowed,
something Blue.
Ring out the Old.
Bring in the New
Bobby Stahr, Paracosmologist

Hannes

Quote from: Dune on July 14, 2018, 10:44:30 AM
Thanks for your fat lines...

;D ;D ;D

You're welcome, guys.

Makes a nice campfire as well. I added a lightsource here.
Characters and campfire object not included. In this (fire-) case I found out, that it looks better to use a non inverted alpha mask and uncheck "invert mask".



WAS

Still would love to see TG handle it's own colour appropriately to do this procedurally...

WAS

Applying this logic to procedural flames. Seems all that there is to work out is the actual shape flames via secondary masking.

Hannes

I tried to use this method for populations. Unfortunately there is a known transparency issue in glass- or watershaders. If I have more than four (infinitely thin) planes with a glass shader behind each other, the fifth one will render quite dark where it is occluded by the other four planes. See image below.

It's a pity that we need to use a glass shader to get some transparency falloff at the moment. But it's on Planetside's to do list as far as I know. Right? Right?  ;) ;) ;)

Dune

Yes, that's where I got into trouble too; multiple cards.

WAS

Quote from: Hannes on July 16, 2018, 05:40:44 AM
I tried to use this method for populations. Unfortunately there is a known transparency issue in glass- or watershaders. If I have more than four (infinitely thin) planes with a glass shader behind each other, the fifth one will render quite dark where it is occluded by the other four planes. See image below.

It's a pity that we need to use a glass shader to get some transparency falloff at the moment. But it's on Planetside's to do list as far as I know. Right? Right?  ;) ;) ;)

Probably the issue with the flame cards when I adjust cards and get black where everyone didn't. Either that or the ray engine does have quirks on different machines.

Agura Nata

"Live and Learn!"