POV-Ray : Newsgroups : povray.newusers : Chrome-like extruded object... Server Time
28 Jul 2024 18:26:46 EDT (-0400)
  Chrome-like extruded object... (Message 1 to 4 of 4)  
From: this is me
Subject: Chrome-like extruded object...
Date: 15 Jun 2008 15:35:01
Message: <web.48556dd8c23a6d99bae00d80@news.povray.org>
What would be the best way to achieve the following:

Take your average cookie cutter, for example, and instead of it being made of a
thin band of metal, assume it's made of something thicker, so now what you have
is an extruded object with a thick cookie cutter outline.  I figured the best
way to go about making this in POV was to draw the thing in a drawing program,
and simply fill the interior with a gray color and the border with white.  I
then saved it as a PNG with a black matte around the whole picture.  In POV, I
used the PNG in a height field, and set the water level to 10/256 so the black
matte would be ignored.  So there it was, a pretty good rendered version of
what I had in mind.  Now here's the kicker.  My goal was to make this thing
pretty relfective - chrome-like - so I made those changes and rerendered.  I
noticed the front face of the object reflected real nice, but when I rotated it
over to see what the side surfaces looked like, things wheren't so good - it
wasn't mirror-like.  I guess I was seeing all the triangles that made up the
height field.  So the question is:  How *do* you make an extruded object that
looks like it was carved out of polished chrome?


Post a reply to this message

From: Christian Froeschlin
Subject: Re: Chrome-like extruded object...
Date: 15 Jun 2008 16:14:53
Message: <4855783d$1@news.povray.org>
this is me wrote:

> over to see what the side surfaces looked like, things wheren't so good - it
> wasn't mirror-like.  I guess I was seeing all the triangles that made up the
> height field. 

