POV-Ray : Newsgroups : povray.general : Planetary Heightfields: Now what? : Re: bump_maps [Re: Planetary Heightfields: Now what?] Server Time
16 Nov 2024 11:14:26 EST (-0500)
  Re: bump_maps [Re: Planetary Heightfields: Now what?]  
From: Dan Connelly
Date: 26 Sep 1998 22:05:57
Message: <360D8F65.EAFCBFDC@flash.net>
I had no problem seeing features.... but I suggest
the following changes :

1. The map field is defined from y=0 to y=1.  You want
   y=-1 to y=+1.  Therefore you need to apply a translation
   and a scale.
2. specify a finish.
3. Your filename is different than the one you posted (jbrp.0.pgm).
   This may be an issue.
4. "interpolate 2" should almost always be used with bump maps
   to prevent pixellization artifacts.


Consider the following scene :

sphere { <0, 0, 0>, 1
   normal { 
     bump_map {
       pgm "c:\tmp\jbrp.0.pgm"       // adjust this line
       bump_size 10.0
       map_type 2
       interpolate 2                 // this is important
     }
     translate -0.5 * y
     scale 2 * y
   }
   pigment {
     color rgb 0.5
   }
   finish {
     ambient 0.2 diffuse 0.8 specular 0.25 roughness 0.02
   }
}

camera {
  location -3 * z
  look_at 0
}
light_source {
  <50, 50, -100>
  color rgb 1
}

Jed Reynolds wrote:
> 
> However, when I try to render it, I don't see any bumps
> on the sphere. Do you see anything erroneous about this
> bump map statement?
> 
> #declare PLANET=sphere { <0, 0, 0>, 1
> 
>         normal {
>                 bump_map {
>                         pgm "surfaces/jbrp.1.pgm"
>                         bump_size 10.0
>                         map_type 2
>                 }
>         }
> 
>         pigment {
>                 Gray
>                 //image_map {
>                 //      pgm "surfaces/jbrp.0.pgm"
>                 //      map_type 1
>                 //      interpolate 2
>                 //}
>         }
>         scale 6
>         translate <0, 4, 0>
> }

-- 
http://www.flash.net/~djconnel/


Post a reply to this message

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