POV-Ray : Newsgroups : povray.documentation.inbuilt : layered textures and normals Server Time
18 Apr 2024 11:00:49 EDT (-0400)
  layered textures and normals (Message 1 to 2 of 2)  
From: Tom Melly
Subject: layered textures and normals
Date: 22 Jan 2003 09:02:23
Message: <3e2ea46f@news.povray.org>
The normal in the last texture of a layered texture does not apply globally to
the layered texture (which is what the docs seem to imply - 3.9.10.2). It is
applied according the transparency of the texture.

For an example, see my recent post in general. Oh, what the hell, here it is:
// ----------------------------------------

#declare TestTex =
texture{
  pigment{rgb 0.5}
}
texture{
  pigment{
    marble scale 0.2
    pigment_map{
      [0 rgbf 1]
      [1 rgbf <0.5,0.5,0.5,1>]

    }
  }
  normal{granite 5 scale 0.1}
}

box{
  0,1
  translate -0.5
  texture{TestTex}
}

I'm not sure if this is a bug in the docs, the prog. or my brain.

--
#macro A(V,B,C,R)#while(B-256)#if(V-128/B>=0)sphere{0,.5translate<C-4R-1,9>
pigment{rgb<1-C/8R/2C/8>}}#local V=V-128/B;#end#local B=B*2;#local C=C+1;#
end#end A(234,1,0,2)A(85,1,0,1)A(81,1,0,0)light_source{-5 1}//Tom Melly


Post a reply to this message

From: hughes, b 
Subject: Re: layered textures and normals
Date: 23 Jan 2003 02:40:39
Message: <3e2f9c77$1@news.povray.org>
"Tom Melly" <tom### [at] tomandlucouk> wrote in message
news:3e2ea46f@news.povray.org...
> The normal in the last texture of a layered texture does not apply
globally to
> the layered texture (which is what the docs seem to imply - 3.9.10.2). It
is
> applied according the transparency of the texture.

Looks as though that section doesn't consider changes about how normals were
changed to average between layers. If I'm remembering that right. But then
that wasn't your reason for posting.

If I were to guess, I'd say the invisibility is what you would want it to do
so that underlying textures are seen unimpeded by the upper normal when the
pigment is set up to not be there. However, then that leaves specular
highlights and reflection still affecting that normal. This has been
discussed before. Glass can be totally clear and yet must still highlight
and reflect. Those still show over the whole surface and makes the normal
appear everywhere.

A paragraph at 3.9.10.2 says:

"Another touch we want to add to the cloth are some wrinkles as if the cloth
had been rumpled. This is not another texture layer, but when working with
layered textures, we must keep in mind that changes to the surface normal
must be included in the uppermost layer of the texture. Changes to lower
layers have no effect on the final product (no matter how transparent the
upper layers are)."

By 'not another texture layer' it is referring to the addition of a normal
statement in the topmost layer. But saying underlying normals don't factor
in is obviously wrong. And the lack of a normal where transparency is at
seems a move to make total transparency or invisibility possible, yet falls
short since it still reacts with reflection and highlights. This would then
be a programming matter.

I think you may have found something needing a change in the doc anyway.


Post a reply to this message

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