POV-Ray : Newsgroups : povray.beta-test : Strange thing with layered texture Server Time
29 Jul 2024 18:15:45 EDT (-0400)
  Strange thing with layered texture (Message 1 to 8 of 8)  
From: Hugo
Subject: Strange thing with layered texture
Date: 8 Mar 2002 05:05:36
Message: <3c888cf0$1@news.povray.org>
Hi,

As suggested by Ron Parker, I'll report my observation here. My original
post in the p.general group didn't give any feedback but maybe I didn't
explain it so well.

There's something strange with layered textures. I'll call it a flaw until
someone convince me it's not. The way reflection is transmitted through
layers doesn't work, with any POV version. Reflection is either transmitted
with full strength through all layers, or not at all.. Let me illustrate:

camera { location -4*z look_at 0 }
light_source { <-25,25,-25>, 1.5 }

#declare Texture_1=texture {
  pigment {rgb <1,1,1> }
  finish { specular 1 reflection 1 }
}

#declare Texture_2=texture {
  pigment { rgbt <0,0,1, 0.2> }
}

sphere { 0,1 texture { Texture_1 } texture { Texture_2 } }
plane { 1*y,-2 pigment { checker rgb 1 rgb .5 } }

As you will see, pigment and specular of Texture_1 is only 0.2 after
Texture_2 has been added, but reflection still goes through the layer at
full strength of 1.. I see no purpose in this behaviour. You can try to
change the transmit value and see how the rest of the texture behaves in a
different way as reflection.

Best regards,
Hugo


Post a reply to this message

From: Wouter Depuydt
Subject: Re: Strange thing with layered texture
Date: 8 Mar 2002 06:47:04
Message: <3c88a4b8@news.povray.org>
"Hugo" <hua### [at] post3teledk> wrote in message
news:3c888cf0$1@news.povray.org...
> Hi,
>
> As suggested by Ron Parker, I'll report my observation here. My original
> post in the p.general group didn't give any feedback but maybe I didn't
> explain it so well.
>
> There's something strange with layered textures. I'll call it a flaw until
> someone convince me it's not. The way reflection is transmitted through
> layers doesn't work, with any POV version. Reflection is either
transmitted
> with full strength through all layers, or not at all.. Let me illustrate:
>
> camera { location -4*z look_at 0 }
> light_source { <-25,25,-25>, 1.5 }
>
> #declare Texture_1=texture {
>   pigment {rgb <1,1,1> }
>   finish { specular 1 reflection 1 }
> }
>
> #declare Texture_2=texture {
>   pigment { rgbt <0,0,1, 0.2> }
> }
>
> sphere { 0,1 texture { Texture_1 } texture { Texture_2 } }
> plane { 1*y,-2 pigment { checker rgb 1 rgb .5 } }
>
> As you will see, pigment and specular of Texture_1 is only 0.2 after
> Texture_2 has been added, but reflection still goes through the layer at
> full strength of 1.. I see no purpose in this behaviour. You can try to
> change the transmit value and see how the rest of the texture behaves in a
> different way as reflection.
>
> Best regards,
> Hugo
>

I played a bit with the settings. To me it looks like the final specular and
reflection values are the sum of those in the layered textures.

If you declare the two textures like this:
#declare Texture_1=texture {
  pigment {rgb <1,1,1> }
  finish { specular 0.5 reflection 0.5 }
}

#declare Texture_2=texture {
  pigment { rgbt <0,0,1, 0.2> }
  finish { specular 0.5 reflection 0.5 }
}

the resulting image looks the same as that of your test scene. (actually
there is a slight difference, especially in the specular reflection)



Post a reply to this message

From: Hugo
Subject: Re: Strange thing with layered texture
Date: 8 Mar 2002 07:25:38
Message: <3c88adc2@news.povray.org>
> I played a bit with the settings. To me it looks like the final specular
and
> reflection values are the sum of those in the layered textures.

I am not surprised by this.

specular 0.5 * transmit 0.2 + specular 0.5 = 0.6
reflection 0.5 * transmit 0.2 + reflection 0.5 = 1.0

But as you see there's a bug.. Try this:

#declare Texture_1=texture {
  pigment {rgb <1,1,1> }
  finish { specular 0 diffuse 0 brilliance 0 reflection 0.5 }
}

#declare Texture_2=texture {
  pigment { rgbt <0,0,1, 0.1> }
}

And change the transmit up and down. Reflection keeps being 0.5.


Regards,
Hugo


Post a reply to this message

