Planetside Software Forums

General => File Sharing => General => Topic started by: Hannes on July 14, 2018, 08:42:45 AM

Title: Transparency falloff ?
Post by: Hannes on July 14, 2018, 08:42:45 AM
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.
Title: Re: Transparency falloff ?
Post by: luvsmuzik on July 14, 2018, 08:46:01 AM
Thank you! :)
Title: Re: Transparency falloff ?
Post by: Kadri on July 14, 2018, 09:25:51 AM

Thanks Hannes.
Title: Re: Transparency falloff ?
Post by: WAS on July 14, 2018, 09:29:54 AM
Awesome! Great share!
Title: Re: Transparency falloff ?
Post by: Dune on July 14, 2018, 10:44:30 AM
Thanks for your fat lines and of course thanks for sharing!
Title: Re: Transparency falloff ?
Post by: bobbystahr on July 14, 2018, 10:52:18 AM
well this simplifies many things, thanks Hannes.
Title: Re: Transparency falloff ?
Post by: Hannes on July 14, 2018, 11:09:35 AM
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".
Title: Re: Transparency falloff ?
Post by: luvsmuzik on July 14, 2018, 11:18:10 AM
YAY
Title: Re: Transparency falloff ?
Post by: Kadri on July 14, 2018, 12:12:25 PM

That looks actually very good Hannes.
Title: Re: Transparency falloff ?
Post by: WAS on July 14, 2018, 02:08:17 PM
Still would love to see TG handle it's own colour appropriately to do this procedurally...
Title: Re: Transparency falloff ?
Post by: WAS on July 14, 2018, 04:58:59 PM
Applying this logic to procedural flames. Seems all that there is to work out is the actual shape flames via secondary masking.
Title: Re: Transparency falloff ?
Post by: 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?  ;) ;) ;)
Title: Re: Transparency falloff ?
Post by: Dune on July 16, 2018, 07:45:58 AM
Yes, that's where I got into trouble too; multiple cards.
Title: Re: Transparency falloff ?
Post by: WAS on July 16, 2018, 01:17:07 PM
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.
Title: Re: Transparency falloff ?
Post by: Agura Nata on July 17, 2018, 11:30:51 AM
Cool stuff!
Title: Re: Transparency falloff ?
Post by: KlausK on July 19, 2018, 03:43:51 AM
Thanks a lot!
CHeers, Klaus
Title: Re: Transparency falloff ?
Post by: bobbystahr on August 13, 2020, 10:57:57 PM
bored and reading unread posts I found this...thanx hannes