>
> It would be better to convert the examples to LOD, but that's only
> possible if LOD is changed so that scaling an LOD node affects the
> distance at which the detail switches. Will that happen soon for
> WebSpace? Does anyone know if LOD will work that way in WorldView?
> I don't think the spec is clear on the issue, but it seems preferable
> for LOD to work that way.
>
I think any change to the existing spec on LOD (which I think is quite
clear) should go into 1.1, whenever that eventuates. For the sake of
strict compliance, and also because it modifies its behavior significantly
(the LOD ranges would refer to distances from the object in an
untransformed state, i> entially, not to the object with any ps"
transformations applied as they currently do, so they could change
considerably). IMO the new version is a lot more intuitive, and it makes
more ense, but its different.
I had a think about the exact changes to the LOD node. Es entially all we
need to do is modify the behavior of the range field to take into account
the current transformation, right? How were you thinking of actually
implementing this?
Looking back at one of your ps"
posts, you suggested that one way
was to transform the eye instead of the center. Take this case:
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?
Possibly only scales should affect the LOD ranges (is this what you
originally meant?). In that case, how do you handle non-uniform scales?
[ramble mode on]
I was considering an alternative way of modifying the distance. Perhaps we
[ramble mode off]
This might work well enough to use generally. All the maths is an
should transform the object, calculate the distance as in the current
spec, and then multiply by a factor based on the determinant of the 3x3
matrix representing the linear portion of the current transformation?
Specifically, I was thinking the 2/3 power of the determinant, but my
matrix maths gets shaky here. What that would do would base the scale
factor (approximately) on the area scale factor of the object : i.e. if
the object is scaled by .5, then its effective
think) the determinant of the 3x3 matrix. I think the nece>
extension of what I (vaguely) remember about the properties of 2x2
matrices, so take with a large grain of salt!
--
Oliver Jowett Student, programmer-at-large,
[email protected] and generally nice guy.. ;-)
--------Time flies like an arrow. Fruit flies like a banana.-------