POV-Ray : Newsgroups : povray.newusers : image_map > solid object : Re: image_map > solid object Server Time
25 Apr 2024 17:50:17 EDT (-0400)
  Re: image_map > solid object  
From: Stephen
Date: 3 May 2016 09:41:14
Message: <5728aa7a@news.povray.org>
On 5/3/2016 1:57 PM, clipka wrote:
> Am 03.05.2016 um 13:54 schrieb Paul:
>
>> The result image looks like 2 very thin sheets, just surfaces (left side, see
>> attachment below).
>> I need a solid object, the 2 surfaces joined - the transparent yellow things on
>> the right side.
>> Of course, the "joining" part should be same color (green, red) and not
>> transparent - that is just for demonstration purposes.
>
> That's not an easy thing to do.

This is true.


>
> Alternatively you can use CSG, but that'll require a bit of puzzling how
> to best achieve the desired shape with intersections, differences and
> unions, and it may also render slower. On the other hand, if the curved
> sections are supposed to be circular arcs, it'll be more exact than what
> you can achieve with splines (they can't give you exact circles).
>


I would use CSG. The way I would try it is to use heightfields.
Fortunately you have only two colours. So separate your image into green 
and red images. Change the white to black and get rid of the 
transparency. Then reduce the colour depth to two colours, black and white.

Create a merge of a heightfield and one of the images. That should give 
you one of the shapes. Do the same with the other image.
You can use the water level in the heightfield to remove the base.
You will end up with two objects that are open. To close them place a 
scaled copy (very small in one dimension to make it thin) of the merge 
as an end cap.

It may sound complicated but once you have got the idea. It is quite simple.


-- 

Regards
     Stephen


Post a reply to this message

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