Author Topic: The mathematics of transparency  (Read 360 times)

Legacy_s e n

  • Hero Member
  • *****
  • Posts: 654
  • Karma: +0/-0
The mathematics of transparency
« on: November 11, 2012, 04:44:20 pm »


               So I need a bit help to calculate stratified transparency: lets say I want to get the exact amount of transparency (opacity, whatever) I have in a single mesh, but using 2 meshes. so, for example I get 50% opacity with a mesh, and I want to get the same amount by combining 2: the exact formula, thats what I need '<img'>

if I use two 29% meshes, I get the about the same amout of using a single 50% opaque one.
what if I use a 21% opaque, and I want to reach an overall 50% opacity?
               
               

               
            

Legacy_s e n

  • Hero Member
  • *****
  • Posts: 654
  • Karma: +0/-0
The mathematics of transparency
« Reply #1 on: November 11, 2012, 06:12:31 pm »


               I think I have found the relation, given:

Ot = overall opacity
O1 = mesh 1 opacity
O2 = mesh 2 opacity

O2 = (Ot - O1) / (1 - O1)

and so

Ot = O1 + O2 * (1 - O1)

almost sure (hate maths '<img'>)
               
               

               
            

Legacy_Rolo Kipp

  • Hero Member
  • *****
  • Posts: 4349
  • Karma: +0/-0
The mathematics of transparency
« Reply #2 on: November 11, 2012, 06:24:25 pm »


               <sticking his tongue out...>

So then, O2 = (50%-21%)/(1-21%) or
O2 = (.5-.21)/(1-.21) or
O2 = (.29)/(.79) or
O2 = 37%?

Interesting, and potentially very useful... especially for seamless fluids blending ;-)

<...the side of his mouth to help him>
               
               

               
            

Legacy_s e n

  • Hero Member
  • *****
  • Posts: 654
  • Karma: +0/-0
The mathematics of transparency
« Reply #3 on: November 11, 2012, 06:33:35 pm »


               O2 = (0,50 - 0,21) / (1 - 0,21) = 0,367

you can try the results with layers in ps for verify this, of course blending is normal
               
               

               
            

Legacy_Frimbleglim

  • Newbie
  • *
  • Posts: 46
  • Karma: +0/-0
The mathematics of transparency
« Reply #4 on: November 11, 2012, 07:43:21 pm »


               Interesting that the relation isn't commutative.