Curtis L. Olson wrote:
> I haven't been following this thread as closely as I should have been,
> but there should be no reason why we'd need to have the camera in the
> scene graph. I think we just need to be smarter about how we
> structure the transforms.
That was my original suggestion: put the camera origin at the
viewpoint, and insert one ssgTransform node on top of the terrain that
moves it to the tile centroid, and another above the model that moves
it to the model origin.
The camera business came up because I suggested that this sort of
mistake is very easy to make with the camera living outside of the
scene graph. The proof: Jim (no slouch as a 3D programmer) didn't
realize that the bug still applied in cockpit mode, even though the
model was in its own scene graph. The fact that the camera lives
separately from the graph is, IMHO, a mistake. But it's tangential to
the bug.
> There's nothing magical about having multiple scene graphs vs. one
> scene graph, in the end you still get basically the same set of
> opengl primitives.
True, but the more special rules there are (e.g. cameras aren't the
same thing as ssgTransform nodes), the less obvious the set of OpenGL
primitives that will be generated is. No one would ever think to do
the following in OpenGL:
Move +1000m
Draw the Terrain (>~100m from the viewpoint)
Move -1000m
Draw the Cockpit (>~0.1m from the viewpoint)
But that's exactly what happened to us. It happened because the two
"move" lines are not implemented the same way -- the first happens in
ssgSetCamera, the second is an ssgTransform node at the top of the
model scene graph. The right solution (ignoring orientation, which is
fine as-is) is this:
Move 0m in the camera
Move +1000m
Draw the terrain
Move ~1m to the aircraft origin
Draw the cockpit
Andy
--
Andrew J. Ross NextBus Information Systems
Senior Software Engineer Emeryville, CA
[EMAIL PROTECTED] http://www.nextbus.com
"Men go crazy in conflagrations. They only get better one by one."
- Sting (misquoted)
_______________________________________________
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel