Smooth high precision orbits patch
-
Topic authorchris
- Site Admin
- Posts: 4211
- Joined: 28.01.2002
- With us: 22 years 9 months
- Location: Seattle, Washington, USA
Smooth high precision orbits patch
Tired of sharp angles in your orbit paths? Then try this patch:
http://www.celestiaproject.net/~claurel/celest ... othorbits/
To use it, you need to have the latest version of the source from CVS. Then, replace your versions of render.h and render.cpp with the ones in the patch directory.
The high precision orbits patch is included with this one. I'm interested in performance and bug reports. The smoothing is adaptive, applied only to segments of the orbit near the camera. The distance at which smoothing gets applied may need some tuning. Lastly, in this test patch, the smoothing may be toggled on and off by pressing Ctrl+E (eclipse shadows--it's just temporary) The improvement can be quite profound (examples are with orbit segments set to 100 in celestia.cfg):
--Chris
http://www.celestiaproject.net/~claurel/celest ... othorbits/
To use it, you need to have the latest version of the source from CVS. Then, replace your versions of render.h and render.cpp with the ones in the patch directory.
The high precision orbits patch is included with this one. I'm interested in performance and bug reports. The smoothing is adaptive, applied only to segments of the orbit near the camera. The distance at which smoothing gets applied may need some tuning. Lastly, in this test patch, the smoothing may be toggled on and off by pressing Ctrl+E (eclipse shadows--it's just temporary) The improvement can be quite profound (examples are with orbit segments set to 100 in celestia.cfg):
--Chris
Chris,
I've tested this patch. The frame cost is VERY high. After turning ON the asteroids and comets orbits, I'm getting a severe FPS drop. I see clearly the differences, when I use the ctrl-E command.
I've tested this patch. The frame cost is VERY high. After turning ON the asteroids and comets orbits, I'm getting a severe FPS drop. I see clearly the differences, when I use the ctrl-E command.
"Well! I've often seen a cat without a grin", thought Alice; "but a grin without a cat! It's the most curious thing I ever saw in all my life!"
-
Topic authorchris
- Site Admin
- Posts: 4211
- Joined: 28.01.2002
- With us: 22 years 9 months
- Location: Seattle, Washington, USA
Cham wrote:Chris,
I've tested this patch. The frame cost is VERY high. After turning ON the asteroids and comets orbits, I'm getting a severe FPS drop. I see clearly the differences, when I use the ctrl-E command.
Thanks trying it out . . .
I'm not seeing that much of a drop. Still, it's possible that the code to adaptively enable smoothing is causing the smoothing to be used too often. How many orbits approximately are you showing? And what value do you have OrbitPathSamplePoints set to in celestia.cfg.
--Chris
chris wrote:adaptively enable smoothing is causing the smoothing to be used too often. How many orbits approximately are you showing? And what value do you have OrbitPathSamplePoints set to in celestia.cfg.
I have tons of comets and asteroids (I don't know exactly how many). Probably several hundreds.
Smoothing is set to OrbitPathSamplePoints 1024 in the config file. I'll try with a lower value.
"Well! I've often seen a cat without a grin", thought Alice; "but a grin without a cat! It's the most curious thing I ever saw in all my life!"
I just lowered the orbit smootheness to 256, and tested the comets orbits only (about 160 comets). The frame cost is still pretty high : using ctrl-E, I can see a change of about a factor 2 in FPS.
"Well! I've often seen a cat without a grin", thought Alice; "but a grin without a cat! It's the most curious thing I ever saw in all my life!"
-
Topic authorchris
- Site Admin
- Posts: 4211
- Joined: 28.01.2002
- With us: 22 years 9 months
- Location: Seattle, Washington, USA
Cham wrote:I have tons of comets and asteroids (I don't know exactly how many). Probably several hundreds.
Smoothing is set to OrbitPathSamplePoints 1024 in the config file. I'll try with a lower value.
OK. Something is definitely going wrong and the smoothing is being applied too often in cases where the orbit segment isn't visible. Nevertheless, youre a madman for running with OrbitPathSamplePoints that high. It's nice to hear that the smoothing helps even then.
--Chris
chris wrote:Nevertheless, youre a madman for running with OrbitPathSamplePoints that high. It's nice to hear that the smoothing helps even then.
Yes, I know. I used a high value to smooth the old orbits, since I was seeing all the polygonal orbits.
Even with a smootheness set to 256, I can see a clear frame rate cost.
What value are you using ?
"Well! I've often seen a cat without a grin", thought Alice; "but a grin without a cat! It's the most curious thing I ever saw in all my life!"
Chris,
I've found something very odd.
I set the orbit path smootheness to 128, and found a comet with a distorded elliptical path : c1996 B2 (Hyakutake). It's really an horror. Try its SSC definition, with smootheness set to 128 :
EDIT : Here's another one, with extreme orbital deformation anomaly :
Just watch the orbit close to the Sun. Using ctrl-E shows a huge difference in shape. This is a clear indication that something is terribly wrong with that new code.
I've found something very odd.
I set the orbit path smootheness to 128, and found a comet with a distorded elliptical path : c1996 B2 (Hyakutake). It's really an horror. Try its SSC definition, with smootheness set to 128 :
Code: Select all
# C/1996 B2 (Hyakutake)
"C1996 B2 (Hyakutake)" "Sol"
{
Class "comet"
Mesh "telesto.cmod"
Texture "comet1.jpg"
Radius 3.0 # guess
Albedo 0.1
EllipticalOrbit
{
Period 113774.190671
PericenterDistance 0.2302042979120773
Eccentricity 0.999901956774384
Inclination 124.9227060156376
AscendingNode 188.057703178702
ArgOfPericenter 130.1729309148325
MeanAnomaly 0.0
Epoch 2450204.892527377
}
RotationPeriod 16 # Guess value
InfoURL "http://ssd.jpl.nasa.gov/cgi-bin/eph"
}
EDIT : Here's another one, with extreme orbital deformation anomaly :
Code: Select all
# C/1965 S1 (Ikeya-Seki)
# very bright, "sun-grazing"
# (very small pericenter distance)
"C1965 S1 (Ikeya-Seki)" "Sol"
{
Class "comet"
Mesh "desdemon.cmod"
Texture "asteroid3.jpg"
Radius 1.5 # in km; guess
Albedo 0.1
EllipticalOrbit
{
Period 876.515372 # T=(q/(1-e))^1.5
PericenterDistance 0.007785
Eccentricity 0.999915
Inclination 141.8576
AscendingNode 346.2963
ArgOfPericenter 69.0499
MeanAnomaly 0.0
Epoch 2439054.68 # 1965 Oct 21
}
RotationPeriod 16 # Guess value
InfoURL "http://ssd.jpl.nasa.gov/cgi-bin/eph"
}
Just watch the orbit close to the Sun. Using ctrl-E shows a huge difference in shape. This is a clear indication that something is terribly wrong with that new code.
"Well! I've often seen a cat without a grin", thought Alice; "but a grin without a cat! It's the most curious thing I ever saw in all my life!"
I'm sorry to report that the orbit smoothing code has another problem: it puts bumps in orbits, too.
Here's what it does to the initial segment of Cassini's orbit:
The bump comes and goes depending on the viewpoint. Here's a Cel:// url to see it:
cassini hits a bump
[edit]This is with the default number of orbit segments.[/edit]
Here's what it does to the initial segment of Cassini's orbit:
The bump comes and goes depending on the viewpoint. Here's a Cel:// url to see it:
cassini hits a bump
[edit]This is with the default number of orbit segments.[/edit]
Last edited by selden on 02.11.2007, 02:35, edited 1 time in total.
Selden
selden wrote:I'm sorry to report that the orbit smoothing code has another problem: it puts bumps in orbits, too.
This is exactly what I was indicating in my previous message.
"Well! I've often seen a cat without a grin", thought Alice; "but a grin without a cat! It's the most curious thing I ever saw in all my life!"
-
- Developer
- Posts: 944
- Joined: 18.07.2002
- With us: 22 years 4 months
- Location: Lyon (France)
I can confirm a 100% drop in framerates from synced constant 60 fps down to 20-30 fps depending on how many orbits are shown.
using 100 samplepoints and the standard celestia-cvs data files.
it seems your limitation that only draws the smooth orbit when in close range is buggy.
I went to saturn showing only planet and moon orbits and my fps got down to 35 even tho only saturn itself got a smoothed orbit.
switching with ctrl+E doesn't visibly touch any other orbit but saturn's.
the fps drop starts when I get closer than 0.1 AU to the planet
using 100 samplepoints and the standard celestia-cvs data files.
it seems your limitation that only draws the smooth orbit when in close range is buggy.
I went to saturn showing only planet and moon orbits and my fps got down to 35 even tho only saturn itself got a smoothed orbit.
switching with ctrl+E doesn't visibly touch any other orbit but saturn's.
the fps drop starts when I get closer than 0.1 AU to the planet
most recent celestia win32-SVN-build - use at your own risk (copy over existing 1.5.1 release)
-
- Developer
- Posts: 3776
- Joined: 04.02.2005
- With us: 19 years 9 months
-
- Developer
- Posts: 1356
- Joined: 07.01.2005
- With us: 19 years 10 months
- Location: Nancy, France
ElChristou wrote:That seems crazy but this patch do nothing on my config! (still have the hard edges...) Is this possible?
Same problem on my system, with nearly the same graphics as Christophe (no OpenGL 2 available):
Chris, is this patch supposed to work with all render paths ?
Last edited by Vincent on 02.11.2007, 11:32, edited 1 time in total.
@+
Vincent
Celestia Qt4 SVN / Celestia 1.6.1 + Lua Edu Tools v1.2
GeForce 8600 GT 1024MB / AMD Athlon 64 Dual Core / 4Go DDR2 / XP SP3
Vincent
Celestia Qt4 SVN / Celestia 1.6.1 + Lua Edu Tools v1.2
GeForce 8600 GT 1024MB / AMD Athlon 64 Dual Core / 4Go DDR2 / XP SP3
-
- Developer
- Posts: 3776
- Joined: 04.02.2005
- With us: 19 years 9 months
Vincent wrote:Same problem on my system, with nearly the same graphics as Christophe (no OpenGL 2 available):ElChristou wrote:That seems crazy but this patch do nothing on my config! (still have the hard edges...) Is this possible?
Chris, is this patch supposed to work with all render paths ?
Vince, I think, we French men have a problem... CTRL-E!
Sorry, works fine now...
-
- Developer
- Posts: 3776
- Joined: 04.02.2005
- With us: 19 years 9 months
-
- Developer
- Posts: 1356
- Joined: 07.01.2005
- With us: 19 years 10 months
- Location: Nancy, France
ElChristou wrote:Vince, I think, we French men have a problem... CTRL-E!
Sorry, works fine now...
Christophe, I think that we shouldn't sit anymore in the back of the classroom, near the radiators, dreaming about stars and galaxies... We should start listening to the teacher...
Sorry chris, works great for me too...
I can mainly notice no FPS drop at all. Just a drop of ~20% in this particular case:
@+
Vincent
Celestia Qt4 SVN / Celestia 1.6.1 + Lua Edu Tools v1.2
GeForce 8600 GT 1024MB / AMD Athlon 64 Dual Core / 4Go DDR2 / XP SP3
Vincent
Celestia Qt4 SVN / Celestia 1.6.1 + Lua Edu Tools v1.2
GeForce 8600 GT 1024MB / AMD Athlon 64 Dual Core / 4Go DDR2 / XP SP3