How to handle very large and very small objects in a scene?

There is a class I want to use: vtkEarthSource, put on top of a crude texture map of the earth … and I want to also show something like a satellite, where the earth is realistically sized (for the horizon) and the satellite is the focus of the view. Is that a bad idea? Is there a better way than just drawing what is there in the scene and depending on the graphics hardware to do the right thing?

The satellite will just have to be near the origin of whichever coordinate systems you use. This is necessary because, at the scale of the earth (>10000km diameter), single-precision floats only give a resolution of about one meter on average. But the available resolution increases the closer you get to zero. Depth buffers also are higher resolution close to the camera and lower resolution as the distance from the camera increases.

As long as the satellite is close to the origin & to the camera, the relatively large size of the earth shouldn’t be a problem (though I advise to precompute the normals, VTK 9.3 had trouble computing normals of large objects on the GPU).

1 Like