POV-Ray : Newsgroups : povray.general : layered texture and normal problem Server Time
5 Nov 2024 20:17:50 EST (-0500)
  layered texture and normal problem (Message 1 to 3 of 3)  
From: Tom & Lu Melly
Subject: layered texture and normal problem
Date: 20 Jan 2003 18:44:25
Message: <3e2c89d9@news.povray.org>
I'm getting odd behaviour when adding a normal to the final texture
statement in a layered texture.

My understanding was that the normal in the last texture was applied to the
whole texture, regardless of transparency.

Here's a minimal scene - on my PC the normal comes and goes.

#version 3.5;

#include "colors.inc"
#include "functions.inc"

global_settings {
  assumed_gamma 1.0
}

// ----------------------------------------

camera {
  location  <0.0, 0.5, -2.0>
  look_at   <0.0, 0.0,  0.0>
}

sky_sphere {
  pigment {
    wrinkles
    color_map {
      [0.0 rgb <0.6,0.7,1.0>]
      [0.7 rgb <0.0,0.1,0.8>]
    }
  }
}

light_source {
  <0, 0, 0>            // light's position (translated below)
  color rgb <1, 1, 1>  // light's color
  translate <-100, 100, -100>
}

// ----------------------------------------

#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}
}


Post a reply to this message

From: Tom Melly
Subject: Re: layered texture and normal problem
Date: 21 Jan 2003 07:30:37
Message: <3e2d3d6d$1@news.povray.org>
"Tom & Lu Melly" <all### [at] tomandlucouk> wrote in message
news:3e2c89d9@news.povray.org...

... or to put it another way, the sample texture in the docs at 3.9.10 is
broken, and the statement (and similiar statements elsewhere):

"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)."

would appear to be wrong.

I've found that the work-around is to place the normal in all of the layered
texture's distinct textures, but this *seems* to cause a slow-down (well, it is
slower, but given the normal is being applied to a larger surface, the slow-down
may not be gratuitous).


Post a reply to this message

From: gonzo
Subject: Re: layered texture and normal problem
Date: 21 Jan 2003 15:35:06
Message: <web.3e2dae0af9ae0adea0c272b50@news.povray.org>
Tom & Lu Melly wrote:
>I'm getting odd behaviour when adding a normal to the final texture
>statement in a layered texture.
>
>My understanding was that the normal in the last texture was applied to the
>whole texture, regardless of transparency.
>


I had this same issue yesterday when making a 3 layered texture.  I had to
include the normal and part of the finish in all 3 layers before I got the
right result.

With the finish, everything except ambient (phong reflection brilliance)
seemed to work fine, but unless I specifically put "ambient 0" in all 3
layers, I still got ambient where I didn't want it.

RG - why doesn't my mind come with a "defrag" command?


Post a reply to this message

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