POV-Ray : Newsgroups : povray.general : Media oddity rgbf vs rgbft vs rgbt Server Time
5 Nov 2024 18:23:23 EST (-0500)
  Media oddity rgbf vs rgbft vs rgbt (Message 1 to 5 of 5)  
From: Tom Melly
Subject: Media oddity rgbf vs rgbft vs rgbt
Date: 13 Feb 2003 10:35:54
Message: <3e4bbb5a$1@news.povray.org>
Overlapping media containers behave v. differently if the container pigment is
rgbft 1.

rgbf 1 and rgbt 1 behave identically as far as I can see.

The following scene demonstrates this (image posted to images).

The top two spheres have just rgbf 1, the middle two have rgbt 1, but the bottom
two have rgbft 1.

#version 3.5;

global_settings{
  assumed_gamma 1.0
}

camera { location <0,0,-7> look_at 0}

sphere{
  0,1
  pigment{rgbf 1}
  interior {
    media {
      emission rgb<0.7, 0.0, 0.0>
      method 3
      density {
        spherical
      }
    }
  }
  hollow
  scale 1.001
  translate x*-0.5
  translate y*2
}

sphere{
  0,1
  pigment {rgbf 1}
  interior {
    media {
      emission rgb<0.0, 0.0, 0.7>
      method 3
      density {
      spherical
      }
    }
  }
  hollow
  translate y*2
}

sphere{
  0,1
  pigment{rgbt 1}
  interior {
    media {
      emission rgb<0.7, 0.0, 0.0>
      method 3
      density {
        spherical
      }
    }
  }
  hollow
  scale 1.001
  translate x*-0.5
}

sphere{
  0,1
  pigment {rgbt 1}
  interior {
    media {
      emission rgb<0.0, 0.0, 0.7>
      method 3
      density {
      spherical
      }
    }
  }
  hollow
}

sphere{
  0,1
  pigment{rgbft 1}
  interior {
    media {
      emission rgb<0.7, 0.0, 0.0>
      method 3
      density {
        spherical
      }
    }
  }
  hollow
  scale 1.001
  translate x*-0.5
  translate y*-2
}

sphere{
  0,1
  pigment {rgbft 1}
  interior {
    media {
      emission rgb<0.0, 0.0, 0.7>
      method 3
      density {
      spherical
      }
    }
  }
  hollow
  translate y*-2
}





--
#macro A(V,B,C,R)#while(B-256)#if(V-128/B>=0)sphere{0,.5translate<C-4R-1,9>
pigment{rgb<1-C/8R/2C/8>}}#local V=V-128/B;#end#local B=B*2;#local C=C+1;#
end#end A(234,1,0,2)A(85,1,0,1)A(81,1,0,0)light_source{-5 1}//Tom Melly


Post a reply to this message

From: Warp
Subject: Re: Media oddity rgbf vs rgbft vs rgbt
Date: 13 Feb 2003 10:52:22
Message: <3e4bbf35@news.povray.org>
Tom Melly <tom### [at] tomandlucouk> wrote:
> Overlapping media containers behave v. differently if the container pigment is
> rgbft 1.

  AFAIK specifying "rgbft 1" is a bit like specifying "rgb 1 transmit 2"
(in that the result is overcalculated in unnatural ways).

-- 
#macro N(D)#if(D>99)cylinder{M()#local D=div(D,104);M().5,2pigment{rgb M()}}
N(D)#end#end#macro M()<mod(D,13)-6mod(div(D,13)8)-3,10>#end blob{
N(11117333955)N(4254934330)N(3900569407)N(7382340)N(3358)N(970)}//  - Warp -


Post a reply to this message

From: Mark Weyer
Subject: Re: Media oddity rgbf vs rgbft vs rgbt
Date: 13 Feb 2003 11:00:58
Message: <3E4BC41E.3050904@informatik.uni-freiburg.de>
Tom Melly wrote:
> Overlapping media containers behave v. differently if the container pigment is
> rgbft 1.
> 
> rgbf 1 and rgbt 1 behave identically as far as I can see.

You do not need media or overlapping to have rgbt 1 different from
rgbtf 1. rgbtf 1 takes the light that goes through, multiplies it with
filter and with color and adds the light that goes through multiplied
with transmit. So the light that goes through is doubled. That's why I
have color.6 in the signature.

Below is a modification of your scene that shows this.

I do not know, though, why some of your spheres get darker.



