POV-Ray : Newsgroups : povray.general : Help: The normal map is not working Server Time
15 Mar 2026 08:36:21 EDT (-0400)
  Help: The normal map is not working (Message 1 to 3 of 3)  
From: LanuHum
Subject: Help: The normal map is not working
Date: 14 Mar 2026 01:05:00
Message: <web.69b4e8ed3bbece724b3090d75f41e3cc@news.povray.org>
Hello! I created a picture with a gradient. I want to use it as a height map for
a sphere. However, only gray stripes are visible on the sphere.

#version 3.7;
#include "shapes.inc"

global_settings {
    assumed_gamma 1.000000
    max_trace_level 3
    charset utf8
}
sky_sphere {
    pigment {rgb<0.051, 0.051, 0.051>}
}

#declare Default_texture = texture{pigment {rgb 0.8}}

#declare Material = texture{
    pigment{color srgbft <0.8000,0.8000,0.8000,0.0000,0.0000>}
    finish{
        diffuse 0.8000
        brilliance 1.8000
          }
}
#declare Material_001 = texture{
    pigment{color srgbft <0.8000,0.8000,0.8000,0.0000,0.0000>}
    normal{ bump_map{"/home/lanuhum/src/Thread_90.jpg" gamma 1.1000 map_type 0
interpolate 2 bump_size 5}
        translate <0.0000,0.0000,0.0000>
        rotate <0.0000,0.0000,0.0000>
        scale <1.0000,1.0000,1.0000>/1
        }
    finish{
        diffuse 0.8000
        brilliance 1.8000
          }
}
#declare data_Sphere_shape_ob = sphere { 0,1
    texture {Material_001}
    matrix <1.000000, 0.000000, 0.000000,  0.000000, 1.000000, 0.000000,
0.000000, 0.000000, 1.000000,  0.000000, 0.000000, 0.000000>
}
#include "data_Cube_dec.inc"

object {data_Sphere_shape_ob
    matrix <1.000000, 0.000000, 0.000000,  0.000000, -0.000000, -1.000000,
0.000000, 1.000000, -0.000000,  0.000000, 0.000000, 0.000000>
}
object {data_Cube_ob
    matrix <1.000000, 0.000000, 0.000000,  0.000000, -0.000000, -1.000000,
0.000000, 1.000000, -0.000000,  0.000000, 0.000000, 0.000000>
}
light_source {
    <4.08,5.9,-1.01>
    color rgb<1, 1, 1>
    fade_distance 29.9999828339
    fade_power 1
}
camera {
    perspective
    location  <0,0,0>
    look_at  <0,0,-1>
    right <-1.7777777777777777, 0, 0>
    up <0, 1, 0>
    angle  49.134343
    rotate  <-26.440706, 46.691945, -0.000003>
    translate <7.481132, 5.343666, 6.507640>
}


Post a reply to this message


Attachments:
Download 'bump_map.jpg' (64 KB)

Preview of image 'bump_map.jpg'
bump_map.jpg


 

From: Bald Eagle
Subject: Re: Help: The normal map is not working
Date: 14 Mar 2026 08:30:00
Message: <web.69b55447b63eec031f9dae3025979125@news.povray.org>
"LanuHum" <Lan### [at] yandexru> wrote:
> Hello! I created a picture with a gradient. I want to use it as a height map for
> a sphere. However, only gray stripes are visible on the sphere.

That's because you're only perturbing the normal vectors on the smooth sphere to
make the light reflect in different directions than it normally would, and so
produce the illusion that there is a "texture" on the surface when there isn't.

There are articles on the web and maybe a POV-Ray FAQ that show the shadows cast
by objects that are really shaped that way vs a smooth object with a normal map.

What you want to do is "surface displacement" where you actually change the
geometry of the surface of your sphere.

Luckily, myself, WFP, and Maetes have worked on this.

Your best bet is to use whatever function makes your stripes to modulate the
radius of your sphere so that those points have the actual height dictated by
the function.

https://news.povray.org/povray.binaries.images/thread/%3C5f16dc29%40news.povray.org%3E/

https://news.povray.org/povray.advanced-users/thread/%3Cweb.67b47b18cb1bd5e34d0a98d30225ff5%40news.povray.org%3E/

You can also look at Mike Williams' isosurface tutorial where he has several
examples of using functions to change the surface of a sphere.

Hope that helps.

- BE


Post a reply to this message

From: LanuHum
Subject: Re: Help: The normal map is not working
Date: 14 Mar 2026 14:10:00
Message: <web.69b5a3a0b63eec034b3090d75f41e3cc@news.povray.org>
"Bald Eagle" <cre### [at] netscapenet> wrote:
> "LanuHum" <Lan### [at] yandexru> wrote:
> > Hello! I created a picture with a gradient. I want to use it as a height map for
> > a sphere. However, only gray stripes are visible on the sphere.
>
> That's because you're only perturbing the normal vectors on the smooth sphere to
> make the light reflect in different directions than it normally would, and so
> produce the illusion that there is a "texture" on the surface when there isn't.
>
> There are articles on the web and maybe a POV-Ray FAQ that show the shadows cast
> by objects that are really shaped that way vs a smooth object with a normal map.
>
> What you want to do is "surface displacement" where you actually change the
> geometry of the surface of your sphere.
>
> Luckily, myself, WFP, and Maetes have worked on this.
>
> Your best bet is to use whatever function makes your stripes to modulate the
> radius of your sphere so that those points have the actual height dictated by
> the function.
>
>
https://news.povray.org/povray.binaries.images/thread/%3C5f16dc29%40news.povray.org%3E/
>
>
https://news.povray.org/povray.advanced-users/thread/%3Cweb.67b47b18cb1bd5e34d0a98d30225ff5%40news.povray.org%3E/
>
> You can also look at Mike Williams' isosurface tutorial where he has several
> examples of using functions to change the surface of a sphere.
>
> Hope that helps.
>
> - BE

I understand. Thank you.


Post a reply to this message

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