![]() |
#1 |
Senior Member
Professional user
Join Date: Jun 2006
Posts: 102
|
![]()
Yesterday night I was drawing a 3D phillips screwdriver, so just for the fun of it - only in this forum I could admit such a weakness without looking too much of a moron.
Well, the quickest, cleanest way to do the job was to byte four right-angle chunks off a basic cylindroconical shape - that's to say, boolean subtract. My past experiences with AC3D's booleans weren't really amazing, so I tried without much enthusiasm. And punctually the outcome was a disaster: plenty of missing surfaces, the sinister cyan glow of illegitimate ones, the weird red contour of distorted ones... not very encouraging indeed. Then a tiny light bulb popped alight somewhere in my skull: my model was tiny, the 0.0125 units/inch suited for an actual-size DAZ prop. Now what if... no sooner thought than done, I clicked 8 times the 200% button and tried again. This time the outcome was impeccable. Curious, I began challenging the booleans with increasingly difficult provocations - all of them 256 times as large as usual - and each time the results were flawless. As a physicist I don't believe in miracles (other than when my mother-in-law occasionally shuts up, but that's another story), so I started looking for an explanation in order not to have my sleep haunted by ghost booleans. And a plausible reason eventually surfaced: the floating point arithmetic has its limits: we just cannot squeeze infinite real numbers into the finite range a computer can handle, no matter how we represent them. Or, to be more precise, we can do that, but not without losing some small change en route. Now, if you're wealthy enough you can afford that much without even noticing the loss, but if you're a beggar small change may be all you have in your pocket. And my original tiny model was definitely a beggar. I'll stick to this hypothesis until someone comes up with a better one. And in the meantime, every time I'll have to use a boolean, I'll enlarge my model some 256 times first, boole it, and then shrink it back to the original size. Apparently it works fine. And should someone better skilled than I find a discrete procedure to do the same without so much fuss, I'll be happy to buy her a bottle of champagne (if she's a she) or him one of whisky (if he's a he) ![]() Last edited by coldby; 7th November 2012 at 07:10 AM. |
![]() |
![]() |
![]() |
#2 |
Senior Member
Professional user
Join Date: Dec 2003
Location: UK
Posts: 369
|
![]()
A very interesting discovery.
I built a complex structure and a set of three oval tubes to use for cutting. At 0.1 m scale it left a large number of anomalies At 256% scale, it left a smaller number of anomalies Increasing scale another 256% resulted in no anomalies. So what happened if I scaled it to 1%, AC3D crashed. You may well be on to something. A flaw or overflow of the maths. Would be interesting to hear what Andy has to say about this. Booleans have always been a bit hit and miss.
__________________
Regards, Gerry "Mossie" Mos -------------------------------------------------------------------------- WW1 Aircraft Library http://ww1-aircraft.info/ Mossie 3D CAD, "Prompt and Precise" http://mossie3dcad.com/ |
![]() |
![]() |
![]() |
#3 |
Senior Member
Professional user
Join Date: Jun 2003
Location: Greensboro NC, USA
Posts: 337
|
![]()
I haven't used a 3D program that booleans were not messy. Andy did suggest scaling up your model for booleans (but he didn't mention any pertentages) in a post a few years back. So, yes it does work, and Andy is aware of it. I would still like more of an explanation. Andy??????????
|
![]() |
![]() |
![]() |
#4 |
Administrator
Professional user
Join Date: Jun 2003
Posts: 4,542
|
![]()
Coldby got it spot on - it's down to the number precision. AC3D is used over such a wide range i.e. some people are creating entire lifesize oil-rigs, some people creating models that are fractions of a mm in size. The boolean functions works best in the middle somewhere
![]() |
![]() |
![]() |
![]() |
#5 |
Senior Member
Professional user
Join Date: Jun 2003
Location: Greensboro NC, USA
Posts: 337
|
![]()
Well, there you go then. Ask and ye shall receive.
Thanks Andy |
![]() |
![]() |
![]() |
#6 |
Member
Advanced member
Join Date: Jul 2010
Posts: 43
|
![]()
Interesting discovery, thanks!
|
![]() |
![]() |
![]() |
#7 |
Junior Member
Member
Join Date: Aug 2013
Location: London UK
Posts: 22
|
![]()
Resolution is also a problem for large models that are a long way from the origin (eg a metre sized object constructed 10 km away from origin). The resolution is spending most of its bits in defining the kilometres and less on the resolution of the model. Here move the object to (000) and perform actions, then if really needed move back to its 'true' position.
Most games and simulators provide a double precision matrix to position an object; then single precision facets are accurately placed relative to each other as they are all near the origin (000). |
![]() |
![]() |
![]() |
Thread Tools | |
Display Modes | |
|
|