POV-Ray : Newsgroups : povray.newusers : Overlap of "filter" and "transmit" on layered textures : Re: Overlap of "filter" and "transmit" on layered textures Server Time
17 May 2024 07:47:55 EDT (-0400)
  Re: Overlap of "filter" and "transmit" on layered textures  
From: Nathan Kopp
Date: 20 Sep 1998 16:31:03
Message: <360556E7.D9495359@ltu.edu>
Ahhh... I didn't realize that you were using layered textures.  This behavior,
while not being desired, is not really a bug.  The POV manual says that layered
textures do not behave exactly like textures stacked on top of each-other
(unfortunately).  When POV computes layered textures, it determines a color
vector (RGBFT) for the pigment of each texture at that point, and combines them
by multiplying them together as follows:

      Filter_Colour[RED]    *= Layer_Pigment_Colour[RED];
      Filter_Colour[GREEN]  *= Layer_Pigment_Colour[GREEN];
      Filter_Colour[BLUE]   *= Layer_Pigment_Colour[BLUE];
      Filter_Colour[FILTER] *= Layer_Pigment_Colour[FILTER];
      Filter_Colour[TRANSM] *= Layer_Pigment_Colour[TRANSM];

Filter_Colour starts out at <1,1,1,1,1>.  Then it computes one reflection and
one refraction based on the top layer's finish & normal.

Therefore, as Jerry pointed out, you'll want to keep the other filter values
from being zero.  In your example, the resulting texture has the pigment:

<1,1,1,1,1> * <1,1,1,0,1> * <1,1,1,1,0> = <1,1,1,0,0>
  start         layer a       layer b        result

I hope this helps.

-Nathan Kopp


Post a reply to this message

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