POV-Ray : Newsgroups : povray.general : Specularity mapping Server Time
13 Aug 2024 19:26:48 EDT (-0400)
  Specularity mapping (Message 4 to 13 of 13)  
<<< Previous 3 Messages Goto Initial 10 Messages
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

From: Peter Popov
Subject: Re: Specularity mapping
Date: 20 Aug 1998 00:28:58
Message: <35db97fa.0@news.povray.org>
Tim Glover wrote in message <35D### [at] nettallycom>...
>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> --

Like #declare Glear = color Clear :)
Sorry, I was rendering at highest render/normal gui and typing was a pit
pesky...

>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!
>

Glad I could help. Later you may try a multi-layered texture with the
undermost one for pigment and the rest completely clear, but with bump_map,
texture_mapped specular, reflection, metallic... beats 3DS's textures,
doesn't it (well, no u-v mapping in POV...yet)

>
>Tim Glover
>
>tgl### [at] nettallycom

Happy tracing!

--Peter

pet### [at] usanet


Post a reply to this message

From: Nathan Kopp
Subject: Re: Specularity mapping
Date: 25 Aug 1998 01:02:11
Message: <35E23697.622DD069@ltu.edu>
I've actually added the feature that you're looking for... I call it an
"image_pattern".  But you won't find it in the official version.
As soon as POV 3.1 becomes official, I'll get out a beta version of my
changes (and hopefully they'll make it in some form into the official
version).

My other changes to POV include:
  UV mapping
  new mesh syntax - for smaller files - developed with Thomas Baier's help

-Nathan Kopp

Dan Connelly wrote:
> 

> 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.
>


Post a reply to this message

From: Tim Glover
Subject: Re: Specularity mapping
Date: 25 Aug 1998 13:32:05
Message: <35E2E6E7.6CDC@nettally.com>
Are these mods available somewhere?  Not everyone's jumped to 3.1 betas
yet -- some of us are still using the last official release.  (a UV
mapping workaround  was going to be my next project!)

Tim G.
tgl### [at] nettallycom




Nathan Kopp wrote:
> 
> I've actually added the feature that you're looking for... I call it an
> "image_pattern".  But you won't find it in the official version.
> As soon as POV 3.1 becomes official, I'll get out a beta version of my
> changes (and hopefully they'll make it in some form into the official
> version).
> 
> My other changes to POV include:
>   UV mapping
>   new mesh syntax - for smaller files - developed with Thomas Baier's help
> 
> -Nathan Kopp
>


Post a reply to this message

<<< Previous 3 Messages Goto Initial 10 Messages

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