POV-Ray : Newsgroups : povray.general : How match pigment, with color_maps, with normal ? can be done? Server Time
31 Oct 2024 06:04:08 EDT (-0400)
  How match pigment, with color_maps, with normal ? can be done? (Message 1 to 6 of 6)  
From: RCRuiz
Subject: How match pigment, with color_maps, with normal ? can be done?
Date: 28 Jan 2006 23:45:00
Message: <web.43dc4752b4087b44cb266c810@news.povray.org>
Hi to all, I try to match the pigment that have color map with the normals

#declare tex_MAMaterial_Sub0 = texture {
 pigment { bozo color_map{[0.746667 color rgb
           <1.000000,1.000000,1.000000,1.0>][0.786667 color rgb
           <1.000000,0.000000,0.000000,0.0>]} scale < 2.0,2.0,2.0>
         }
 finish { ambient rgb <0.463922,0.300859,0.300859> diffuse 0.800000 specular
           0.500000 irid {0.000000} roughness 1/50 }
 normal {?????????}
}

I know that I can match it using image_map in the pigment and bump_map in
the normals but I was wondering

Thanks


Post a reply to this message

From: Alain
Subject: Re: How match pigment, with color_maps, with normal ? can be done?
Date: 29 Jan 2006 10:32:03
Message: <43dcdff3@news.povray.org>
RCRuiz nous apporta ses lumieres en ce 28/01/2006 23:41:
> Hi to all, I try to match the pigment that have color map with the normals
> 
> #declare tex_MAMaterial_Sub0 = texture {
>  pigment { bozo color_map{[0.746667 color rgb
>            <1.000000,1.000000,1.000000,1.0>][0.786667 color rgb
>            <1.000000,0.000000,0.000000,0.0>]} scale < 2.0,2.0,2.0>
>          }
>  finish { ambient rgb <0.463922,0.300859,0.300859> diffuse 0.800000 specular
>            0.500000 irid {0.000000} roughness 1/50 }
>  normal {?????????}
> }
> 
> I know that I can match it using image_map in the pigment and bump_map in
> the normals but I was wondering
> 
> Thanks
> 
> 
You can use the same pattern you used as a pigment for your normal.
normal{bozo NormalSize scale 2}

-- 
Alain
-------------------------------------------------
'I can resist anything but temptation.'


Post a reply to this message

From: Jim Charter
Subject: Re: How match pigment, with color_maps, with normal ? can be done?
Date: 29 Jan 2006 19:11:57
Message: <43dd59cd@news.povray.org>
RCRuiz wrote:
> Hi to all, I try to match the pigment that have color map with the normals
> 
> #declare tex_MAMaterial_Sub0 = texture {
>  pigment { bozo color_map{[0.746667 color rgb
>            <1.000000,1.000000,1.000000,1.0>][0.786667 color rgb
>            <1.000000,0.000000,0.000000,0.0>]} scale < 2.0,2.0,2.0>
>          }
>  finish { ambient rgb <0.463922,0.300859,0.300859> diffuse 0.800000 specular
>            0.500000 irid {0.000000} roughness 1/50 }
>  normal {?????????}
> }
> 
> I know that I can match it using image_map in the pigment and bump_map in
> the normals but I was wondering
> 
> Thanks
> 
plane { y, 0

         pigment {
                 bozo
                 pigment_map {
                         [.3 rgb (<0,0,1>+<5,5,5>)/6  ]
                         [.3 rgb 1 ]
                 }
         }
         normal {
                 pigment_pattern {
                         bozo
                         pigment_map {
                                 [.3 rgb 0  ]
                                 [.3 rgb 1 ]
                         }

                 }

         }

}


Post a reply to this message

From: RCRuiz
Subject: Re: How match pigment, with color_maps, with normal ? can be done?
Date: 29 Jan 2006 21:20:01
Message: <web.43dd76b4323eb1b44fd8b9bc0@news.povray.org>
Jim Charter and Alain, thanks a ton :D I'm new on Pov your respond help me a
lot

Than you again

Un Saludo


Post a reply to this message

From: Jim Charter
Subject: Re: How match pigment, with color_maps, with normal ? can be done?
Date: 29 Jan 2006 23:56:30
Message: <43dd9c7e$1@news.povray.org>
RCRuiz wrote:
> Jim Charter and Alain, thanks a ton :D I'm new on Pov your respond help me a
> lot
> 
> Than you again
> 
> Un Saludo
> 
> 
> 
> 
You are welcome.  Note that I gave you the "natural" sdl syntax to 
answer your specific question.

Many prefer and commonly use a more "general" solution based on sdl's 
support for functions.  You first declare the pigment as a function then 
use the function in both the pigment and normal definitions

#declare Fn_MyBozo =
         function {
                 pigment {
                         bozo
                         pigment_map {
                                 [.3 rgb 0 ]
                                 [.35 rgb 1 ]
                         }
                 }
         };

         plane { y, 0

                 pigment {
                         function { Fn_MyBozo (x,y,z).gray }
                         pigment_map {
                                 [0 rgb (<0,0,1>+<5,5,5>)/6  ]
                                 [1 rgb 1 ]
                         }
                 }
                 normal {
                         function { Fn_MyBozo (x,y,z).gray }
                 }

         }


This is a very powerful and flexible way to work.  A very clear 
treatment of this beside the docs can be found on Mike Williams' site:

http://www.econym.demon.co.uk/

under the isosurface tutorial


Post a reply to this message

From: Thomas de Groot
Subject: Re: How match pigment, with color_maps, with normal ? can be done?
Date: 1 Feb 2006 09:14:47
Message: <43e0c257@news.povray.org>
"Jim Charter" <jrc### [at] msncom> schreef in bericht
news:43dd9c7e$1@news.povray.org...

>function { Fn_MyBozo (x,y,z).gray }

A tiny little bit faster parsing/rendering is to use (x,y,z).red (or .green
or .blue) instead of .gray because POV then takes only one component instead
of making first the gray mix  :-)

Thomas


Post a reply to this message

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