POV-Ray : Newsgroups : povray.bugreports : Union disables hollowness Server Time
28 Mar 2024 05:32:54 EDT (-0400)
  Union disables hollowness (Message 1 to 7 of 7)  
From: Cousin Ricky
Subject: Union disables hollowness
Date: 28 Mar 2022 13:43:10
Message: <6241f3ae$1@news.povray.org>
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'
hollow_union-v36.jpg

Preview of image 'hollow_union-v37.jpg'
hollow_union-v37.jpg


 

From: Cousin Ricky
Subject: Re: Union disables hollowness
Date: 28 Mar 2022 13:52:47
Message: <6241f5ef$1@news.povray.org>
On 2022-03-28 13:43 (-4), 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.  [snip]

I forgot to say, this scene has a dark blue background with a light blue
ground fog.  The pennants are rectangular objects with a transparent
pigment for the non-triangular parts.  The bug manifests as the dark
background showing through the transparent parts of the pennant.


Post a reply to this message

From: Cousin Ricky
Subject: Re: Union disables hollowness (issue #307)
Date: 28 Mar 2022 14:33:10
Message: <6241ff66@news.povray.org>
On 2022-03-28 13:43 (-4), 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.

Never mind.  I did some further testing, and discovered that this is the
same bug as GitHub issue #307.


Post a reply to this message

From: Thomas de Groot
Subject: Re: Union disables hollowness (issue #307)
Date: 29 Mar 2022 02:13:37
Message: <6242a391$1@news.povray.org>
Op 28/03/2022 om 20:33 schreef Cousin Ricky:
> On 2022-03-28 13:43 (-4), 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.
> 
> Never mind.  I did some further testing, and discovered that this is the
> same bug as GitHub issue #307.


Wasn't this the problem with fog{} ?

-- 
Thomas


Post a reply to this message

From: William F Pokorny
Subject: Re: Union disables hollowness
Date: 30 Mar 2022 02:23:05
Message: <6243f749$1@news.povray.org>
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

From: Cousin Ricky
Subject: Re: Union disables hollowness (issue #307)
Date: 30 Mar 2022 12:27:28
Message: <624484f0$1@news.povray.org>
On 2022-03-29 02:13 (-4), Thomas de Groot wrote:
> Op 28/03/2022 om 20:33 schreef Cousin Ricky:
>> Never mind.  I did some further testing, and discovered that this is the
>> same bug as GitHub issue #307.
> 
> 
> Wasn't this the problem with fog{} ?

No, the problem wasn't fog{}; it was an inappropriate override of
'hollow', which killed the media, or in this most recent case, fog.

https://news.povray.org/povray.binaries.scene-files/thread/%3C596094bf%241%40news.povray.org%3E/


Post a reply to this message

From: Cousin Ricky
Subject: Re: Union disables hollowness
Date: 30 Mar 2022 12:31:30
Message: <624485e2$1@news.povray.org>
On 2022-03-30 02:23 (-4), William F Pokorny wrote:
> 
> 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.

Yes, it wasn't until after my initial post that I suspected this was the
same as issue #307.  Reversing the order confirmed that it is the same
bug.  In fact, I was the one who discovered it back in 2017, although it
was Christoph who figured out the nature of the bug.

> 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.

It's still in triage on GitHub.


Post a reply to this message

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