POV-Ray : Newsgroups : povray.general : Image Extrusion Question Server Time
3 Aug 2024 18:18:08 EDT (-0400)
  Image Extrusion Question (Message 1 to 3 of 3)  
From: Kronix
Subject: Image Extrusion Question
Date: 29 Oct 2003 00:45:01
Message: <web.3f9f529736b6a6bb3c1dcda40@news.povray.org>
Easier question:

I have a black and white image, say for instance, a white circle on a black
background.  Is there a simple way to create an object by extruding the
white circle (lying in, say, the xy plane) some distance along the z-axis?
This would, of course, create a cylinder along the z-axis.  In other words,
how can I extrude portions of a b&w imagemap?

Harder question:

Say I change my 2-bit imagemap into a 16-bit grayscale imagemap.  Can I now
extrude my image in the z-direction... only associate a transparency with
each pixel value?  Black might be completely transparent, while white would
be totally opaque, etc.

Something tells me this should be simple, what with all the nifty patterns
and functions... but my little mind can't seem to get it to work right.
Heightfields don't quite do it for me (at least in the second case) since I
need the entire image to be extruded to the same height, varying only
transparency.  Stacking a myriad of images on top of each other started out
as a Good Idea (tm), until I ran into problems with max_trace_level (which
should have been obvious at the start).

Any ideas?


Post a reply to this message

From: Christopher James Huff
Subject: Re: Image Extrusion Question
Date: 29 Oct 2003 00:59:40
Message: <cjameshuff-FDB4E2.00574429102003@netplex.aussie.org>
In article <web.3f9f529736b6a6bb3c1dcda40@news.povray.org>,
 "Kronix" <kro### [at] hotmailcom> wrote:

> I have a black and white image, say for instance, a white circle on a black
> background.  Is there a simple way to create an object by extruding the
> white circle (lying in, say, the xy plane) some distance along the z-axis?
> This would, of course, create a cylinder along the z-axis.  In other words,
> how can I extrude portions of a b&w imagemap?

A start would be a height field. This is far from ideal, however...the 
sides of the cone will be vertical surfaces of the height field, and 
there will be severe tessellation artifacts. Alternatively, you could 
use the image as input as the function for an isosurface...use the image 
in an image_pattern image function, and use interpolation. (Isosurfaces 
don't handle the infinite gradients between non-interpolated pixels very 
well.)


> Say I change my 2-bit imagemap into a 16-bit grayscale imagemap.  Can I now
> extrude my image in the z-direction... only associate a transparency with
> each pixel value?  Black might be completely transparent, while white would
> be totally opaque, etc.

I think what you're really looking for here can be had by using the 
image_map as the density for scattering media in a box.

-- 
Christopher James Huff <cja### [at] earthlinknet>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: chr### [at] tagpovrayorg
http://tag.povray.org/


Post a reply to this message

From: ingo
Subject: Re: Image Extrusion Question
Date: 29 Oct 2003 02:25:19
Message: <Xns942355AC23003seed7@netplex.aussie.org>
in news:web.3f9f529736b6a6bb3c1dcda40@news.povray.org Kronix wrote:

> I have a black and white image, say for instance, a white circle on a
> black background.  Is there a simple way to create an object by
> extruding the white circle (lying in, say, the xy plane) some
> distance along the z-axis? 

Beside the options Chris already gave you, you could open your image in 
The Gimp, use select by color to create a path, convert the path to 
something POV-Ray understands and use it in a prism. See:
http://members.home.nl/seedseven/#gimpov

Ingo


Post a reply to this message

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