Commit Graph

410 Commits (73638c116d90226181af195a747958e00ee51588)

Author SHA1 Message Date
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 7911c6ddbe - Implemented consistent behavior for models with no texture coordinates. Fixes 'flickering' of colors on no-texcoord models used in stc files (and in ssc files with a texture override.) 2009-03-09 19:01:53 +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
Fridger Schrempp 222ee6b1a5 major upgrade of globular cluster code 2009-02-03 20:21:36 +00:00
Chris Laurel cc60577fd5 Modified selection cursor so that arrows are rotated 45 degrees from
screen alignment.
2009-01-28 00:50:16 +00:00
Andrew Tribick 149959f8b2 Fixed some compiler warnings when building under gcc 4.3. 2009-01-26 20:49:35 +00:00
Chris Laurel bea799547d Fixed bug that caused barycenters to be visible as small spheres. 2009-01-09 10:44:11 +00:00
Chris Laurel 921d694fee Fixed bugs and improved accuracy of eclipse shadows in OpenGL 2.0 path:
- Very faint shadows (where the occulting object appeared much smaller than the sun) were being rendered completely black. This is now fixed.
- Maximum shadow depth and umbra (or antumbra) radius are now accurately calculated for all eclipses
- Extremely faint shadows are culled for performance
2008-12-30 02:20:33 +00:00
Chris Laurel 8d180b6dbb Fixed bad assertion in lighting code--off by one error testing for
maximum number of lights.
2008-12-04 21:48:04 +00:00
Chris Laurel bb9c0a1558 Fixed eclipse rendering bug that was apparent at high zoom factors. The bug was caused by confusion about the origin for light source positions. 2008-11-08 01:52:21 +00:00
Chris Laurel cd22f3532d Fixed uninitialized variable error that was causing the clipping plane to be set incorrectly when rendering some stars. 2008-10-28 02:56:23 +00:00
Chris Laurel 6078948aa6 Fixed ring and ring shadow rendering bug that occurred when using models with untextured portions. 2008-10-22 18:10:17 +00:00
Chris Laurel cad9be3f2c Added missing notification from renderer when texture resolution changes. 2008-10-15 02:02:58 +00:00
Vincent Giangiulio d7b12d4110 - Extended localization to all DSO and star names. 2008-10-13 21:10:09 +00:00
Chris Laurel 9df9f57e94 Fixed compiler error in render.cpp--DeepSkyObject::getBoundingSphereRadius should be getRadius (for now) 2008-10-11 18:40:05 +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 1f7a51d0ff Changed behavior of Visible flag slightly. Visible false now means that an object's orbit will not be shown. 2008-10-01 22:50:38 +00:00
Chris Laurel 78cf8dacb8 Fixed comet rendering bugs: normal calculation was incorrect and generated NaNs. 2008-09-26 22:33:10 +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 a12423b5de Changed label display logic so that the label of a barycenter is shown when
it's the center of a planet or dwarf planet system.
2008-09-16 23:40:30 +00:00
Chris Laurel 44d8eb574f Don't show labels for DSOs that aren't visible. 2008-09-05 22:36:36 +00:00
Chris Laurel def429cacd Fix for bug 2020938 [Ring location labels are disappearing.] The new location
label code was assuming that all labels were on (or very near) the surface of
a body. A one line fix corrects this bad assumption.
2008-08-12 01:02:53 +00:00
Chris Laurel 93acae93e1 Implemented the visible flag for deep sky objects. The visible attribute may
be set either in the dsc object definition or in a celx script.
2008-08-07 05:35:29 +00:00
Chris Laurel 95855eb55b Made location symbol colors match label colors when LabelColor is overridden. 2008-07-26 21:04:39 +00:00
Chris Laurel 99ee3a4102 Renderer changes:
- Added camera orientation property to RenderContext, to be used with software
path for point sprites.
- Enabled location label color overrides
2008-07-25 23:31:00 +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 07627a9a9b Implemented horizon coordinate grid; changed calls of SkyGrid::setLatitudeUnits to SkyGrid::setLongitudeUnits 2008-05-30 03:19:07 +00:00
Chris Laurel d838a9e4d5 Enabled new sky grid code. 2008-05-29 21:52:27 +00:00
Chris Laurel 0360a3e689 Removed extra debugging output in render.cpp. Add casts to some arguments
to min and max function arguments so that the compiler doesn't complain when
we use the STL template versions of these functions instead of macros.
2008-05-22 23:39:13 +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 ce2a3a3651 Fixed bug that caused markers for solar system bodies to disappear when the
marked object became invisible. Markers were not taken into account when
computing the front plane of the nearest depth interval. Also fixed a bug
in the DEBUG_COALESCE code that caused it to crash when enabled.
2008-05-05 22:13:27 +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
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 dcb255db2a Removed renderer debugging code accidentally left in from planetshine patch. 2008-04-03 21:14:42 +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 a26e7a5fbc Fixed white rect covering window on some win, linux nvidia configs when hdr bloom is enabled. 2008-03-27 15:59:54 +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
Da Woon Jung 451028f09d Put all Mac ATI renderers on the point sprite stars blacklist. 2008-03-09 02:43:26 +00:00
Chris Laurel b946b1ae3c Integrated Javier Nieto's changes that permit colors and visibility to be assinged to individual constellations in cel scripts. 2008-02-29 21:43:30 +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 a6cc486542 Rewrote observer class to use 1.5.0 reference frames. The FrameOfReference
class is replaced by the new ObserverFrame class, which is a wrapper for
ReferenceFrame. Small changes to a lot of file were necessary, in many cases
simply because the CoordinateSystem enum was moved from astro to
ObserverFrame. This change was primarily a refactoring to make future
development easier and improve performance be eliminating redundant
frame -> universal conversions of the observer position. The one change that
will be apparent to users is the redefinition of the chase and phase lock
frames. Previously, these used the spin axis of the reference object to define
the secondary frame axis. Now, the secondary axis is the position vector in
chase mode, and the velocity vector in phase lock mode.
2008-02-08 21:46:02 +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 0cda718f63 Added new ssc object flags for visibility, orbit color, and orbit visibility. Added ssc properties for visibility and orbit color, celx methods for all new flags. 2008-02-04 00:17:35 +00:00
Da Woon Jung 9c552f552d Added ATI X800 to the Mac point sprite blacklist (fixed star glares on X850XT) 2008-02-02 04:52:04 +00:00
Chris Laurel b1982a520d Updated Body class to allow all three ellipsoid axes to be specified independently via SemiAxes property. 2008-02-01 01:37:49 +00:00
Chris Laurel ee2ae878cc Fix for bug 1882282: Star glare clipping problem
Depth writes were left set to true after rendering comet tails, resulting in a star glare halos appearing to clip labels. Fixed by removing a glDepthMask(GL_TRUE) that shouldn't have been in the code at all.
2008-01-30 02:52:33 +00:00
Da Woon Jung 48d4d8a8ac Mac: Due to driver-imposed point sprite size limits, do not use point sprite stars on ATI RV3xx renderers. 2008-01-19 22:31:13 +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
Da Woon Jung 6916a937aa Mac Qt patch 2008-01-18 06:08:18 +00:00
Vincent Giangiulio 839f745485 Changed from marker 'name' to marker 'label'. 2008-01-03 23:10:12 +00:00
Vincent Giangiulio 82fb8eb895 Added name to markers 2008-01-03 00:05:40 +00:00
Chris Laurel a1f4551b0a - Switched to using ARB_texture_cube_map instead of obsolete EXT_texture_cube_map
- Changed fade distance for constellation labels
- Enabled fading for constellation boundaries
- Prevented rendering planets as points in daytime sky
- Enabled REFMARK in render.cpp
- Removed dead code
2007-12-30 20:11:26 +00:00
Toti 16f45d7b33 Added fade effect for constellation labels and lines 2007-12-29 23:25:48 +00:00
Toti 7085612260 Improved halo size computation. Fixes bug 1849089 2007-12-28 02:23:23 +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 23c66a059f Fixed frame related bug that caused a body to be positioned incorrectly
when the star of its orbit frame didn't match the namespace root star.
2007-12-11 21:25:35 +00:00
Chris Laurel 1d3a1fb865 Re-enabled star coronas. 2007-12-06 23:51:44 +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
Vincent Giangiulio 06493ad2a6 Fixed bug in label rendering with objects named as the empty string. 2007-11-21 18:52:33 +00:00
Toti 4ac5f4353e Added check to skip DSO octree traversal if all DSO renderflags are disabled 2007-11-20 04:28:37 +00:00
Chris Laurel 55250a8b90 Fixed crash bug with LongLat orbit display (LongLat is deprecated, but older add-ons still use it.) 2007-11-17 05:44:13 +00:00
Chris Laurel edc7576e97 Added code to track changes to renderer settings. 2007-11-15 20:08:24 +00:00
Chris Laurel 61c5950f63 Trajectory rendering fixes:
- Fixed crash bug when computing bounding volumes for empty trajectories (FixedPosition)
- Fixed bad orientation of star orbits
- Removed debug output
2007-11-12 17:35:38 +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
Chris Laurel bdc15ebdbe - Fixed depth sorting code to never use a near plane distance of zero
- Added more declination and right ascension labels for celestial grid
2007-10-13 02:22:07 +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 b96258bab9 Added separate flag for star orbit rendering (so star and planet orbits may be toggled independently.) 2007-06-16 04:28:54 +00:00
Chris Laurel 8efed8353d Increased the deep sky object octree size (and thus the max draw distance) to 100 Gly. 2007-05-24 17:35:40 +00:00
Vincent Giangiulio 82b59fef79 - Enabled line smoothing for markers. 2007-05-18 20:31:01 +00:00
Chris Laurel 825e52669c Modified depth sorting code for better orbit display:
- Avoid setting a near clip plane of zero when only orbit paths are visible. This should fix the disappearing orbits on the Mac version
- Don't render extremely large orbit paths into small depth intervals. This eliminates some clipping artifacts caused by GPU precision limits.
2007-05-17 18:14:12 +00:00
Fridger Schrempp 1dd4549a5f Added slight tuning for labelThresholdMag 2007-05-17 14:16:14 +00:00
Fridger Schrempp ebffbf1143 Added fading star labels 2007-05-17 14:00:39 +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 ef9ae9073a Fix bug that limited resolution of virtual textures on ringed planets. The hack that was in place to prevent too much tessellation of ringed planets is no longer necessary with the new depth sorting code. 2007-05-12 11:19:43 +00:00
Chris Laurel 9d3fecdb11 Reduced point sprite size by a factor of 2. 2007-04-22 04:53:43 +00:00
Chris Laurel 9ff9823c2a Use GLSL instead of fixed function pipeline when rendering emissive models. 2007-04-20 17:56:04 +00:00
Chris Laurel 3b6d63962f Consider parents of parents (and so on . . .) when calculating eclipse shadows. 2007-04-17 17:43:24 +00:00
Chris Laurel f833a58ef2 Fixed bug with emissive models. 2007-04-03 18:00:21 +00:00
Chris Laurel 6454b452d4 Mesh rendering bug fixes and improvements:
- Defined a sensible lighting model to use when normals are omitted from a model, which should prevent crashes in the Mac version
- Added support for point sprites in cmod meshes
2007-04-02 16:55:32 +00:00
Chris Laurel b4be8570aa Orbit rendering improvements:
- Don't render the Sun's orbit about the SSB (or other aperiodic, inifinite trajectories)
- Changed blend mode for aliased lines to matched antialiased lines
- Changed color of moon orbits
2007-03-05 00:33:28 +00:00
Toti cdd623b8af Disabled unused function 2007-01-06 02:18:49 +00:00
Toti 6a68b18366 Suppressed 'unused variable' warning on GCC 2007-01-06 00:52:32 +00:00
Chris Laurel 8948472aee Fixed emissive textures in pre-OGL2 render paths. The emissive texture was being modulated by the diffuse color, but the diffuse color should really be ignored. 2007-01-05 10:09:59 +00:00
Chris Laurel 2a16fee060 Modified star rendering (again):
- Disabled glare halos for planets.
- Render subpixel planet discs as points in point stars mode
2006-12-28 19:29:42 +00:00
Chris Laurel 1e2003f733 Ignore phase when culling satellites based on the magnitude of their primary body; this prevents a planet's satellites from disappearing when it approaches a solar transit. 2006-12-20 19:34:47 +00:00