Open wfpokorny opened 7 years ago
Is this a 3.7.1-specific issue, or is this also seen with 3.7.0 or even 3.6?
This is not a 3.7.1 specific issue. I have in my head I ran tests back to 3.6, but let me see if I can find my testing directory... Well I didn't find results laying around, but, re-tested and confirmed the issue is seen in 3.6 too.
The following example, originally from Sean Day, works as expect using -ur but not with the default +ur though the specified bounded_by box meets the "better bounding" tests in parse.cpp. At the core the +ur mode is not making downstream transform adjustments that consider the bbox leading to confusing and inconsistent behavior.
The core of it looks to be that Parser::Link_To_Frame strips user bounding for everything but CSGUnions, CSGIntersections, CSGMerges, Polys, TrueTypes and Quadrics and so the bounded_by object originally determined as "better" in Parser::Parse_Object_Mods gets stripped and is not available in downstream transforms.
From the user's perspective they have a bounded_by set up that works for an object, later they use this object as some other position and the bounding no longer works. Mostly - if the original objects bounding mechanism creates bounds enclosing the object - this won't be "seen." It will still degrade any performance improvements coming from better user bounding.
There are secondary issue to with the "better" bounded_by determination in that bad bounding can not reliably be fixed by user bounding because it won't always be determined "better."
Basically users cannot count on the bounding they specify.
My leaning presently is to make the user bounding mechanism deterministic. Meaning +ur would strip all user bounding early in the parsing - we not use user bounding anywhere. When running with -ur, we'd use all user bounding exactly as specified. Such a set up would cleanly "fix" the issue discussed above. Yes, some old scenes would break. Especially where users were not getting the bounding they specified previously.
Related: The bounded_by and clipped_by mechanism today allows for >1 object to be used which I did not know until digging into the code. This opens the door to much more complex bounding of objects by sets of bboxes perhaps themselves in some data structure efficiently searched.