POV-Ray : Newsgroups : povray.newusers : Combining normals : Re: Combining normals Server Time
2 Nov 2024 07:26:09 EDT (-0400)
  Re: Combining normals  
From: Mike Williams
Date: 10 Jul 2004 07:09:32
Message: <FaWt4HAK487AFwjS@econym.demon.co.uk>
Wasn't it SomeOne who wrote:
>Is it possible to make combinations of  normals? For example I want to give an
>object a bumps with a large scaling to get a slow wavy pattern and then
>superimpose onto that a bumpy or wavy texture of a much smaller scale. This
>suggests I need to define on the surface of the object two normals. But won't
>one overrule the other?


You can't layer normals in the same way that you layer pigments,
because, as you say, one overrules the other.

You can use an average normal_map, like this for simple blending of two
normals:

  normal {average
    normal_map {
      [0.5 Norm1]
      [0.5 Norm2]
    }
  }

If you want to do sophisticated blending, you can use normal functions

  #include "functions.inc"
  normal {function {
    f_bumps(x*3,y*3,z*3)
    / f_bumps(x*12,y*12,z*12)
    }
  }


-- 
Mike Williams
Gentleman of Leisure


Post a reply to this message

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