POV-Ray : Newsgroups : povray.general : image based normal maps? : Re: image based normal maps? Server Time
19 Apr 2024 22:48:06 EDT (-0400)
  Re: image based normal maps?  
From: Bald Eagle
Date: 17 Jan 2019 06:35:00
Message: <web.5c406753e20dd126765e06870@news.povray.org>
"cloudyroo" <nomail@nomail> wrote:
> Does anyone know how I can apply a normal map (like this
> https://imgur.com/a/GbE7K8K) to an object and have it actually behave like a
> normal map (i.e. adjust the normal of the surface by it's RGB value).
> Bump map doesn't do the right thing, I feel like it might be to do with
> slope_map but I can't get it to take an image.
> I can't believe it wouldn't be possible.
> Any help would be much appreciated.
> Thanks,
> cloudyroo

Real quick (untested)
based on
http://www.povray.org/documentation/view/3.7.0/337/
and
http://www.povray.org/documentation/view/3.6.1/378/

 #declare FOO = function {
pigment
    {
        image_map
        {
            [BITMAP_TYPE] "bitmap[.ext]"
            [IMAGE_MAP_MODS...]
        }
        [PIGMENT_MODFIERS...]
    }
}

and then do:


   normal {  // <----switched to normal instead of pigment here
      function { FOO(x,y,z).green }
      [PIGMENT_MODIFIERS...]
   }




There may be a quicker / neater way to do it with a function pattern or pattern
function ..... but I'd use those as keywords to search the docs and the forum
posts.


Post a reply to this message

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