Commit Graph

197 Commits (668fd219cc7d18ca3887ea0125a694edaea02747)

Author SHA1 Message Date
Hleb Valoshka 60c42c2588 Add new Renderer flags
* ShowDwarfPlanets
 * ShowMoons
 * ShowMinorMoons
 * ShowAsteroids
 * ShowComets
 * ShowSpacecrafts
 * ShowFadingOrbits (not used yet)
2018-11-16 21:25:16 +01:00
Hleb Valoshka e40b9549a7 Allow to disable and enable planet rings (Closes: #47) 2018-11-13 19:59:17 +01:00
Hleb Valoshka c2205c7f77 Implement AsterismList class with render() method 2018-11-09 11:14:24 +03:00
Hleb Valoshka ddd95f6911 Re-implement some annotations using addAnnotation 2018-11-08 23:43:13 +03:00
Hleb Valoshka e73e366828 Cleanup renderer, no functional changes 2018-11-08 23:43:13 +03:00
Hleb Valoshka 9069df6c6b Move asterisms and boundaries drawing from Renderer::draw() 2018-11-08 23:43:13 +03:00
Hleb Valoshka d31b4289d5 Add new location features to core, make them 64bit (Closes: #32) 2018-11-08 11:07:07 +03:00
Hleb Valoshka eab70c96cb Fix more coverity issues
Mostly uninitialized variables plus one memory leak
2018-10-30 23:52:19 +03:00
Hleb Valoshka f478faa5a4 Use std::string instead of char[] in annotations (Closes: #22) 2018-10-27 18:37:28 +03:00
Hleb Valoshka 6653929310 Remove ARB programs support completely 2018-10-23 00:03:39 +03:00
Hleb Valoshka ea273e0c6c Cleanups, no functional changes 2018-10-18 21:52:04 +03:00
Hleb Valoshka 974686cf15 Remove "old-stype" star rendering 2018-10-07 21:32:43 +03:00
Hleb Valoshka 73a869c137 Use core OpenGL2 functions instead of their ARB versions 2018-10-07 20:45:01 +03:00
Hleb Valoshka 73638c116d Remove basictypes.h and use standard c++11 types 2018-09-22 23:42:03 +03:00
Hleb Valoshka b082d5f47f Automatically convert to c++11 using clan-tidy
+ manual cleanups
2018-09-22 23:42:02 +03:00
Hleb Valoshka 882e4ecf28 fix whitespaces and indents
trailing spaces are removed
tabs are replaced with 4 spaces

# Conflicts:
#	src/celengine/cmdparser.cpp
#	src/celengine/command.cpp
#	src/celestia/celestiacore.cpp
#	src/celestia/celestiacore.h
#	src/celestia/qt/qtappwin.cpp
#	src/celestia/qt/qtglwidget.cpp
#	src/celestia/win32/winmain.cpp
2018-09-22 23:41:57 +03:00
Dmitry Brant a25d26720c Adapt code to Eigen 3.3
No functional changes, just adapting to API changes in Eigen.
2018-09-22 17:08:07 +03:00
Alexell c102af525c Added configuration options
Added ReverseMouseWheel option (existing in source) in celestia.cfg
file, added new orbit rendering parameters.
2018-09-22 17:08:06 +03:00
Andrew Tribick 069a61b3af Expanded preferences dialog box for Qt; added ability to turn off tinted illumination. 2012-05-23 21:28:37 +00:00
Vincent Giangiulio 38b6e23c6f - Fixed i18n issue about truncated labels with East Asian locales: 2010-03-07 20:19:17 +00:00
Chris Laurel dcf9232c08 Refactored some shadowing/eclipse code in the renderer
- Enabled ring shadows on moons and other objects that aren't themselves surrounded by
  ring systems.
- Use texture LOD bias to add blurriness to ring shadows (a result of the finite
  size of the light source.)
- Calculate ring phase function per-pixel instead of per-vertex
- Implemented more realistic rendering of unlit side of ring systems
- Used new Eigen's NewStdVector for vectors containing fixed-sized vectorizable
  objects.
2009-10-27 22:02:01 +00:00
Chris Laurel c835491ddc Rewrote orbit drawing code to fix multiple shortcomings. New orbit code uses adaptively subdivided cubic curves to draw orbits more accurately and without numerical precision artifacts. The orbit rewrite uses Eigen throughout (instead of the Celestia vector classes.) 2009-08-07 03:15:26 +00:00
Chris Laurel 89d0ef130a Eigenized all orbit and trajectory calculations. 2009-07-23 01:40:17 +00:00
Chris Laurel 479ef22e15 Eigenized reference mark, label, and marker code. 2009-07-21 04:04:26 +00:00
Chris Laurel 5a31a08df9 Eigenized galaxy rendering and more of the core renderer. 2009-07-21 03:14:29 +00:00
Chris Laurel 5de792f64a Eigenized lighting and shadow calculations in renderer. 2009-07-18 05:50:56 +00:00
Chris Laurel 40fade9aac Eigenized and cleaned up more of the renderer code. 2009-07-17 06:15:25 +00:00
Chris Laurel b42accebaf More Eigenization of render.cpp. Changed a temporary variable in staroctree.cpp from double to float (back to the way it was in 1.6.0) 2009-07-16 20:18:48 +00:00
Chris Laurel 37a46a4eff Eigenized portions of the renderer that draw stars and DSOs. 2009-07-16 05:32:55 +00:00
Chris Laurel 7272945657 First round of Eigen-izing the core Celestia code. 2009-07-15 03:06:30 +00:00
Chris Laurel a79d7ac479 Fixed placement of glare sprite when rendering stars in legacy render paths. Positioning is now consistent with OGL 2.0 path and avoids artifacts caused by glare geometry intersecting the star geometry. 2009-03-20 18:02:14 +00:00
Chris Laurel 3d66a67f7a Bug fixes:
2557612: sun, planets and orbits disappear. This was caused by bad handling of the selection marker when the camera positioned inside a large DSO (e.g. the Milky Way)
2392876: Atmosphere draw for unilluminated planets
2009-02-18 01:39:43 +00:00
Chris Laurel 9d55c56382 Committed Julien's patch to fix the animation rate of the selection cursor
when recording movies.
2008-10-10 22:43:02 +00:00
Chris Laurel 301a74e16a Improved selection cursor:
- Animation effect to make it easier to notice
- Pointer shown at view border when selection is off screen
- Cursor has different appearance when selection object is occluded
- Cursor doesn't interfere with markers
2008-09-25 18:31:48 +00:00
Chris Laurel 58a634722c Implemented NormalizeMesh property for solar system bodies. This property makes it easier to build assemblies from several bodies with mesh geometry. 2008-09-22 21:03:43 +00:00
Fridger Schrempp c46e6c41fd Implement globular clusters 2008-09-20 14:17:39 +00:00
Chris Laurel 41efec9e08 - Added abstract class Geometry; this will permit geometry other than
static models to be used for objects.
- Replace body, star, and DSO instances of Model with Geometry
- Renamed ModelManager to GeometryManager
- Fixed a GeometryManager bug that was triggered by multiple uses of a mesh
  file with different MeshCenters.
2008-07-23 21:54:53 +00:00
Chris Laurel c00a2a0f47 Added rendering of ecliptic line and support for turning it on and off via
script.
2008-06-07 01:35:24 +00:00
Chris Laurel ace6dfea21 Fixed a bug that caused objects to be incorrectly culled at small fields of view. Changed type of Renderer::cosViewConeAngle from float to double; using single precision floats was causing the value of cosViewConeAngle to be rounded to 1.0, making the view cone effectively just a line. 2008-05-30 06:37:37 +00:00
Chris Laurel d838a9e4d5 Enabled new sky grid code. 2008-05-29 21:52:27 +00:00
Chris Laurel f9975120d9 Location fixes:
- Added symbols for locations.
- Fixed visibility calculation for locations on ellipsoidal, non-spherical
bodies.
- Allow location labels to be occluded by foreground objects.
- Added new location types: eruptive center, insula (islands), and
tholus (domical hills and mountains)
2008-05-22 20:30:45 +00:00
Chris Laurel d97a73a05b Constified Renderer::getResolution and Renderer::getFaintestAM45deg to fix
compiler errors.
2008-05-01 22:25:20 +00:00
Chris Laurel 1604d97697 Fixed depth sorting of long/lat labels for planetographic grids. 2008-04-30 18:31:30 +00:00
Vincent Giangiulio f2f9931c62 Fixed bug with dwarf planet and minor moon labels. 2008-04-16 09:07:05 +00:00
Chris Laurel cc1fa6a80c Added minormoon and dwarfplanet classes. 2008-04-15 18:31:53 +00:00
Chris Laurel 889046a12d Removed some redundant calculation in renderer to speed up creation of render lists. 2008-04-05 23:22:39 +00:00
Chris Laurel d216a98755 Implemented secondary illumination (e.g. planetshine.) Rewrote much of the code that contructs render lists to make it possible to do compute secondary illumination efficiently. This patch fixes two other bugs. The orbit of barycenters is shown when they have children that are planets, moons, or asteroids. And, an incorrect frame release was fixed in solarsys.cpp. 2008-04-03 17:46:45 +00:00
Da Woon Jung e59f4b4b54 HDR bloom, adaptive exposure, calibrated nightlights - disabled by default, enable with USE_HDR and HDR_COMPRESS. 4 new vertex programs added. 2008-03-25 00:23:16 +00:00
Chris Laurel 9303aa6028 Fixed broken rendering of background markers. Markers behind the viewer were
being rendered. Added code to cull markers outside the field of view, fixing
the bug and improving performance when lots of markers are enabled.
2008-03-21 23:38:05 +00:00
Chris Laurel e4a28ef68a Implemented more flexible system for reference marks. Reference mark objects lists are maintained instead of simple bitfields, allowing customization of reference mark parameters (e.g. arrow size, planet grid style, etc.) There are three new reference mark types: planetographic grid, spin vector, and body-to-body vector. The Qt4 and Win32 front ends have been updated; Gtk, KDE, and Mac interfaces need to be updated to use the new code for toggling reference marks.
This change also includes a fix for two problems with Replace:
- objects were being reordered so that selection with the 1-9 keys no longer worked as expected.
- children of Replaced bodies were being deleted
2008-03-20 21:36:17 +00:00
Chris Laurel c7dae56a84 Eliminated the 16k light year distance limit for stars. The limit is increased
to 10 million light years, large enough to contain local group of galaxies. It
should be possible to increase this further by simply changing the setting
of STAR_OCTREE_ROOT_SIZE in stardb.cpp, but the performance implications need
to be investigated.
2008-03-15 00:19:27 +00:00
Chris Laurel 7f0e7b12d0 Fixed bug 1828935 (low albedo prevents drawing of child objects) and improved performance of visibility culling code. The new code uses the frame hierarchy introduced with Timelines to cull subtrees based on apparent brightness and position with respect to the view frustum. 2008-02-28 20:04:52 +00:00
Chris Laurel eba1b9940c - Implemented framework for Orbit and RotationModel subclasses to implement their own velocity and angular velocity methods to use instead of numerical differentation. Actual implementation of velocity methods will wait until further discussion on the developers list.
- Implemented Timelines for solar system bodies. A timeline allows a body to have different reference frames, orbits, and rotation models over time.
2008-02-21 02:25:48 +00:00
Chris Laurel ed9b33dab0 Implemented depth sorting for markers, with option to specify non-occludable
markers.
2008-02-13 21:49:53 +00:00
Chris Laurel 39041826d8 Fixed problems building with VC++ 9.0 (Visual Studio 2008) Made comparison operators for nested classes member functions so that they work as predicates for STL algorithms. The VC9.0 compiler seems to have stricter argument dependent lookup. 2008-02-04 09:37:55 +00:00
Chris Laurel f22a02b423 Added missing virtual destructor for RendererWatcher 2008-01-24 08:39:30 +00:00
Chris Laurel 4439a6e333 - Adjusted constellation label and boundary fade distance
- Fixed incorrect occluding of labels by irregular objects
- Implemented renderer watchers (currently not used, so this change is a noop)
2008-01-19 22:21:56 +00:00
Chris Laurel 2832a3e275 Removed limit on maximum number of nearby solar systems when rendering. Fixes
crashing bug reported by Martin.
2007-12-18 01:54:17 +00:00
Chris Laurel 68eb351b56 Fixed depth sorting of labels for solar system objects. The labels are now
correctly ordered with respect to other objects, and there's some special
handling to prevent labels of low-orbiting objects from being partially
occluded.
2007-12-06 17:15:53 +00:00
Chris Laurel edc7576e97 Added code to track changes to renderer settings. 2007-11-15 20:08:24 +00:00
Chris Laurel baad1b6f26 Fixes for orbit rendering:
- Transform and z clip orbit paths on CPU at double precision to avoid jittering, holes,
and other problems caued by single precision arithmetic.
- Use cubic interpolation to smooth sections of orbits that are close to the camera
- Added bounding volume culling for orbits to avoid rendering sections outside
the view frustum.
2007-11-11 01:58:05 +00:00
Chris Laurel 72e59b8afb Brightened grid and constellation border colors. 2007-11-08 20:50:37 +00:00
Chris Laurel 73e3cb81f6 Renderer changes:
- Rewrote orbit cache for efficiency, to avoid thrashing when multiple
views are active, and to eliminate unnecessary recalculation of orbits
- Added method to invalid orbit cache
- Cleaned up render list processing by replacing convoluted checks with
  a single switch on the new member renderableType
- Always use two digits for minutes in RA labels on equatorial grid
2007-10-25 07:18:53 +00:00
Christophe Teyssier c6b9d10888 Fixed compilation with gcc 2007-10-13 11:08:13 +00:00
Chris Laurel 1dfdf8ed5e Set tesselation of comet tails adaptively based on screen sizes. Fixes the obviously polygonal appearance of comets when seen up close without impacting frame rates. 2007-10-11 22:20:53 +00:00
Chris Laurel 5c79564639 - New label colors. Harcoded constants replaced with settable values.
- Fixed missing coordinate markers in equatorial grid
- Corrected depth sorting for stars that cover less than a pixel on screen.
The depth sorting problem was most apparent for pulsar planets, where
the radius of the star was much smaller than the radii of planets in
orbit around the star.
2007-10-11 01:32:04 +00:00
Vincent Giangiulio d6681c006e Centered the constellation labels. 2007-06-25 21:31:40 +00:00
Chris Laurel 16a902d78c Changed default render flags to include auto magnitude; default render flag set is now defined in render.h. 2007-05-27 09:33:43 +00:00
Chris Laurel e4f7c63797 Added fade effect for orbits and solar system body labels. 2007-05-14 03:00:26 +00:00
Chris Laurel 1729616adf Star rendering improvements:
- Improved glare texture
- Glare is drawn in front of object, to avoid strange behavior where a
dark object silhouette sits in the middle of the glow
- Stopped using atmospheres to give stars a fuzzy fringe (it was
making stars look worse, not better)
- In 'fuzzy points' mode, glare halo doesn't disappear as a star becomes resolvable as a > 1 pixel disc
- Set a maximum size for scaled disc stars
2006-12-20 18:56:43 +00:00
Pat Suwalski 178d489a00 Adding SGI Video Sync support. 2006-12-12 01:29:27 +00:00
Chris Laurel 1ab3b7ee69 Fixed precision problems in code to display location labels. 2006-12-08 19:02:20 +00:00
Chris Laurel 4aaf271164 Use new star rendering code by default in the render paths where it is supported. The '@' key binding for edit mode is restored. 2006-12-03 08:49:52 +00:00
Chris Laurel 76081d6603 Implemented two pass approach for rendering: opaque objects are rendered first, transparent ones second. Subpixel sized objects are also rendered with transparent objects and after orbit paths. This fixes the problem where orbit paths were occluding point sized objects. 2006-09-11 00:37:20 +00:00
Chris Laurel 8c5a08f26a Depth sorting and orbit fixes:
- Show and highlight orbit of selected object
- Show star orbits
- Remove depth sorting debug spew
- Correctly orient orbit paths when the orbit is referred to the ecliptic rather than the parent body's equator
2006-09-08 05:59:38 +00:00
Chris Laurel aa9c6a3c64 - Replaced the old depth sorting algorithm with a new, cleaner, faster, and more robust scheme.
- Overhauled orbit path rendering so that orbit paths get correctly depth sorted
2006-09-07 08:08:32 +00:00
Chris Laurel 9389ea3b78 - Fixed bug in the eclipse shadow test; objects close to the surface of the lit side of a planet were incorrectly rendered with shadows
- Added a render flag for cloud shadows
- Made the OpenGL 2.0 path respect the ring shadow render flag setting
2006-07-26 17:21:23 +00:00
Chris Laurel 4fa5c3475f Enabled new star rendering path as an option--uses point sprite extension, new glare textures (gaussian), and dynamic star labeling. 2006-03-08 18:29:10 +00:00
Fridger Schrempp 0493b69176 add comet tail vanishing code, distance sorted label display 2005-12-11 15:34:35 +00:00
Chris Laurel ffca320843 Use OpenGL point sprite extension for rendering stars (work in progress) 2005-11-25 22:57:20 +00:00
Chris Laurel 974213f905 Integrated changes from Fridger and Toti's Celestia FT 1.2 2005-11-18 09:00:39 +00:00
Chris Laurel f5f14ee5ab Render orbits paths in multiple passes so that they are drawn correctly when they appear in front of a planet or other body (another Joseph Wang fix) 2005-07-25 16:38:09 +00:00
Christophe Teyssier ae7095edd7 Added i18nName to the Asterism class and a renderer label flag to display
localized names of constellations.
Removed some redundant calls to gettext when rendering labels
Added KDE menu entry and preference to toggle I18nConstellationLabels
2005-07-21 22:35:18 +00:00
Chris Laurel 57ff878447 Added separate render and label flags for the various types of deep sky objects. This will break some scripts and cel:// URLs that relied on the 'show galaxies' flag to also show nebulae, but this is the inescapable cost of moving to a more flexible set of render settings. 2005-02-11 06:09:37 +00:00
Chris Laurel 384e3ca8b7 Fixed lighting bug that occurred when multiple solar systems were rendered. Solar system centric light source positions from the wrong solar system were being used, resulting in completely incorrect illumination. 2004-11-11 09:41:51 +00:00
Chris Laurel d76044133a Implemented shadows on rings for GLSL render path. 2004-10-23 09:30:14 +00:00
Chris Laurel 496fd54645 - Added separate specular texture support to GLSL path
- Implemented eclipse shadows for GLSL path
2004-10-19 17:52:43 +00:00
Chris Laurel dcb8910d67 - Improved precision of axial rotation calculation
- Replaced oblateness with semiAxes, allowing general ellispoids to be used for stars
2004-10-07 17:52:22 +00:00
Chris Laurel 0cae2cc3e2 - Made orbit path rendering work for multistar systems
- Added foundations of multiple light source rendering
2004-10-04 06:35:33 +00:00
Chris Laurel 304c984e62 Implemented complex star systems:
- Barycenters may be defined in .stc files; star orbits may be defined with respect to a fixed or moving barycenter
- Eliminated BarycenterIsOrigin flag; barycenters are a more general solution
- Previously, just the closest solar system was rendered; changed renderer to show planets for all solar systems visible
- Added automatic star catalog number generation, so stars can be defined with just a name.  Some futher work required to make these stars work correctly in cel:// URLS.
2004-10-02 10:44:49 +00:00
Chris Laurel 12d827d29e Implemented StarDetails class which contains information that was formerly in StellarClass. Stars may have custom details with orbits, textures, meshes and other extended information. 2004-09-20 03:27:50 +00:00
Chris Laurel 35c0798aac Fixed longstanding bug where two objects having overlapping bounding spheres would get incorrectly rendered, with one completely in front of the other. 2004-06-26 08:22:20 +00:00
Chris Laurel 8fd1d6ff26 Implemented an option to display just the portion of object's trajectory that it has travelled as of the current time. Currently, there is no keystroke bound to toggle this option on and off; it can only be enabled from scripts (.cel and .celx) 2004-06-01 07:27:17 +00:00
Chris Laurel e2fdfd26e3 Depth sort labels for solar system objects so that they're correctly occluded. 2004-05-18 17:31:26 +00:00
Harald Schmidt b3598e91d2 Added getMinimumOrbitSize as counterpart for setMinimumOrbitSize. 2004-03-21 19:26:54 +00:00
Chris Laurel 99c60e1d3c Added to the config file rendering detail options for orbits, shadows, and rings. 2004-03-15 18:51:16 +00:00
Chris Laurel 329aa57aa9 Display Bayer designations with Greek letters 2004-02-28 09:30:17 +00:00
Chris Laurel df98cc39cd Improved mesh support:
- Use more efficient and flexible internal representation
- Added code to convert 3DS meshes to new structure
- Support new Celestia mesh format (ASCII-only right now)
2004-02-17 09:58:52 +00:00
Chris Laurel e3a3e5c0be Fixed two bugs in location visibility calculation: locations behind the camera were sometimes rendered anyway, and labels were being shown for locations still below the horizon. 2003-08-01 06:32:43 +00:00
Chris Laurel dcfc3e56db Added star styles: normal fuzzy points, points, and scaled discs. Added orbit mask separate from the show all orbits bit of renderFlags. Vary color of orbits based on object class. 2003-07-08 15:31:34 +00:00