

> It's been almost 40 years, so I don't remember why, but I seem to recall
> learning in university that inverse transformations take a heavy toll on
> numeric precision.
Well, based on my tests, this seems to be the case.
When I inversetransform the test point, do a minimum distance vector to the
original mesh data, then transform that direction vector back to take the
length, the result is slightly off from the version where I keep a parallel
version of the mesh data around that I recalculate by transforming all the
vertices whenever the mesh's Trans changes.
The difference seems small, but the difference in result is stark when you
actually run the ray tracer. The version when I inversetransform the test
point, then transform the result vector has all kinds of ugly holes. The version
where I carry around a transformed version of the mesh data looks a lot better,
but still has some small artefacts that aren't there using my old raysampling
method (although it is quite a bit faster). I think those remaining artefacts
might be due to simple precision issues, and I think I may be able to mitigate
them by introducing a "zero" factor that is a bit larger than zero (like 1e11
or maybe a bit larger than that even) that I use in the calculation.
Post a reply to this message