The sides should have been reflecting as well. I suppose your
problem is that you'd like to have smooth sides, but, of course,
that is limited by the pixel resolution of the input image. So
you can try to paint the input PNG in higher resolution (and
use the smooth keyword if you didn't already do so), or define
some 2D coordinates for the contour and use a "prism" object
based on a spline instead of the height_field. In the latter
case you get a solid object instead of the contour but that
is easily fixed by diffencing away a slightly smaller copy.


Post a reply to this message

From: Chris B
Subject: Re: Chrome-like extruded object...
Date: 15 Jun 2008 16:29:35
Message: <48557baf$1@news.povray.org>
"this is me" <nomail@nomail> wrote in message 
news:web.48556dd8c23a6d99bae00d80@news.povray.org...
> What would be the best way to achieve the following:
>
> Take your average cookie cutter, for example, and instead of it being made 
> of a
> thin band of metal, assume it's made of something thicker, so now what you 
> have
> is an extruded object with a thick cookie cutter outline.  I figured the 
> best
> way to go about making this in POV was to draw the thing in a drawing 
> program,
> and simply fill the interior with a gray color and the border with white. 
> I
> then saved it as a PNG with a black matte around the whole picture.  In 
> POV, I
> used the PNG in a height field, and set the water level to 10/256 so the 
> black
> matte would be ignored.  So there it was, a pretty good rendered version 
> of
> what I had in mind.  Now here's the kicker.  My goal was to make this 
> thing
> pretty relfective - chrome-like - so I made those changes and rerendered. 
> I
> noticed the front face of the object reflected real nice, but when I 
> rotated it
> over to see what the side surfaces looked like, things wheren't so good - 
> it
> wasn't mirror-like.  I guess I was seeing all the triangles that made up 
> the
> height field.  So the question is:  How *do* you make an extruded object 
> that
> looks like it was carved out of polished chrome?
>

It sounds to me like you're describing the sort of shape that POV-Ray prism 
objects create.

The prism object takes an outline that you can make as sophisticated as you 
like and extrudes it upwards by a specified thickness. I've copied an 
example below that draws a humpback bridge symbol.

This symbol was drawn in 2D using Inkscape, which is an open source scalable 
vector graphics editor. Inkscape can save shapes directly as POV-Ray prism 
objects. It also has a nifty 'Trace Bitmap' function, so if you've got the 
shape in another format with a clearly defined edge, it's easy to convert 
into a vector graphic.

Regards,
Chris B.


camera {location <350,500,200> look_at <350,0, 630>}
light_source {   <0,800 ,-100>, rgb 1}


// HumpbackBridge
prism {
    linear_sweep
    bezier_spline
    100, //top
    0, //bottom
    56, //nr points
    /*   0*/ <421.528910, 558.862183>, <421.528910, 558.862183>, 
<421.799480,525.781453>, <421.799480,525.781453>,
    /*   1*/ <421.799480, 525.781453>, <421.799480, 525.781453>, 
<518.970840,525.781453>, <518.970840,525.781453>,
    /*   2*/ <518.970840, 525.781453>, <518.970840, 525.781453>, 
<519.220840,586.629373>, <519.220840,586.629373>,
    /*   3*/ <519.220840, 586.629373>, <483.231220, 585.909583>, 
<470.296890,590.384053>, <459.500000,596.862183>,
    /*   4*/ <459.500000, 596.862183>, <448.703110, 603.520263>, 
<440.972950,619.005923>, <416.500000,628.723123>,
    /*   5*/ <416.500000, 628.723123>, <407.503730, 632.424843>, 
<394.248040,634.849163>, <384.375000,634.849163>,
    /*   6*/ <384.375000, 634.849163>, <374.502200, 634.849163>, 
<362.213520,632.380853>, <353.781250,629.083023>,
    /*   7*/ <353.781250, 629.083023>, <329.308300, 619.365823>, 
<321.578130,603.520263>, <310.781250,596.862183>,
    /*   8*/ <310.781250, 596.862183>, <299.984360, 590.384053>, 
<285.579210,585.909583>, <249.589580,586.629373>,
    /*   9*/ <249.589580, 586.629373>, <249.589580, 586.629373>, 
<249.599220,525.781453>, <249.599220,525.781453>,
    /*  10*/ <249.599220, 525.781453>, <249.599220, 525.781453>, 
<347.505460,525.781453>, <347.505460,525.781453>,
    /*  11*/ <347.505460, 525.781453>, <347.505460, 525.781453>, 
<347.483980,558.862183>, <347.483980,558.862183>,
    /*  12*/ <347.483980, 558.862183>, <350.104080, 576.560923>, 
<366.965320,590.405153>, <384.750000,590.045263>,
    /*  13*/ <384.750000, 590.045263>, <403.615460, 590.225193>, 
<419.068630,574.942913>, <421.528910,558.862183>
  texture {
    pigment {color rgb <1,1,0>}

    finish {reflection 0.9}
  }
}


Post a reply to this message

From: this is me
Subject: Re: Chrome-like extruded object...
Date: 15 Jun 2008 20:40:00
Message: <web.4855b5bd9f7c31499bae00d80@news.povray.org>
Thanks a lot, Chris, that's exactly what I was looking for.  I originally
thought a prism would be my best bet, but making the outline seemed combersome,
so that's why I tried the height firls approach.  Now that I know about
InkScape, however, getting was I was after should be a snap.

-T.I.M.



"Chris B" <nom### [at] nomailcom> wrote:
> "this is me" <nomail@nomail> wrote in message
> news:web.48556dd8c23a6d99bae00d80@news.povray.org...
> > What would be the best way to achieve the following:
> >
> > Take your average cookie cutter, for example, and instead of it being made
> > of a
> > thin band of metal, assume it's made of something thicker, so now what you
> > have
> > is an extruded object with a thick cookie cutter outline.  I figured the
> > best
> > way to go about making this in POV was to draw the thing in a drawing
> > program,
> > and simply fill the interior with a gray color and the border with white.
> > I
> > then saved it as a PNG with a black matte around the whole picture.  In
> > POV, I
> > used the PNG in a height field, and set the water level to 10/256 so the
> > black
> > matte would be ignored.  So there it was, a pretty good rendered version
> > of
> > what I had in mind.  Now here's the kicker.  My goal was to make this
> > thing
> > pretty relfective - chrome-like - so I made those changes and rerendered.
> > I
> > noticed the front face of the object reflected real nice, but when I
> > rotated it
> > over to see what the side surfaces looked like, things wheren't so good -
> > it
> > wasn't mirror-like.  I guess I was seeing all the triangles that made up
> > the
> > height field.  So the question is:  How *do* you make an extruded object
> > that
> > looks like it was carved out of polished chrome?
> >
>
> It sounds to me like you're describing the sort of shape that POV-Ray prism
> objects create.
>
> The prism object takes an outline that you can make as sophisticated as you
> like and extrudes it upwards by a specified thickness. I've copied an
> example below that draws a humpback bridge symbol.
>
> This symbol was drawn in 2D using Inkscape, which is an open source scalable
> vector graphics editor. Inkscape can save shapes directly as POV-Ray prism
> objects. It also has a nifty 'Trace Bitmap' function, so if you've got the
> shape in another format with a clearly defined edge, it's easy to convert
> into a vector graphic.
>
> Regards,
> Chris B.
>
>
> camera {location <350,500,200> look_at <350,0, 630>}
> light_source {   <0,800 ,-100>, rgb 1}
>
>
> // HumpbackBridge
> prism {
>     linear_sweep
>     bezier_spline
>     100, //top
>     0, //bottom
>     56, //nr points
>     /*   0*/ <421.528910, 558.862183>, <421.528910, 558.862183>,
> <421.799480,525.781453>, <421.799480,525.781453>,
>     /*   1*/ <421.799480, 525.781453>, <421.799480, 525.781453>,
> <518.970840,525.781453>, <518.970840,525.781453>,
>     /*   2*/ <518.970840, 525.781453>, <518.970840, 525.781453>,
> <519.220840,586.629373>, <519.220840,586.629373>,
>     /*   3*/ <519.220840, 586.629373>, <483.231220, 585.909583>,
> <470.296890,590.384053>, <459.500000,596.862183>,
>     /*   4*/ <459.500000, 596.862183>, <448.703110, 603.520263>,
> <440.972950,619.005923>, <416.500000,628.723123>,
>     /*   5*/ <416.500000, 628.723123>, <407.503730, 632.424843>,
> <394.248040,634.849163>, <384.375000,634.849163>,
>     /*   6*/ <384.375000, 634.849163>, <374.502200, 634.849163>,
> <362.213520,632.380853>, <353.781250,629.083023>,
>     /*   7*/ <353.781250, 629.083023>, <329.308300, 619.365823>,
> <321.578130,603.520263>, <310.781250,596.862183>,
>     /*   8*/ <310.781250, 596.862183>, <299.984360, 590.384053>,
> <285.579210,585.909583>, <249.589580,586.629373>,
>     /*   9*/ <249.589580, 586.629373>, <249.589580, 586.629373>,
> <249.599220,525.781453>, <249.599220,525.781453>,
>     /*  10*/ <249.599220, 525.781453>, <249.599220, 525.781453>,
> <347.505460,525.781453>, <347.505460,525.781453>,
>     /*  11*/ <347.505460, 525.781453>, <347.505460, 525.781453>,
> <347.483980,558.862183>, <347.483980,558.862183>,
>     /*  12*/ <347.483980, 558.862183>, <350.104080, 576.560923>,
> <366.965320,590.405153>, <384.750000,590.045263>,
>     /*  13*/ <384.750000, 590.045263>, <403.615460, 590.225193>,
> <419.068630,574.942913>, <421.528910,558.862183>
>   texture {
>     pigment {color rgb <1,1,0>}
>
>     finish {reflection 0.9}
>   }
> }


Post a reply to this message

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