POV-Ray : Newsgroups : povray.general : Slope pattern and normals Server Time
19 Nov 2024 11:38:00 EST (-0500)
  Slope pattern and normals (Message 1 to 2 of 2)  
From: Rune
Subject: Slope pattern and normals
Date: 15 Mar 2002 21:09:34
Message: <3c92a95e@news.povray.org>
Hey, I was under the impression that the slope pattern did not take into
account any normal statements in the texture, but it seems it does, at least
now.

This is very good in some situations and very bad in others. What do others
think?

It's even possible to create normals based on the slope - and these normals
are then again taken into account in other slope patterns for that surface,
like in the pigment. This is strange somehow, because either it would
involve recursive calls, or else the order in which texture elements are
calculated internally must somehow affect the result. Further investigation
from others needed I guess.

Here's an example scene:

camera {location -10*z angle 18}
light_source {<100,0,-200>, color 1}
sphere {
   0, 1
   pigment {
      slope -y
      color_map {
         [0,red  1]
         [1,blue 1]
      }
   }
   normal {
      slope -y
      normal_map {
         [0.45, bumps 1   scale 0.2]
         [0.55, crackle 1 scale 0.3]
      }
   }
   finish {ambient 0 diffuse 1}
}

Rune
--
3D images and anims, include files, tutorials and more:
Rune's World:    http://rsj.mobilixnet.dk (updated Feb 16)
POV-Ray Users:   http://rsj.mobilixnet.dk/povrayusers/
POV-Ray Webring: http://webring.povray.co.uk


Post a reply to this message

From: Slime
Subject: Re: Slope pattern and normals
Date: 16 Mar 2002 02:51:49
Message: <3c92f995@news.povray.org>
> Hey, I was under the impression that the slope pattern did not take into
> account any normal statements in the texture, but it seems it does, at
least
> now.
>
> This is very good in some situations and very bad in others. What do
others
> think?


In the bad situations, you can take the slope pattern out of the pigment and
map the entire texture wth a slope pattern; then the normal inside the
texture won't be taken into account.

> It's even possible to create normals based on the slope - and these
normals
> are then again taken into account in other slope patterns for that
surface,
> like in the pigment. This is strange somehow, because either it would
> involve recursive calls, or else the order in which texture elements are
> calculated internally must somehow affect the result. Further
investigation
> from others needed I guess.

Well... the only way you can have a normal statement inside a slope pattern
is if the slope pattern is applied to the entire texture, for mapping
textures. You can put more slope patterns inside that, but the only time
they can be affected by a normal{} block is when you put them inside a
corresponding pigment{} block, and then you're unable to nest any more
slope-dependant textures inside it.

- Slime
[ http://www.slimeland.com/ ]
[ http://www.slimeland.com/images/ ]


Post a reply to this message

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