The Persistence of Vision Raytracer (POV-Ray).
This is the legacy Bug Tracking System for the POV-Ray project. Bugs listed here are being migrated to our github issue tracker. Please refer to that for new reports or updates to existing ones on this system.
Attached to Project: POV-Ray
Opened by Christoph Lipka - 2010-12-18
Last edited by William F Pokorny - 2017-01-21
Opened by Christoph Lipka - 2010-12-18
Last edited by William F Pokorny - 2017-01-21
FS#183 - cutaway_textures broken with child unions
When using cutaway_textures in a CSG object that has union children, results are not as expected; instead, surfaces in the union children that have no explicit texture will be rendered with the default texture instead. This is not the case for e.g. difference children.
Example:
#default { texture { pigment { rgb 1 } } } camera { right x*image_width/image_height location <0,1.5,-4> look_at <0,1,0> } light_source { <500,500,-500> color rgb 1 } #declare U = union { sphere { <0,-0.1,-1>, 0.3 } sphere { <0, 0.1,-1>, 0.3 pigment { color red 1 } } } intersection { sphere { <0,0,0>, 1 pigment { color green 1 } } object { U } cutaway_textures rotate y*90 }
When declaring U as an intersection instead, the results are as expected, with the surface of the first sphere in U being rendered with the texture defined in the outer intersection.
I have taken a first attempt at looking at (and building) the source. So far what I have found is that it seems the default texture has been applied to the union object without a texture. When the final texture is evaluated, the texture is non-null and so treats that as an applied texture. The object gets this texture when line 9383 of parse.cpp (beta 41) is executed. I tried changing the logic around this statement from an OR to an AND and my test rendering came out correct (though this could easily not be the correct solution.)
Cheers,
Mike
A solution actually exists already, but backward compatibility issues are still to be solved, so it won't be implemented in 3.7.0.
Thanks Christoph. :)
Does this solution exist anywhere I can get a hold of it? I very much appreciate the efforts you have put in.
Actually, this is no longer a pressing issue for me as my parts are rendering correctly with my change.
Thanks again,
Mike
Testing again (3.7RC3)
* intersection gives a yellow surface (green+red) with cutaway_textures (I find it strange)
* union gives a white surface (which is not the color of first item in intersection, so cutaway is useless)
* difference gives a green surface (which is ok)
Adding an explicit pigment at the intersection (instead of the first member):
* union gives a green surface (kind of ok)
* intersection too (ok also)
* difference is ok too.
Did I mention already that, although a solution does exist, it's not bound for 3.70? Consequently it's no surprise that 3.7RC3 still gives unexpected results
Now tracked on gitub as issue #207.