Celestia v1.3.1-1: visual clipping bug

Report bugs, bug fixes and workarounds here.
Avatar
Topic author
selden
Developer
Posts: 10192
Joined: 04.09.2002
With us: 22 years 2 months
Location: NY, USA

Celestia v1.3.1-1: visual clipping bug

Post #1by selden » 06.01.2004, 22:42

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:
Image

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
Selden

don
Posts: 1709
Joined: 12.07.2003
With us: 21 years 4 months
Location: Colorado, USA (7000 ft)

Post #2by don » 07.01.2004, 03:00

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.

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.

Avatar
Topic author
selden
Developer
Posts: 10192
Joined: 04.09.2002
With us: 22 years 2 months
Location: NY, USA

Post #3by selden » 07.01.2004, 03:37

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.
Selden

jestr
Posts: 612
Joined: 14.09.2003
With us: 21 years 2 months
Location: Bridgwater,UK

Post #4by jestr » 07.01.2004, 04:40

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

Avatar
Topic author
selden
Developer
Posts: 10192
Joined: 04.09.2002
With us: 22 years 2 months
Location: NY, USA

Post #5by selden » 07.01.2004, 04:57

jestr,

Thanks for the workaround!
Selden

don
Posts: 1709
Joined: 12.07.2003
With us: 21 years 4 months
Location: Colorado, USA (7000 ft)

Post #6by don » 07.01.2004, 06:11

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!

don
Posts: 1709
Joined: 12.07.2003
With us: 21 years 4 months
Location: Colorado, USA (7000 ft)

Post #7by don » 07.01.2004, 06:15

Hey Selden,

Should this be added to the Bug Tracker on Source Forge? If so, how would you describe it? Should I use your initial message?

Thanks!

-Don G.

granthutchison
Developer
Posts: 1863
Joined: 21.11.2002
With us: 22 years

Post #8by granthutchison » 07.01.2004, 11:20

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.
Not for me, neither with an invisible object or with my old empty.3ds model. Amother puzzle.
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

Avatar
Topic author
selden
Developer
Posts: 10192
Joined: 04.09.2002
With us: 22 years 2 months
Location: NY, USA

Post #9by selden » 07.01.2004, 12:08

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
Selden

don
Posts: 1709
Joined: 12.07.2003
With us: 21 years 4 months
Location: Colorado, USA (7000 ft)

Post #10by don » 07.01.2004, 19:08

Thank you Selden. As soon as they are back on-line I'll add it.

-Don G.

chris
Site Admin
Posts: 4211
Joined: 28.01.2002
With us: 22 years 9 months
Location: Seattle, Washington, USA

Post #11by chris » 07.01.2004, 21:59

I think that the problem may be that Celestia uses the largest bounding box axis as the radius of the bounding sphere. It should instead use the distance between the center and a corner of the bounding box. If this turns out to be the problem, it's an easy fix . . .

--Chris

Avatar
Topic author
selden
Developer
Posts: 10192
Joined: 04.09.2002
With us: 22 years 2 months
Location: NY, USA

Post #12by selden » 08.01.2004, 01:07

Chris,

Thanks! That's be great!
Selden


Return to “Bugs”