POV-Ray : Newsgroups : povray.general : alpha masking : Re: alpha masking Server Time
5 Nov 2024 15:51:54 EST (-0500)
  Re: alpha masking  
From: Mark Weyer
Date: 18 Mar 2003 04:39:40
Message: <3E76EC74.3010506@informatik.uni-freiburg.de>
I think that you can do something similar already, although in three
steps (maybe the kings of povray abuse and obfuscation can help to do
it in two).
  1. Render spaceship A only (otherwise full scene).
  2. Render spaceship B only (otherwise full scene).
  3. Render a 3-colour picture. One colour for each spaceship and one
     for the background.
Postprocessing to merge the three should be trivial.

You already know how to do the first two steps. For the third
extinguish all light sources and change the textures of the spaceships
and the background to pigment{color ___}finish{ambient 1}.

There is a catch to this idea: The reflection, shadow and radiosity of
spaceship A will not be visible in spaceship B.


If your ships use only a two-dimensional colour space (e.g: They are
shades of grey with red lights), two steps suffice. You can recode
your colours to use only red and green and put depth information into
blue. For merging take the colour with less blue (the pixel that is
nearer to the camera) and undo the colour recoding.


-- 
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{rgbt 1}interior{media{emission x}}hollow}//  Mark Weyer


Post a reply to this message

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