POV-Ray : Newsgroups : povray.general : Polygon masking possibility? : Re: Polygon masking possibility? Server Time
31 Jul 2024 18:22:50 EDT (-0400)
  Re: Polygon masking possibility?  
From: Tek
Date: 28 Oct 2006 05:15:24
Message: <45431fac$1@news.povray.org>
Speaking from a technical point of view I don't think it's possible. It's a 
good idea but pov can only check the mask for a polygon after computing a 
ray intersection with that polygon, meaning it's doing exactly the same 
amount of work as just having a high max_trace_level.

-- 
Tek
http://evilsuperbrain.com

"Vaclav Cermak" <dis### [at] disnelcom> wrote in message 
news:4541bed3$1@news.povray.org...
>
> Hello,
>
>   I'am now working on some bitmap based grass, bush etc. I'am trying to 
> place a lot of rectangles with bitmap grass patches on the groud. Bitmaps 
> are partially transparent. The result is, that I have a lot of rectangles 
> on every ray hittng the ground, so I must set very high max_trace_level to 
> render it correctly...
>
> My idea is to create some "masked_polygon", or to add a "mask" into the 
> polygon and use this mask when determing, if some ray hits the polygon. 
> When the ray hits completely transparent part of the polygon, consider it 
> as "no hit" and return hits only with full opaque or semi-transparent 
> parts. Something like
>
> #declare BitmapPig = pigment {
>   image_map {png "something.png"}
> }
>
> polygon {
>   5, <0, 0>, <1, 0>, <1, 1>, <0, 1>, <0, 0>
>   mask {BitmapPig}
>   pigment {BitmapPig}
> }
>
> This will remove the neccesasrity of high max_trace_level and I think, 
> that it can be faster, than shooting new ray from every hitted, but 
> completely transparent part of polygons.
>
> What do you think about this?
>
> Regards
>
> Vaclav
>


Post a reply to this message

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