POV-Ray : Newsgroups : povray.newusers : Overlap of "filter" and "transmit" on layered textures Server Time
29 Nov 2024 12:51:32 EST (-0500)
  Overlap of "filter" and "transmit" on layered textures (Message 1 to 9 of 9)  
From: Soichi Fukasawa
Subject: Overlap of "filter" and "transmit" on layered textures
Date: 19 Sep 1998 20:21:38
Message: <36043c82.0@news.povray.org>
Hi, Nice to meet you. I write to this newsgroup for the first time.
My question is as follows :

    I put a texture in which "transmit" was set for near 1.0 on a texture in
which "filter" was set for near 1.0 as layered textures, though,  the object
specified these textures got black.  But either only one texture or textures
which have same kind of keywords (e.g. Both are "transmit" or "filer") give
transparent image.
    I countered this problem, when I was going to put 2-D image (tga file
using "Alpha channel") on the Glass using "texture{ T_Glass3 }" by using of
"image_map".
    Please tell me why and how to solve or avoide this trouble.

Thanks.

Soichi Fukasawa
mailto : soi### [at] tkyemghpphyssu-tokyoacjp


Post a reply to this message

From: Soichi Fukasawa
Subject: Misspelling
Date: 19 Sep 1998 20:56:10
Message: <3604449a.0@news.povray.org>
Sorry, I have misspelled in the following sentence (the 3rd paragraph).
>    I  "countered"  this problem, 

The correct sentence is
    / I  "encountered"  this problem, /

Soichi Fukasawa
mailto : soi### [at] tkyemghpphyssu-tokyoacjp


Post a reply to this message

From: Nathan Kopp
Subject: Re: Overlap of "filter" and "transmit" on layered textures
Date: 19 Sep 1998 22:27:17
Message: <360458EA.215614EB@ltu.edu>
The problem is with max_trace_level.  You need to set it to something higher. 
Look it up in the Docs.  Basically, what's happening is that POV is hitting a
recursion depth limit (set by max_trace_level) and is not tracing rays past the
second transparent object.

-Nathan


Post a reply to this message

From: Soichi Fukasawa
Subject: Re: Overlap of "filter" and "transmit" on layered textures
Date: 19 Sep 1998 23:54:08
Message: <36046e50.0@news.povray.org>
Nathan Kopp wrote in message <360458EA.215614EB@ltu.edu>...
>The problem is with max_trace_level.  You need to set it to something
higher.


    Thank you for your answer.  But I have already set max_trace_level and
inputed +q11 in command line option.  But It is still not getting better.
    The following source list is what is actually rendered by myself.
Please tell me what's wrong.

/*  <-- max_trace_level is set for large number.   */
/*-------------------------------------------------*/
global_settings { max_trace_level 12 }
/*-------------------------------------------------*/

#include "shapes.inc"
#include "colors.inc"
#include "woods.inc"

camera{
    location <0, 10, -10>
    look_at <0, 1, 0>
    angle 20
}

light_source{ <0, 10, -10> color White}
light_source{ <-50, 50, 50> color White}

/* The problem part                                 */
/*--------------------------------------------------*/
object{ Cube texture{ pigment{ White transmit 1.0 } }
             texture{ pigment{ White filter   1.0 } }
/*--------------------------------------------------*/
 translate y
}

object{
       Plane_XZ
        texture{
          hexagon
            texture{ T_Wood33 }
            texture{ T_Wood1  }
            texture{ T_Wood13 }
        }
}

Soichi Fukasawa
mailto : soi### [at] tkyemghpphyssu-tokyoacjp


Post a reply to this message

From: Jerry Anning
Subject: Re: Overlap of "filter" and "transmit" on layered textures
Date: 20 Sep 1998 03:25:11
Message: <36049FCB.EB13CB93@dhol.com>
Soichi Fukasawa wrote:

>     The following source list is what is actually rendered by myself.
> Please tell me what's wrong.

