POV-Ray : Newsgroups : povray.general : Possible torus bump mapping bug Server Time
29 Jul 2024 14:24:58 EDT (-0400)
  Possible torus bump mapping bug (Message 1 to 2 of 2)  
From: laser
Subject: Possible torus bump mapping bug
Date: 5 Aug 2011 14:05:00
Message: <web.4e3c2efc6f470711571dbe980@news.povray.org>
I've noticed what I think is a bug with bump mapping onto a torus (map_type 5).
The inner part of the torus (the part where the radius (from origin to
intersection point) is less than the major radius) has inverted normals or has
correct normals and the outer part has inverted normals.  In other words, inner
bumps become outer as soon as you cross the major radius line (on both bottom
and top of torus).  I would provide an image that clearly shows this, but this
group doesn't seem to allow attachments.  I'm using POV ray 3.62 on Windows XP
-32 bitand I also tried it on an old version of POV Ray.  Thanks for any help.

Here's my scene:

// Persistence Of Vision raytracer version 3.1 sample file.
// Bump map example
// Based on File by Drew Wells

global_settings { assumed_gamma 2.2 }

#include "colors.inc"

camera {
//   location  <0, 0, -120>
//   direction <0, 0,  1.5>
   location  <-1, 20, -2>*.2
//   location  <-15, 10, -20>*.4
//   direction <0, 1.5, 0>
   up        <0, 1,  0>
   right   <4/3, 0,  0>
   look_at   <0, 0,  0>
}

torus { 1, .4
  pigment {White}

   normal {
      bump_map {
         ppm "e:\stuff\ray\scr\bump\3365-b~1.ppm"
         bump_size 10
         interpolate 2
         map_type 5
      }
      //scale 15
      //translate <-12.5, -12.5, 0>
      //translate <-25, -25, 0>
   //rotate 90*z
   //rotate 90*x
   }
   finish {ambient 0.2 diffuse 0.7 specular 0.6}
}


light_source {<-2,3,3> colour rgb <.2, .2, .2> shadowless }
light_source {<-15,10,-20> colour White shadowless }


Post a reply to this message

From: Alain
Subject: Re: Possible torus bump mapping bug
Date: 5 Aug 2011 14:40:16
Message: <4e3c3910@news.povray.org>

> I've noticed what I think is a bug with bump mapping onto a torus (map_type 5).
> The inner part of the torus (the part where the radius (from origin to
> intersection point) is less than the major radius) has inverted normals or has
> correct normals and the outer part has inverted normals.  In other words, inner
> bumps become outer as soon as you cross the major radius line (on both bottom
> and top of torus).  I would provide an image that clearly shows this, but this
> group doesn't seem to allow attachments.  I'm using POV ray 3.62 on Windows XP
> -32 bitand I also tried it on an old version of POV Ray.  Thanks for any help.
>
> Here's my scene:
>
> // Persistence Of Vision raytracer version 3.1 sample file.
> // Bump map example
> // Based on File by Drew Wells
>
> global_settings { assumed_gamma 2.2 }
>
> #include "colors.inc"
>
> camera {
> //   location<0, 0, -120>
> //   direction<0, 0,  1.5>
>     location<-1, 20, -2>*.2
> //   location<-15, 10, -20>*.4
> //   direction<0, 1.5, 0>
>     up<0, 1,  0>
>     right<4/3, 0,  0>
>     look_at<0, 0,  0>
> }
>
> torus { 1, .4
>    pigment {White}
>
>     normal {
>        bump_map {
>           ppm "e:\stuff\ray\scr\bump\3365-b~1.ppm"
>           bump_size 10
>           interpolate 2
>           map_type 5
>        }
>        //scale 15
>        //translate<-12.5, -12.5, 0>
>        //translate<-25, -25, 0>
>     //rotate 90*z
>     //rotate 90*x
>     }
>     finish {ambient 0.2 diffuse 0.7 specular 0.6}
> }
>
>
> light_source {<-2,3,3>  colour rgb<.2, .2, .2>  shadowless }
> light_source {<-15,10,-20>  colour White shadowless }
>
>
>

I see the same thing here with version 3.7. Same OS.


Post a reply to this message

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