From: Coridon Henshaw
Subject: Re: Strange thing with layered texture
Date: 8 Mar 2002 22:29:51
Message: <Xns91CBE4DB4CB10CQ@204.213.191.226>
"Hugo" <hua### [at] post3teledk> wrote in news:3c88adc2@news.povray.org:

> But as you see there's a bug.. Try this:
> 
> #declare Texture_1=texture {
>   pigment {rgb <1,1,1> }
>   finish { specular 0 diffuse 0 brilliance 0 reflection 0.5 }
> }
> 
> #declare Texture_2=texture {
>   pigment { rgbt <0,0,1, 0.1> }
> }

Confirmed.  The bug seems to be triggered by transparent or filter 
pigments; reflection is calculated correctly when overlaying with 
nontransparent textures.


Post a reply to this message

From: Thorsten Froehlich
Subject: Re: Strange thing with layered texture
Date: 9 Mar 2002 07:22:40
Message: <3c89fe90@news.povray.org>
In article <3c888cf0$1@news.povray.org> , "Hugo" <hua### [at] post3teledk> wrote:

>  I'll call it a flaw until
> someone convince me it's not. The way reflection is transmitted through
> layers doesn't work, with any POV version.

So how can this be a flaw?  It is obviously by design and here is why:

All clears up if you consider how it all used to work before 3.1 when there
was no interior.  Back then you could (you still can more or less) create a
layered texture with *different* refraction on each layer - an obviously
nonsensical (and obviously impossible) flexibility caused by the addition of
layered textures.  So layered textures are closer to layered pigments,
defining everything for the color part of a texture - you are forgetting that
both _textures_ also have a default finish but not all options make sense when
combined.

Sure, this isn't the optimal solution, but it is not a random design decision
or flaw either.  And sure it will not be fixed in 3.5 because it is not a bug.
Of course, for POV-Ray 4.0 a better solution that adds more of the flexibility
you are looking for should and will be considered...

    Thorsten

____________________________________________________
Thorsten Froehlich
e-mail: mac### [at] povrayorg

I am a member of the POV-Ray Team.
Visit POV-Ray on the web: http://mac.povray.org


Post a reply to this message

From: Hugo
Subject: Re: Strange thing with layered texture
Date: 9 Mar 2002 10:09:20
Message: <3c8a25a0$1@news.povray.org>
Thorsten wrote:
> Sure, this isn't the optimal solution, but it is not a random design
decision
> or flaw either.  And sure it will not be fixed in 3.5 because it is not a
bug.

As you wish.. I just assumed that each layer is put on top of the other,
calculated one after the other; each layer being independant of the other.
That's how textures in POV currently works and that's how surface layers in
real life are independant of each other.. I expect only a few lines of code
exsist to control how much an underlying layer transmits / filters by the
next layer, and it's a puzzle for me that reflection needs to be left out of
this.

Regards,
Hugo


Post a reply to this message

From: Christopher James Huff
Subject: Re: Strange thing with layered texture
Date: 9 Mar 2002 16:07:16
Message: <chrishuff-98D5A1.16071809032002@netplex.aussie.org>
In article <3c8a25a0$1@news.povray.org>, "Hugo" <hua### [at] post3teledk> 
wrote:

> As you wish.. I just assumed that each layer is put on top of the other,
> calculated one after the other; each layer being independant of the other.
> That's how textures in POV currently works and that's how surface layers in
> real life are independant of each other.. I expect only a few lines of code
> exsist to control how much an underlying layer transmits / filters by the
> next layer, and it's a puzzle for me that reflection needs to be left out of
> this.

Well, remember that POV didn't get to its current state all at 
once...lots of little things were added onto source code that wasn't 
initially designed with those features in mind, and a lot of it was 
written around limitations that no longer exist, or just tacked on 
without any redesign. Basically, it is a tangled mess, and some things 
are much more complex than they should be. The layered texture code 
happens to be a good example of this...it is pretty much unfixable, 
you'll have to wait for the 4.0 rewrite.

This is only one of the problems with the current layered textures, 
there are others...for example, you can't use texture_maps in layers.

-- 
Christopher James Huff <chr### [at] maccom>
POV-Ray TAG e-mail: chr### [at] tagpovrayorg
TAG web site: http://tag.povray.org/


Post a reply to this message

From: Hugo
Subject: Re: Strange thing with layered texture
Date: 10 Mar 2002 07:06:02
Message: <3c8b4c2a$1@news.povray.org>
> This is only one of the problems with the current layered textures,
> there are others...for example, you can't use texture_maps in layers.

True... Okay thanks for these explanations.. We will leave it until version
4.. :o)

Regards,
Hugo


Post a reply to this message

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