global_settings{
   assumed_gamma 1.0
}

camera { location <0,0,-7> look_at 0}

sphere{
   0,1
   pigment{rgbf 1}
   hollow
   scale 1.001
   translate x*-0.5
   translate y*2
}

sphere{
   0,1
   pigment {rgbf 1}
   hollow
   translate y*2
}

sphere{
   0,1
   pigment{rgbt 1}
   hollow
   scale 1.001
   translate x*-0.5
}

sphere{
   0,1
   pigment {rgbt 1}
   hollow
}

sphere{
   0,1
   pigment{rgbft 1}
   hollow
   scale 1.001
   translate x*-0.5
   translate y*-2
}

sphere{
   0,1
   pigment {rgbft 1}
   hollow
   translate y*-2
}

box {<-0.5,-5,1> <0,5,2> pigment {color <1,1,1,0,0>} finish {ambient 1/4}}


-- 
max_trace_level 256media{absorption.02}camera{location<1,.3,1.7>}sphere{0
.8pigment{color.6}interior{media{emission<2,2,-2>absorption 2}}hollow}#macro
p(f,n)plane{n f-1finish{reflection<f,1f>}}#end p(1y)p(1z-x)p(-1,-z)p(1x-y)
// Mark Weyer


Post a reply to this message

From: Tom Melly
Subject: Re: Media oddity rgbf vs rgbft vs rgbt
Date: 13 Feb 2003 12:31:11
Message: <3e4bd65f$1@news.povray.org>
"Mark Weyer" <wey### [at] informatikuni-freiburgde> wrote in message
news:3E4### [at] informatikuni-freiburgde...

<snip>

Is the bottom line on this that rgbft 1 never really makes sense? Should filter
+ transmit  <=1 ideally?


Post a reply to this message

From: Mark Weyer
Subject: Re: Media oddity rgbf vs rgbft vs rgbt
Date: 14 Feb 2003 04:52:41
Message: <3E4CBF50.1090009@informatik.uni-freiburg.de>
> Is the bottom line on this that rgbft 1 never really makes sense? Should filter
> + transmit  <=1 ideally?

 From what Warp and I said rgbtf 1 should be equal to rgbt 2 and
rgbf sqrt(2). Then use of one of those would make as much sense
as use of any other of those. However, as the following variant
of your example shows, there must be yet some other aspect when
media are involved.



global_settings{
   assumed_gamma 1.0
}

camera { location <0,0,-7> look_at 0}

sphere{
   0,.9
   pigment{rgbf sqrt(2)}
   interior {
     media {
       emission rgb<0.7, 0.0, 0.0>
       method 3
       density {
         spherical
       }
     }
   }
   hollow
   scale 1.001
   translate x*-0.5
   translate y*2
}

sphere{
   0,.9
   pigment {rgbf sqrt(2)}
   interior {
     media {
       emission rgb<0.0, 0.0, 0.7>
       method 3
       density {
         spherical
       }
     }
   }
   hollow
   translate y*2
}

sphere{
   0,.9
   pigment{rgbt 2}
   interior {
     media {
       emission rgb<0.7, 0.0, 0.0>
       method 3
       density {
         spherical
       }
     }
   }
   hollow
   scale 1.001
   translate x*-0.5
}

sphere{
   0,.9
   pigment {rgbt 2}
   interior {
     media {
       emission rgb<0.0, 0.0, 0.7>
       method 3
       density {
         spherical
       }
     }
   }
   hollow
}

sphere{
   0,.9
   pigment{rgbft 1}
   interior {
     media {
       emission rgb<0.7, 0.0, 0.0>
       method 3
       density {
         spherical
       }
     }
   }
   hollow
   scale 1.001
   translate x*-0.5
   translate y*-2
}

sphere{
   0,.9
   pigment {rgbft 1}
   interior {
     media {
       emission rgb<0.0, 0.0, 0.7>
       method 3
       density {
         spherical
       }
     }
   }
   hollow
   translate y*-2
}

box {<-0.5,-5,1> <0,5,2> pigment {color <1,1,1,0,0>} finish {ambient 1/4}}



-- 
merge{#local i=-11;#while(i<11)#local
i=i+.1;sphere{<i*(i*i*(.05-i*i*(4e-7*i*i+3e-4))-3)10*sin(i)30>.5}#end
pigment{color.6}interior{media{emission x}}hollow}//  Mark Weyer


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.