POV-Ray : Newsgroups : povray.binaries.images : Candle Flame (3kbu) : Re: Candle Flame (3kbu) Server Time
2 Oct 2024 04:23:47 EDT (-0400)
  Re: Candle Flame (3kbu)  
From: Peter Popov
Date: 15 Jul 2000 19:09:41
Message: <rhr1nsgcnt8r2bdbr67i76v0peenff7p7a@4ax.com>
On Thu, 13 Jul 2000 20:47:13 +0100, jam### [at] dh70qdu-netcom (Jamie
Davison) wrote:

>Add an Absorption colour which is the inverse of your emission colour, 
>and it should show up on white backgrounds...
>
>This means, if you have an emission of rgb< 1, 0.2, 0.152 >, the 
>absorption should be rgb< 0, 0.8, 0.848 >

Tsk. Add an absorption color that is the inverse of your emission
color _and_has_the_same_brightness_ . Try something like this:

#macro Brightness ( Color )
  0.3*Color.r + 0.59*color.g + 0.11*color.b
#end

#macro Inverse_Color ( Color )
  #local Jamie_Inverse = <1,1,1>-Color;
  Jamie_Inverse / Brightness (Jamie_Inverse) * Brightness (Color)
#end

I hope it works, my newsreader isn't the best way to try out POV code
:)


Peter Popov ICQ : 15002700
Personal e-mail : pet### [at] usanet
TAG      e-mail : pet### [at] tagpovrayorg


Post a reply to this message

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