> /* The problem part                                 */
> /*--------------------------------------------------*/
> object{ Cube texture{ pigment{ White transmit 1.0 } }
>              texture{ pigment{ White filter   1.0 } }
> /*--------------------------------------------------*/

I think that you may have uncovered a bug.  The best workaround I can
suggest for this particular situation is thus:

object { Cube texture{ pigment{ White filter 1.0 transmit 1.0 } }
              texture{ pigment{ White filter 1.0 } }

if this will give the effect that you are after.

Jerry Anning
cle### [at] dholcom


Post a reply to this message

From: Soichi Fukasawa
Subject: Re: Overlap of "filter" and "transmit" on layered textures
Date: 20 Sep 1998 09:01:04
Message: <3604ee80.0@news.povray.org>
Jerry Anning wrote in message <36049FCB.EB13CB93@dhol.com>...
>I think that you may have uncovered a bug.  The best workaround I can
>suggest for this particular situation is thus:
>
>object { Cube texture{ pigment{ White filter 1.0 transmit 1.0 } }
>              texture{ pigment{ White filter 1.0 } }

   Thank you very much, Mr. Anning.  I understand that it is a bug and how
to avoid it.
In short, when you make overlap of texture, both "filter" and "transmit"
must not be overlapped each other.  And it is modified adding the term
"filter" or "transmit"
    The beginning of my purpose is to get a correct image of transparent
parts in an image_map which is attached to a transparent object (using
"filter" like T_Glass ).  To achieve this purpose,  I take the way of using
"index color" ("palette") to set "filter" (This method admits only 256
colors,  though),  because it is impossible to use "filter" by means of
using "Alpha Cannel"

Thanks,

Soichi Fukasawa
mailto : soi### [at] tkyemghpphyssu-tokyoacjp


Post a reply to this message

From: Nathan Kopp
Subject: Re: Overlap of "filter" and "transmit" on layered textures
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

From: Soichi Fukasawa
Subject: Re: Overlap of "filter" and "transmit" on layered textures
Date: 21 Sep 1998 15:16:11
Message: <360697eb.0@news.povray.org>
Nathan Kopp wrote in message <360556E7.D9495359@ltu.edu>...
>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

Thank you, Mr. Kopp.  I can learned about POV.  But I don't think that it is
not suitable your expression that a component of the final pigment is all
product of every component of each layered texture, because upper layered
texutre is more prior than lower layered texture in particular about
distransparent color,  and the result pigment <1,1,1,0,0> in your example is
not black color but distransparent white color.  Then I was getting an idea
from your concept.  I think that POV probably deal with 2 systems, on filter
and on transmit, independently.  In other words there are 2 routes
separately, like transverse wave and longitudinal wave in respect of
polarized light.  So  because overlaying a texture specified FT<0,1> with a
texture specified FT<1,0> is just corresponding to overlaying real light
filters  -not filters in POV-  polarized in parpendicular direction each
other, consequently the object put it on looks like black. In short, what I
say is that  light whichi went through "filter" filter go through just only
"filter" filter and never go through "transmit" filter, and that is also
right changing "filter" with "transmit".
In detail you may see following figures.

For simplicity only one component Red in respect of  color is discribed.

       start  RFT<r,f,t>      result
F-route R<1> --> <fr> |
                      |+ -> <fr + t>
T-toute R<1> --> <t> |

One of the evidence that final color is addition of colors through F-route
and through T-rute is that pigment{ color rgbft <1,1,1,1,1> } gives too much
brightness.

       start  RFT<r1,f1,0>  RFT<r2,f2,0>      result
F-route R<1> --> <f1r1> --> <f1f2r1r2> |
                                       |+ -> <f1f2r1r2>
T-toute R<1> --> <0>    --> <0>        |


       start  RFT<r1,f1,0>  RFT<r2,0,t2> result
F-route R<1> --  <f1r1> --> <0> |
                                |+ ----> <0>
T-toute R<1> --> <0>    --> <0> |


I'm very happy to be taught POV by all of you.

Soichi Fukasawa
mailto : soi### [at] tkyemghpphyssu-tokyoacjp


Post a reply to this message

From: Nathan Kopp
Subject: Re: Overlap of "filter" and "transmit" on layered textures
Date: 21 Sep 1998 16:26:05
Message: <3606A736.25533F45@ltu.edu>
Author's note: This message probably goes far beyond the scope of this
newsgroup (which happens to be 'new users'), but I feel I should provide the
correct explanation since my previous one was wrong.
----
Soichi,

My original explanation was flawed.  Sorry for the confusion.  The pigment is
computed in two parts, one for the opaque part and one for the
filtered/transmitted part.  What you wrote does describe the resulting behavior
of POV quite well.

So if anyone is interested, here's what I should have said last time:

The opaque part (Result_Colour) is computed by addition as expected, and the
filter part (Filter_Colour) is computed by multiplication as I described.

Later, a single ray is refracted through the object (provided that it is at
least semi-transparent), and then the color returned by the refracted ray
(Refracted_Colour), is combined with the Result_Colour as follows:

Result_Colour[i] += Refracted_Colour[i] *
         (Filter_Colour[i] * Filter_Colour[FILTER] + Filter_Colour[TRANSM])

for each component.  (Volume attenuation is also included in there, but I left
it out.)

Thus, after the final Filter_Colour is computed by the multiplication that I
described earlier, if both the filter and transmit values turn out to be zero,
the Refracted_Colour will have no effect on the Result_Colour.

Also, this accounts for the over-brightness caused by rgbft<1,1,1,1,1>.

OK, I'm pretty sure that this is correct.  Just in case anyone cares.

-Nathan


Post a reply to this message

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