Author Topic: Transparency falloff ?  (Read 550 times)

Offline Hannes

  • Terragen Alpha Tester (Win)
  • ***
  • Posts: 4226
Transparency falloff ?
« on: July 14, 2018, 12:42:45 PM »
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.

Offline luvsmuzik

  • Member
  • *
  • Posts: 2841
    • luvsmuzik 1995
Re: Transparency falloff ?
« Reply #1 on: July 14, 2018, 12:46:01 PM »
Thank you! :)

Offline Kadri

  • Member
  • *
  • Posts: 8338
Re: Transparency falloff ?
« Reply #2 on: July 14, 2018, 01:25:51 PM »

Thanks Hannes.

Offline WASasquatch

  • Member
  • *
  • Posts: 3052
  • The Homeless Landscape Artist
Re: Transparency falloff ?
« Reply #3 on: July 14, 2018, 01:29:54 PM »
Awesome! Great share!
Art can be a window into the soul

Offline Dune

  • Terragen Alpha Tester (Win)
  • ***
  • Posts: 14444
    • www.ulco-art.nl
Re: Transparency falloff ?
« Reply #4 on: July 14, 2018, 02:44:30 PM »
Thanks for your fat lines and of course thanks for sharing!

Offline bobbystahr

  • Member
  • *
  • Posts: 9571
  • Turn, and face the Strange Ch Ch Changes...D Bowie
Re: Transparency falloff ?
« Reply #5 on: July 14, 2018, 02:52:18 PM »
well this simplifies many things, thanks Hannes.
something borrowed,
something Blue.
Ring out the Old.
Bring in the New

bobbystahr

Offline Hannes

  • Terragen Alpha Tester (Win)
  • ***
  • Posts: 4226
Re: Transparency falloff ?
« Reply #6 on: July 14, 2018, 03:09:35 PM »
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".

Offline luvsmuzik

  • Member
  • *
  • Posts: 2841
    • luvsmuzik 1995
Re: Transparency falloff ?
« Reply #7 on: July 14, 2018, 03:18:10 PM »
YAY

Offline Kadri

  • Member
  • *
  • Posts: 8338
Re: Transparency falloff ?
« Reply #8 on: July 14, 2018, 04:12:25 PM »

That looks actually very good Hannes.

Offline WASasquatch

  • Member
  • *
  • Posts: 3052
  • The Homeless Landscape Artist
Re: Transparency falloff ?
« Reply #9 on: July 14, 2018, 06:08:17 PM »
Still would love to see TG handle it's own colour appropriately to do this procedurally...
Art can be a window into the soul

Offline WASasquatch

  • Member
  • *
  • Posts: 3052
  • The Homeless Landscape Artist
Re: Transparency falloff ?
« Reply #10 on: July 14, 2018, 08: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.
Art can be a window into the soul

Offline Hannes

  • Terragen Alpha Tester (Win)
  • ***
  • Posts: 4226
Re: Transparency falloff ?
« Reply #11 on: July 16, 2018, 09: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?  ;) ;) ;)

Offline Dune

  • Terragen Alpha Tester (Win)
  • ***
  • Posts: 14444
    • www.ulco-art.nl
Re: Transparency falloff ?
« Reply #12 on: July 16, 2018, 11:45:58 AM »
Yes, that's where I got into trouble too; multiple cards.

Offline WASasquatch

  • Member
  • *
  • Posts: 3052
  • The Homeless Landscape Artist
Re: Transparency falloff ?
« Reply #13 on: July 16, 2018, 05:17:07 PM »
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.
Art can be a window into the soul

Offline the first seer

  • Member
  • *
  • Posts: 865
  • Avantgarde Artist
    • the first seer
Re: Transparency falloff ?
« Reply #14 on: July 17, 2018, 03:30:51 PM »
Cool stuff!