POV-Ray : Newsgroups : povray.newusers : Specularity mapping Server Time
30 Jul 2024 18:18:27 EDT (-0400)
  Specularity mapping (Message 1 to 5 of 5)  
From: ceggi
Subject: Specularity mapping
Date: 29 Mar 2001 17:49:02
Message: <3ac3bbde@news.povray.org>
It is possible to do anything similar to specularity or diffuse mapping of
Lightwave, using a texture map in Pov or
in MegaPov?

Ceggi


Post a reply to this message

From: Margus Ramst
Subject: Re: Specularity mapping
Date: 29 Mar 2001 18:23:52
Message: <3ac3c408@news.povray.org>
"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]}}

-- 
Margus Ramst

Personal e-mail: mar### [at] peakeduee
TAG (Team Assistance Group) e-mail: mar### [at] tagpovrayorg
Home page http://www.hot.ee/margusrt


Post a reply to this message

From: Batronyx
Subject: Re: Specularity mapping
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

From: Paul Blaszczyk
Subject: Re: Specularity mapping
Date: 11 Apr 2001 09:29:55
Message: <3ad45c53$1@news.povray.org>
But it is not possible to use a grayscale bitmap as a specular-map right
now..right?
black (specular 0.0 ) up white (specular 1.0)

Paul


Post a reply to this message

From: Batronyx
Subject: Re: Specularity mapping
Date: 11 Apr 2001 23:14:05
Message: <3ad51d7d@news.povray.org>
Paul Blaszczyk <3d### [at] alpharayde> wrote in message
<3ad45c53$1@news.povray.org>...
>But it is not possible to use a grayscale bitmap as a specular-map right
>now..right?
>black (specular 0.0 ) up white (specular 1.0)
>
>Paul


Correct. The net effect of my code snippet earlier is to create 256
separate, complete textures differing only in specular, and then map those
into a grayscale bitmap. Maybe one day this functionality will be added for
simplicity's sake. It's sometimes confusing working out the intricacies of
layered, nested, and script-controlled textures, but, at least we 'can' use
those features as workarounds.


Post a reply to this message

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