POV-Ray : Newsgroups : povray.newusers : Combining normals Server Time
30 Jul 2024 12:31:17 EDT (-0400)
  Combining normals (Message 1 to 4 of 4)  
From: SomeOne
Subject: Combining normals
Date: 10 Jul 2004 02:40:56
Message: <40ef8f78$1@news.povray.org>
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?

-- 
Maurice


Post a reply to this message

From: Mike Williams
Subject: Re: Combining normals
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

From: Alain
Subject: Re: Combining normals
Date: 10 Jul 2004 08:53:02
Message: <40efe6ae$1@news.povray.org>
Mike Williams nous apporta ses lumieres ainsi en ce 10/07/2004 07:07... :

>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]
>    }
>  }
>
The values in a normal_map are ponderation for the average. In my 
experience, the order is not importent: normal_map{[1 Norm1][0.2 Norm2]} 
is OK.

Alain


Post a reply to this message

From: SomeOne
Subject: Re: Combining normals
Date: 10 Jul 2004 10:49:43
Message: <40f00207@news.povray.org>
"Mike Williams" <nos### [at] econymdemoncouk> schreef in bericht
news:FaW### [at] econymdemoncouk...
| 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]
|     }
|   }
|

Yes, thats what I was looking for. I was already thinking of creating
heightfield do this. But this works like a charm.

Thanks!!

-- 
Maurice


Post a reply to this message

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