POV-Ray : Newsgroups : povray.general : How to make object be transparent with alpha channel in the final image? : Re: How to make object be transparent with alpha channel in the final image= Server Time
31 Jul 2024 06:21:02 EDT (-0400)
  Re: How to make object be transparent with alpha channel in the final image=  
From: Alain
Date: 11 Sep 2007 08:18:29
Message: <46e68795@news.povray.org>
Hor nous apporta ses lumieres en ce 2007/09/11 07:33:
> William Tracy wrote:
> 
>> So it just disappears into the background. (If you render with a
>> different background color, just use the same color as the background,
>> and use ambient 1.) Then, in your image editing program, grab the "magic
>> wand" tool, select the background area, and delete it. (The exact steps
>> vary depending on what software you use.)
>>
>> Basically, instead of rendering to an image with an alpha channel, just
>> cut out the background manually in Photoshop or whatever.
> 
> Yes, thank you. Your suggestion seems to be the best working technique for
> now - turn off any reflection for the object which need to be cleared and
> delete it later in some image editing software. This way will be not
> completely automatic (as I initially wanted), still possible.
> 
> Tim Attwood wrote:
>>>> You can then compose your object layers seperately.
>>> Sorry, I didn't get your idea.
>> If the objects are separate you could render them separately,
>> but I now see from your example that they aren't really
>> separate.  With the overlapping rings which image would
>> be on top?  The way that you envision it either of the rings
>> might be.  In order to cut up your object you will need to
>> resort to further CSG or use clipped_by.
> 
> Thank you very much for explanation and example, although I'm not sure that
> it will work in general case. It would be very complex to split objects and
> calculate clipping planes. I need to process the scene of about dozen
> objects of complex shape to make a set of images with picture of each
> single object only. All objects are not intersected in terms of CSG. It is
> 2D image where their projections are overlapped.
> 
> Actually, the only thing which I needed, is to instruct POV-Ray to replace
> every visible pixel of selected object(s) with alpha-transparent one. And I
> still can not find the way how to do it.
> 
> 
Try this:
- Use an orthografic camera along the z axis
- Make the oculting object(s) stretch in the z direction (scale<1,1,1000>), 
cuting off the parts that pass behind other objects. Removing an appropriately 
placed box could be enough.
- Difference that stretched and cut object from every objects that it ocult.
difference{
	union{ All_Other_Objects }
	object{ Your_Stretched_&_Cut_Oculting_Object }
	}
- Render with +ua as PNG (+fn).
- Repeat for each objects.

Finaly, draw each images one on top of the other over your background.

Is that for some presentation where you need to switch on and off selected parts 
of the image?

-- 
Alain
-------------------------------------------------
   The other day I came home and a guy was jogging, naked. I asked "Why?"  He 
said "Because you came home early."
	Rodney Dangerfield


Post a reply to this message

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