clipping bug in Celestia v1.3.1-1
This Addon demonstrates a clipping bug in Celestia v1.3.1-1
It's available at http://www.lns.cornell.edu/~seb/celestia/cube-clipping-bug.zip (130KB)
When the cube "4x2-cube" is put in orbit around the Earth
(i.e. when it's specified as a body in an SSC catalog)
and viewed from inside,
the cube can't be seen if the viewing angle is "too small"
because Celestia clips a large portion of the object
from in front of the observer.
This minimum viewing angle seems to be different on different
systems. On one system, it's about 45 degrees. On another,
it's much less, maybe about 10.
This bug is illustrated in the image below:
In the left half, the cube is seen from the outside.
Its surface normal vectors point inward, so you see
its surface images as if you are looking through
the sides of the cube which are closest to you.
In the right half, the cube is seen from the inside.
The viewing angle has been expanded to show the gaping
hole in the cube.
This cube was constructed by Grant Hutchison.
Note: this clipping problem is not seen if the 3DS model
is used as a "Deep Space Nebula."
System with large hole (~45 degrees):
512MB 2.4GHz P4, WinXP Pro sp1
128MB FX 5200, Nvidia drivers v45.23
System with small hole (~5 degrees)
256MB 500MHz P3, WinXP Pro sp1
128MB Ti4200, Nvidia drivers v44.03
Celestia v1.3.1-1: visual clipping bug
Howdy Selden,
When I change the Radius value for i4x2-Cube to somthing a bit larger than 0.001, it seems to work fine. The 4x2-cube has a Radius of 100 and this works fine for i4x2-Cube also. It even works down to 10 or so.
Why the extremely small Radius?
-Don G.
When I change the Radius value for i4x2-Cube to somthing a bit larger than 0.001, it seems to work fine. The 4x2-cube has a Radius of 100 and this works fine for i4x2-Cube also. It even works down to 10 or so.
Code: Select all
"i4x2-Cube" "Sol/Earth"
{
Mesh "empty.3ds"
# Radius 0.001
Radius 100
EllipticalOrbit
{
Period 1e12
SemiMajorAxis 100000
}
}
Why the extremely small Radius?
-Don G.
-
Topic authorselden
- Developer
- Posts: 10192
- Joined: 04.09.2002
- With us: 22 years 2 months
- Location: NY, USA
Don,
If you think that's small, you should see the one Grant specified! (1e-12) That creates its own set of problems, though: the mouse stops working.
The radius of the central object (the viewpoint) needs to be significantly less than 1% of the diameter of the enclosing cube. When the observer revolves around the viewpoint, the distance to any point on the surface of the cube must not change noticably. Otherwise you're likely to see distortions in perspective, especially in the cube's corners and edges.
This is a step toward making it easy for people to provide cubical panoramas within Celestia, like those that can be generated by Terragen. The rather agressive clipping makes this difficult.
If you think that's small, you should see the one Grant specified! (1e-12) That creates its own set of problems, though: the mouse stops working.
The radius of the central object (the viewpoint) needs to be significantly less than 1% of the diameter of the enclosing cube. When the observer revolves around the viewpoint, the distance to any point on the surface of the cube must not change noticably. Otherwise you're likely to see distortions in perspective, especially in the cube's corners and edges.
This is a step toward making it easy for people to provide cubical panoramas within Celestia, like those that can be generated by Terragen. The rather agressive clipping makes this difficult.
Selden
I think this is a Bounding Box problem.I'm not sure how Celestia deals with models but I have noticed this before with other models I have made,where they are not symmetrical or they have structures which protrude outside of the box (sphere ?) Celestia allows for them.I've fixed it for your model Selden as I have for many other models I've made by adding a couple of other very very tiny objects either side of your cube-this increases the bounding box allowed for it ,and it works fine in this case.Maybe it is possible to do it with one extra object in the right place,I dont know I didnt try,cheers Jestr
selden wrote:The radius of the central object (the viewpoint) needs to be significantly less than 1% of the diameter of the enclosing cube. When the observer revolves around the viewpoint, the distance to any point on the surface of the cube must not change noticably. Otherwise you're likely to see distortions in perspective, especially in the cube's corners and edges.
Hi Selden,
The reason I mentioned the Radius is because when 0.001 is used, watch the text display of Distance. When it reaches exactly 100.05 km (using the Go To Object dialog box) a "viewport" to the outside starts to open up, straight ahead. If you right-click drag, the viewport changes it's orientation.
To me, these numbers seem quite coincidental. That a Radius of 0.001 and a Distance of 100.0 km produces problems? That's a direct factor value.
Maybe this will help someone to pinpoint the bug?
-Don G.
PS. Glad you have a work-around!
-
- Developer
- Posts: 1863
- Joined: 21.11.2002
- With us: 22 years
Not for me, neither with an invisible object or with my old empty.3ds model. Amother puzzle.selden wrote:If you think that's small, you should see the one Grant specified! (1e-12) That creates its own set of problems, though: the mouse stops working.
I'm sure Jestr's right - the maximum radius of the cube is so much longer than the maximum semiaxis that the corners are being clipped. I was just in the process of standing the cube on its corner to force the bounding box bigger, but Jestr's solution will make for easier orientation at the end of the day.
Grant
-
Topic authorselden
- Developer
- Posts: 10192
- Joined: 04.09.2002
- With us: 22 years 2 months
- Location: NY, USA
Don,
I'd suggest a very bref entry with a link to this topic. Maybe something like
The bounding box for rendering an object is too small. See http://63.224.48.65/forum/viewtopic.php?t=4120
I'd suggest a very bref entry with a link to this topic. Maybe something like
The bounding box for rendering an object is too small. See http://63.224.48.65/forum/viewtopic.php?t=4120
Selden