|
|
If a hollow object is included in a union, the hollow property is
disabled. This apparent bug was introduced in POV-Ray 3.7; the hollow
property is inherited fine in 3.6.
The following scene illustrates the problem. The left side shows the
pole and pennant created separately. The middle shows a union of the
pole and pennant. The right side shows a union of the pole and pennant,
with an additional hollow keyword at the union level.
------------------------[BEGIN CODE]-------------------------
#version max (3.6, min (3.8, version));
//---------------- ENVIRONMENT -------------------
global_settings { assumed_gamma 1 }
#default { finish { diffuse 0.6 ambient <0.07, 0.08, 0.11> } }
background { blue 0.2 }
fog
{ fog_type 2
distance 100000
fog_alt 10000
fog_offset 0
color rgb <0.45, 0.6, 0.9>
}
light_source
{ <0, 1, -1> * 10000, rgb <1.05, 1.00, 0.97>
parallel point_at 0
}
#include "screen.inc"
Set_Camera (<0.65, -0.4, -7>, <0.65, 0.1, 0>, 45)
Screen_Object
( text
{ ttf "cyrvetic" concat ("v", str (version, 0, 2)) 0.001, 0
pigment { rgb 0 }
scale 0.09
},
<0, 1>, <0.02, 0.02>, yes, 1
)
plane { y, -1 pigment { rgb 0.5 } }
//-------------------- TEST ----------------------
#declare p_Pennant = pigment
{ object
{ prism
{ -1, 1, 4, <0, 0>, <0, 1>, <1.5, 0.5>, <0, 0>
rotate -90 * x
}
color rgbt 1 color red 1
}
}
#declare Penant = mesh
{ triangle { <0, 0, 0>, <0, 1, 0>, <1.5, 1, 0> }
triangle { <0, 0, 0>, <1.5, 1, 0>, <1.5, 0, 0> }
pigment { p_Pennant }
hollow
}
#declare Pole = cylinder
{ -y, 1.1 * y, 0.06 translate -0.1 * x
pigment { rgb 0.8 }
}
#declare SPACE = 1.85;
// Separate objects
object { Penant translate -SPACE * x }
object { Pole translate -SPACE * x }
// Union with inherited hollow
union
{ object { Penant }
object { Pole }
}
// Union with redundant hollow
union
{ object { Penant }
object { Pole }
hollow
translate SPACE * x
}
-------------------------[END CODE]--------------------------
POV-Ray 3.8 (not shown) renders the same as 3.7.
Post a reply to this message
Attachments:
Download 'hollow_union-v36.jpg' (17 KB)
Download 'hollow_union-v37.jpg' (19 KB)
Preview of image 'hollow_union-v36.jpg'
Preview of image 'hollow_union-v37.jpg'
|
|
|
|
On 3/28/22 13:43, Cousin Ricky wrote:
> If a hollow object is included in a union, the hollow property is
> disabled. This apparent bug was introduced in POV-Ray 3.7; the hollow
> property is inherited fine in 3.6.
>
> The following scene illustrates the problem. The left side shows the
> pole and pennant created separately. The middle shows a union of the
> pole and pennant. The right side shows a union of the pole and pennant,
> with an additional hollow keyword at the union level.
In years past, I've dug a little into object modifier propagation
differences between v3.6 and v3.7+. IIRC a lot of them come from POV-Ray
(v3.7+) now taking the default modifiers for the union(c) from the last
object of the union rather than the first (a)(b).
Try flipping the order of objects in the union with the inherited hollow
and "I think" you'll get again a v3.6 result with v3.7 onward versions
of POV-Ray.
---
(a) - Whether this v3.6 to v3.7+ change is intentional or not I don't
know. There was a lot of C++ - ification after v3.6 and, it could just
be this happened on the conversion to std::vector.
(b) - A useful bit of confirmation for me, if the order flip works for
v3.7+, would be to know whether the same flip causes v3.6 to return the
the darker blue?
(c) - IIRC the differences in modifier defaulting are not confined to
'union' csg.
---
Overall, the issue has been well down on my 'povr' todo list for a long
while because to me it's not clear what the right thing to do is. Seeing
clearly will take a significant investigation I think.
Questions in your scene start with a mesh using hollow without a well
defined interior. They move on to what's right for hollow with fog.
Fog is an after effect which traces to the first surface it sees after
which it calculates an effective result. Why did/does 'hollow' change
the 'fog' result at all? I'm suggesting the dark blue is the 'correct'
result - and an issue unrelated to the modifier union inheritance changes.
I don't immediately know 'why' we get the fog blue over the dark blue
background. Is it the ordering of triangle vertices so the normal
direction is such that the surface intersection with the mesh 'looks
like' the backside of an object? Something else custom with hollow itself?
I'm rambling about the 'hollow' modifier alone. What about other
modifiers in csg between v3.6 and v3.7+ ? All modifiers would need to be
considered for a complete response.
Bill P.
Post a reply to this message
|
|