frame->scaleMesh(.004f);
The "sweet spot" depends on whatever t_epsilon is set to. If t_epsilon is set to 1e-10, then I would guess that you would scale from [-1e-5, 1e-5]. If t_epsilon is set to 1e-5, then [-1, 1] would likely be good. The benefit of rescaling the scene versus modifying t_epsilon is that t_epsilon can remain hard coded, which might result in performance improvements. In terms of accuracy, modifying either one is equivalent. I know you asked not to go through the whole ieee 745 thing, but if you want a bit more detail, this has to do with floating point numbers having only a certain number of bits of precision. So for instance, if you are using 32 bit floats, the following: 1+1e-10==1 and 1e10+1==1e10 are actually true. But 1+1e-6==1 and 1e6+1==1e6 are false (as you would expect).
Another option, if playing around with the epsilon value doesn't fix things, is to make manta use doubles instead of floats (ccmake option). This will of course slow down manta, but at least everything is more accurate.
Thiago
Li-Ta Lo wrote:On Tue, 2008-07-08 at 16:14 -0600, Thiago Ize wrote:If performance does end up suffering, the other option is to rescale the scene so it fits inside the "sweet spot". That's what I do in my manta projects.Is the "sweet spot" scale still [-1, 1]? Can someone explain it to me why it is the case without going through the whole ieee 745 thing? Ollie
Archive powered by MHonArc 2.6.16.