POV-Ray : Newsgroups : povray.general : weird effect or normal : Re: weird effect or normal Server Time
14 Apr 2024 14:31:00 EDT (-0400)
  Re: weird effect or normal  
From: Alain Martel
Date: 15 Mar 2024 18:17:48
Message: <65f4c90c$1@news.povray.org>
Le 2024-03-15 à 17:00, David Kraics a écrit :
> So I finished the Alaska building and am now working on the tallest building in
> Hawaii. I made a glass texture for windows.
> 
> #declare My_glass_bluish = color rgbf <0.5, 0.5, 1.0, 0.8>;
> 
> My question isn't about the texture. It's fine.
> 
>   I placed two boxes next to each other. One was an opaque grey color that went
> from z= -.886 to z= .866. The second block, which had the glass texture, went
> from Z= .866 to Z= .867. After unionizing them, I turned them around, 180
> degrees, on the Y axis. Behind them both, I had a box with a floor plan
> superimposed on it.
> 
> When I viewed the image, I was able to see completely through the two boxes to
> see the one with the floorplan. I then moved the second box from .866-.867 to
> ..867-.868. Basically moving it away on the Z axis by .001, so they no longer
> touched.
> 
> When viewed, I could no longer see through the two boxes.
> 
> My question is, is this normal? Does the box, with the transparency, replace the
> texture/pigment of the opaque box, at the location they touch?
> 
> In the past, whenever I want to make a window in an object, I used to difference
> out the window hole first, before placing a transparent object there. Could it
> be that I didn't have to do that, all along?
> 
> And yes, I work with tiny objects. The scale I use is 1 unit = 200 feet. That
> way, all my buildings are to scale, and will fit next to each other on my final
> city project.
> 
When two or more objects have a surface in the same location, you have 
coincident surfaces. When rendering, it's impossible to know witch one 
will be encountered first, and the other being ignored. That usually 
result in lot of noise as the «first» can change from pixel to pixel. 
Here, you got lucky and POV-Ray only hit the transparent object first. 
It could have been totally opaque, or a noisy mixture.

That's not an issue if all the objects are opaque and share the same 
texture as whatever the «first» one don't mater.
It's also often not an issue with transparent objects that have the same 
texture AND interior, but, in those case, you should use merge instead 
of union.

By moving one of the objects like you did, the surfaces are no longer 
coincident. So, if the opaque surface is in the front, you see only that 
object. If the transparent one is in front, then, you see the opaque one 
thru the transparent one.

So, punching the holes to contain the windows is the correct way.
It's better, performance wise, to use an union of smaller boxes rather 
than a large box with the holes made using a difference. Especially when 
you have many windows in that wall.


Post a reply to this message

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