POV-Ray : Newsgroups : povray.newusers : Specularity mapping : Re: Specularity mapping Server Time
30 Jul 2024 16:14:52 EDT (-0400)
  Re: Specularity mapping  
From: Batronyx
Date: 29 Mar 2001 19:36:36
Message: <3ac3d514@news.povray.org>
Margus Ramst wrote

>"ceggi" <ceg### [at] tiscalinetit> wrote:
>
>> It is possible to do anything similar to specularity or diffuse mapping
of
>> Lightwave, using a texture map in Pov or in MegaPov?
>
>Yes, it's although not quite as straightforward.
>Try using a texture_map where component textures have the same pigment,
>normal etc, but different finish settings. For example:
>
>#declare T1=texture{pigment{rgb x} finish{diffuse .3}}
>#declare T2=texture{pigment{rgb x} finish{diffuse .8}}
>#declare Tex=texture{bozo texture_map{[0 T1][1 T2]}}
>

You can also do something similar to this with an bitmapped image, ( more
like other renderers tend to use ), but it is even less straightforward.
Following Margus' example:

#declare T1=texture{pigment{rgb x} //save the finish for later
#declare Tex=texture{
               material_map { tga "myspecular.tga"  map_type 2 interpolate 2
           #local Count = 1;
           #while (Count <= 255)
               texture { T1 finish { specular (Count/255)*.2 }
           #local Count = Count + 1;
           #end

Here you can see I've chosen to clamp my values to below 0.2 and keep
everything variably dull illustrating also the flexibility of this method.
You can substitute additional code, or use any of the float functions and
tweak the results to suit you while controlling their location with the
bitmap.

Hope that helps :)


bat### [at] cadronhsacom


Post a reply to this message

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