actual implementation of LOD modificatio

MR LEEMON C BAIRD III ([email protected])
Thu, 29 Jun 1995 01:22:10 EDT


[email protected] wrote:
> Separator {
> PerspectiveCamera {
> position 0 0 0
> }
> Scale {
> scaleFactor 0.5 0.5 0.5
> }
> Translation {
> translation 0 0 1
> }
> LOD {
> range [ (values) ]
> center 0 0 0
> (object at differing detail levels, all centered around 0,0,0)
> }
> }
>
> Using the spec, we get a distance of 1 (eye remains at 0,0,0;
object
> center transforms to 0,0,1); using the new method, we also get a
distance
> of 1 (eye transforms to 0,0,1; object center remains at 0,0,0). Or
am I
> misinterpreting you?

I should have given more detail. As transforms accumulate, objects
are transformed by the product of a series of matrices. An improved
LOD would leave the object untransformed, and would transform the eye
with the product of the *inverses* of those matrices, applied in the
*reverse* order. So in the example above, the old method first
transforms the object with the "translation 0 0 1", then transforms
it with the "scaleFactor .5 .5 .5". In the new method, the eye would
first be transformed with a "scaleFactor 2 2 2", then with a
"translation 0 0 -1". So for this example, the new method would give
a distance of 1 (first multiply the eye by 2 leaving it at 0,0,0,
then shift it to 0,0,-1) and the old method would give a distance of .
5 (first move the object center to 0,0,1, then shrink it to 0 0 .5).
As desired, the new method looks like it's twice as far away.

For this sort of transform, the inverse is cheap to calculate. For a
general MatrixTransform it can be more computationally intensive, but
the inverse only needs to be calculated once, when the file is p so it wouldn't be too burdensome. It would also require that an
additional matrix be stored for each MatrixTransform node, but not
for the simpler transforms such as translation and scaleFactor. As
with other operations, the browser would be free to do whatever it
thinks is reasonable when it finds a singular matrix (or we could say
that such matrices should be ignored when calculating LOD). The
fractal VRML p (http://kirk.usafa.af.mil/~baird/vrml) contains
some Mathematica source files that show how to do VRML matrix
calculations (for the current system, not the new one).

Leemon Baird
[email protected]
http://kirk.usafa.af.mil/~baird