POV-Ray : Newsgroups : povray.general : Specularity mapping Server Time
13 Aug 2024 17:24:04 EDT (-0400)
  Specularity mapping (Message 1 to 10 of 13)  
Goto Latest 10 Messages Next 3 Messages >>>
From: Tim Glover
Subject: Specularity mapping
Date: 18 Aug 1998 10:04:11
Message: <35D97BA2.7B64@nettally.com>
Anybody got any good ideas about how to do specularity mapping within
POVRAY?  Since specularity is a "finish" function, it seems to be tired
to a particular texture.  I've got a couple of way-out ideas that MAY
work, but if there's a better way that I've overlooked, then I'd hate to
re-invent the wheel (using flint axes and duct-tape).

Tim Glover

tgl### [at] nettallycom


Post a reply to this message

From: Ron Parker
Subject: Re: Specularity mapping
Date: 18 Aug 1998 10:41:21
Message: <35d98481.0@news.povray.org>
On Tue, 18 Aug 1998 09:03:30 -0400, Tim Glover <tgl### [at] nettallycom> wrote:
>Anybody got any good ideas about how to do specularity mapping within
>POVRAY?  Since specularity is a "finish" function, it seems to be tired
>to a particular texture.  I've got a couple of way-out ideas that MAY
>work, but if there's a better way that I've overlooked, then I'd hate to
>re-invent the wheel (using flint axes and duct-tape).

Try a down-to-earth texture map.


Post a reply to this message

From: Tim Glover
Subject: Re: Specularity mapping
Date: 18 Aug 1998 12:28:26
Message: <35D99D71.7BAE@nettally.com>
Good idea, but...

I've considered this, but texture mapping is (like all textures in
POVRAY) a procedural thing.  It's got to conform to (some)
pre-determined mathematical formula.
What I'm looking for is more like a bump map, but instead of perturbing
the surface normals, the function perturbs the specularity.


Thanks anyways....

Tim G.

Ron Parker wrote:
> 
> On Tue, 18 Aug 1998 09:03:30 -0400, Tim Glover <tgl### [at] nettallycom> wrote:
> >Anybody got any good ideas about how to do specularity mapping within
> >POVRAY?  Since specularity is a "finish" function, it seems to be tired
> >to a particular texture.  I've got a couple of way-out ideas that MAY
> >work, but if there's a better way that I've overlooked, then I'd hate to
> >re-invent the wheel (using flint axes and duct-tape).
> 
> Try a down-to-earth texture map.


Post a reply to this message

From:
Subject: Re: Specularity mapping
Date: 18 Aug 1998 12:56:41
Message: <wb90kmuvws.fsf@tycho.intervett.no>
[Tim Glover <tgl### [at] nettallycom>]
| I've considered this, but texture mapping is (like all textures in
| POVRAY) a procedural thing.  It's got to conform to (some)
| pre-determined mathematical formula.
| What I'm looking for is more like a bump map, but instead of perturbing
| the surface normals, the function perturbs the specularity.

// RTFM once in a while, would you?

#declare lowspec =
texture{
  pigment{color rgb <1,1,1>}
  finish{specularity 0}
}

#declare hispec =
texture{
  pigment{color rgb <1,1,1>}
  finish{specularity 1}
}


sphere{ <0,0,0>,1 
  texture {
     spotted
     texture_map{
       [0.2 texture lowspec]
       [0.8 texture hispec]
     } 
  }
}

Now all you're missing is a light source and a camera. :)

-- 
A penny for your thoughts.
Mine are more expensive.


Post a reply to this message

From: Tim Glover
Subject: Re: Specularity mapping
Date: 18 Aug 1998 13:44:21
Message: <35D9AF3C.2107@nettally.com>
Nice code.  But still doesn't solve my problem.  Thanks for the try,
though.

I did read the FINE manual.  POVRAY doesn't support specularity based on
an image map as it does support normal perturbation based on a (bump)
image map.  


Perhaps an example might help.

Imagine a sheet of shiny stainless steel with hundreds of small dirty
bronze rivets.
Imagine a bump map of the rivet heads applied to cause small bumps
Now imagine a specularity map applied so that the rivet heads do not
gleam like the shiny stainless steel.


Now instead, imagine trying to do this by modeling each rivet and
attaching a different
texture (with varying specularity) to rivets and background stainless
steel.


By the way - POVRAY is a little misleading in it's use of the term
specularity, having both specular highloghts (controlled by ROUGHNESS
and SPECULAR keyords) and specular reflection (controlled by the
REFLECTION keyword).  It looks like what I want is specular highlights.


Thanks again.

Tim G.




> 


> 

> // RTFM once in a while, would you?
> 

<snip>
nice code deleted here
<end snip>


Post a reply to this message

From: Ron Parker
Subject: Re: Specularity mapping
Date: 18 Aug 1998 16:52:28
Message: <35d9db7c.0@news.povray.org>
On Tue, 18 Aug 1998 12:43:40 -0400, Tim Glover <tgl### [at] nettallycom> wrote:
>I did read the FINE manual.  POVRAY doesn't support specularity based on
>an image map as it does support normal perturbation based on a (bump)
>image map.  

You are correct.  For some reason, I had assumed that image_map could be
used wherever any other pattern type could.  I wonder why not.  It looks like
your best bet is a material map, though I'm not sure if it will work in your
specific application.


Post a reply to this message

From: Dan Connelly
Subject: Re: Specularity mapping
Date: 18 Aug 1998 19:53:48
Message: <35DA05FC.CC1A8752@flash.net>
Ron Parker wrote:
> 
> You are correct.  For some reason, I had assumed that image_map could be
> used wherever any other pattern type could.  I wonder why not.  It looks like
> your best bet is a material map, though I'm not sure if it will work in your
> specific application.

I also am surprised that a raster image (ie image map analog) can't be
used anywhere a pattern can.  Given the highly modular form of the POV code
it would seem the natural implementation.

Instead of bump_map and image_map (and specular_map...), one could
then just have map... like any other function.

Dan
-- 
http://www.flash.net/~djconnel/


Post a reply to this message

From: Peter Popov
Subject: Re: Specularity mapping
Date: 19 Aug 1998 00:36:27
Message: <35da483b.0@news.povray.org>
Try the following... haven't tested it as I'm typing while I am downloading
new msgs, but give it a shot:

#declare woodWithRivets =
plane
{ y, 0
  texture
  { pigment
    { DMFWood1 } // on top of my head
    normal
    { bump_map
      { sys "rivets.bmp" // not sure, wasn't there one
                         // in the Windoze directory?
        interpolate 2
        bump_size 0.5
      }
      rotate 90*x
    }
  }

  texture
  { material_map
    { gif "circles.gif" // same as rivets but only two colors:
                        // black for plane white for rivet
      texture { finish { Dull  } pigment { Clear } }
      texture { finish { Shiny } pigment { Glear } }
    }
  }
}

You get the idea. Not sure... should work. Please try and report the
results, I'm curious (I wanna see my skill in poving a prima vista).

Regards,

--Peter

pet### [at] usanet

Tim Glover wrote in message <35D### [at] nettallycom>...
>Anybody got any good ideas about how to do specularity mapping within
>POVRAY?  Since specularity is a "finish" function, it seems to be tired
>to a particular texture.  I've got a couple of way-out ideas that MAY
>work, but if there's a better way that I've overlooked, then I'd hate to
>re-invent the wheel (using flint axes and duct-tape).
>
>Tim Glover
>
>tgl### [at] nettallycom


Post a reply to this message

From:
Subject: Re: Specularity mapping
Date: 19 Aug 1998 03:38:03
Message: <wbbtphpjej.fsf@tycho.intervett.no>
[Tim Glover <tgl### [at] nettallycom>]
| Nice code.  But still doesn't solve my problem.  Thanks for the try,
| though.

My mistake. Material map seems to be your best bet here. I once made a
material_map that had 255 seperate textures (a while loop), one for
each colour. Might be worth a shot.

-- 
A penny for your thoughts.
Mine are more expensive.


Post a reply to this message

From: Tim Glover
Subject: Re: Specularity mapping
Date: 19 Aug 1998 14:53:40
Message: <35DB10FB.2DA0@nettally.com>
Wow - not bad for off the top of your head.  This is pretty close to
what I wanted.  It took a few tweaks -- like Glear -> Clear <grin> --
and still having trouble using bumpmap and texture map together, but
DEFINITELY a good lead for further experimentation.  First tries have
been exciting.  Guess it'll be a LATE night tonight.

bye bye duct tape.

Thanks for the excellent lead!


Tim Glover

tgl### [at] nettallycom


Peter Popov wrote:
> 
> Try the following... haven't tested it as I'm typing while I am downloading
> new msgs, but give it a shot:
> 

<snip>


Post a reply to this message

Goto Latest 10 Messages Next 3 Messages >>>

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