Commit Graph

5958 Commits

Author SHA1 Message Date
Stuart Buchanan
95b7e84d9e WS30: Improve MaterialTextureAtlas
- Set Anisotropic from properties
- Only generate the TextureAtlas for VPB (not used in WS2.0)
- Only resize textures if required
2021-02-06 12:53:12 +00:00
James Turner
be49f880b8 Fix HTTPClient reset() behaviour
Ensure all data members are correctly re-initialzied when doing a reset.

This shoed up as negative ‘bytes downloaded’ counts after a TerraSync
abandon and retry.
2021-02-05 10:37:23 +00:00
James Turner
059285ed6f Particles: replace use of ParticleSystemUpdater
Extend our own particle manager to replace the OSG particle system
updater. This fixes thread-safety and also timing (better match to
simulation dt values). We also use weak pointers (observer_ptr in
OSG terminology) to ensure particle systems are released once their
frame is gone.
2021-02-03 21:47:51 +00:00
Stuart Buchanan
bbef23deae WS30: Terrasync compatible files, LoD control
Change WS30 file format to match standard scenery directory
structure, add controls for LOD ranges.
2021-02-02 19:08:23 +00:00
Fernando García Liñán
23a4fb1429 Add missing null check to SGLight's dim-factor expression 2021-02-02 18:40:54 +01:00
Julian Smith
a7a53921e4 simgear/misc/sg_path.*: added SGPath::makeLink(), for making softlinks.
Note that on Windows there is no implementation yet and it always returns
false.
2021-01-30 13:27:55 +00:00
Julian Smith
b888a46e67 simgear/scene/model/SGReaderWriterXML.cxx: removed unused static variable. 2021-01-30 13:27:55 +00:00
Julian Smith
edb1f8b9f8 Improved diagnostics if terrasync fails.
Increased some diagnostics to SG_ALERT if terrasync checksums fail.

Show failed URLs; show SyncItem::Type enum names; show SyncItem::Status enum
names.
2021-01-30 13:25:29 +00:00
Julian Smith
a72941fdb7 simgear/props/props.cxx: Improved diagnostics for illegal property names. 2021-01-30 13:23:26 +00:00
Stuart Buchanan
d695d37563 WS30: Property configuration VPB
Configure the VPB elevation mesh via properties:
/scenery/elevation-mesh/sample-ratio controls the elevation
mesh sampling, allowing reduction in mesh size

/scenery/elevation-mesh/vertical-scale is just for fun and
scales the mesh vertically making mountains taller.

/scenery/elevation-mesh/constraint-gap-m controls how much below
airports etc. elevation vertices are forced to be.
2021-01-27 20:00:39 +00:00
Fernando García Liñán
b04cdbc491 Add a priority parameter to SGLight
In the future this will help choose which lights should be displayed if
the user sets the maximum number of lights to a low enough value.
2021-01-26 13:41:51 +01:00
Stuart Buchanan
3b1eb4a7f7 Remove Terrain simplifier - now redundant 2021-01-17 14:26:35 +00:00
Stuart Buchanan
b8ddf517f4 WS3.0 Add OBJECT STG entries as elevation constraints
Note this is for OBJECT only (e.g. airports), not
OBJECT_STATIC or OBJECT_SHARED
2021-01-14 11:32:07 +00:00
Stuart Buchanan
0a59de8c46 WS3.0: Add elevation constraints for airports
Previously if the elevation of the terrain vertices was higher
than the airport, the terrain pushed through the airport, looking
ugly.

This adds the concept of elevation constraint models, which the
VPBTechnique applies when generating terrain vertices.

Simply add a scenery model to the contraints on the technique,
and terrain won't poke through it.
2021-01-13 20:26:28 +00:00
Colin Geniet
d54e9b7675 Animations: Fix spin for Compositor lights
The 'spin' animation has a strange behaviour:
it pushes a temporary rotation matrix on the transformation stack during
cull traversal, and removes it thereafter.
Thus, the rotation matrix is missing outside of cull traversal, e.g.
when the position of Compositor lights is computed.

The same issue was fixed for the 'rotate' animation by commit
e202d4e4a5
(this mentions broken 'picking' animations as a different manifestation
of the same issue).

Fix this by setting the angle of the persistent SGRotateTransform,
instead of creating a temporary rotation matrix.
2021-01-13 12:18:22 +01:00
James Turner
0b9849d232 CMake: remove .cmake extensions
These seem to break include()’s regular path searching, which is odd.
2021-01-10 13:32:59 +00:00
James Turner
fa1f13cbe2 CMake: add upstream FindLibLZMA.cmake
Required since older CMake versions of this don't define an imported target
2021-01-10 11:56:22 +00:00
James Turner
d4a7cb1ee2 ArchiveExtractor .Xz compression of tar-balls
Allow use of LibZLMA / XZ compressed tarballs, which are significantly
smaller. Extend unit-tests to cover this.
2021-01-09 16:30:50 +00:00
James Turner
14494afd2f Tolerate blank lines in buildings lists 2021-01-08 19:39:37 +00:00
James Turner
9fbf56004b HTTPRepository: improving handling of archives
Avoid hard-coding the archive extension, and ensure the extracted
archive directory is not orphaned on update. Finally, use the
literal filename in the .dirindex when computing the hash, rather
than adding a .tgz extension.
2021-01-08 19:39:14 +00:00
James Turner
161f76508d TerraSync: allow separate OSM2City server
Lookup OSM2City using a separate service profile, and use this server
for requests for OSM2City suffix dirs.
2021-01-08 19:38:02 +00:00
James Turner
08906ebbb0 Launhcer: fix crashes adding a catalog
Traversing a container which is modified causes crashes, take a copy
during traversal for firePackageStatus.

Sentry-Id: FLIGHTGEAR-CJF
Sentry-Id: FLIGHTGEAR-CJ5
2021-01-01 15:34:17 +00:00
Fernando García Liñán
e606609a00 Remove unused Rembrandt stuff 2021-01-01 10:35:49 +01:00
Fernando García Liñán
5a2c348b12 Our cull visitor no longer collects light sources by default 2021-01-01 10:35:49 +01:00
Stuart Buchanan
b62808bb4c Fix hang on "Loading Scenery" over the sea
Previously attempting to start on an ocean tile with static
models present cause FG to spin on "Loading Scenery".

This was caused by not creating a BVH for an ocean tile in
the specific case where there was STG models, due to a PagedLOD
node being inserted in the scene graph.  So
FG never thought the scenery was loaded sufficient to place
the aircraft.

By explicitly creating a BVH for ocean tiles the problem is
fixed.

Candidate for 2020.X
2020-12-30 16:38:04 +00:00
Erik Hofman
62501e5ede Eatdirt: Implement parallax effects for the Moon at the rendering stage and not with the ephemeris. 2020-12-30 11:13:42 +01:00
Fernando García Liñán
60f5df2998 Make light animation definitions from Rembrandt compatible with SGLight
This effectively makes unmaintained aircraft with Rembrandt light definitions
automatically compatible with Compositor lights.
2020-12-30 09:28:29 +01:00
Fernando García Liñán
8f2e7824ab SGLight: Add support for dimming through a SGExpression ala Rembrandt 2020-12-30 09:27:30 +01:00
xDraconian
28015085ec Merge /p/flightgear-photoscenery/simgear/ branch next-photoscenery-r8 into next
https://sourceforge.net/p/flightgear/simgear/merge-requests/90/
2020-12-27 04:18:40 +00:00
Nathaniel MacArthur-Warner
1960a1b264 Get rid of duplicate log 2020-12-24 14:55:34 -08:00
Nathaniel MacArthur-Warner
7572d8f6ee Another logging improvement 2020-12-24 14:43:14 -08:00
Scott Giese
074cb31c28 fix: sky and cockpit to turn black
Metar sky condition without base layer height (e.g. FEW///) is the cause of this issue.
Randomize the base layer height when the actual height is unknown.
2020-12-24 15:39:39 -06:00
Nathaniel MacArthur-Warner
7dc8a86524 Warn when loading uncompressed DDS files since it causes problems on some systems 2020-12-24 12:26:30 -08:00
Nathaniel MacArthur-Warner
3fc6df203c Attempt to convert subimage on pixel format mismatch, provide more helpful logs 2020-12-23 23:39:39 -08:00
Nathaniel MacArthur-Warner
a56d1718de Check for and scale down oversize composite orthophotos 2020-12-23 22:38:03 -08:00
Nathaniel MacArthur-Warner
6ed37c880a When creating composite orthophoto, only scale sub images when necessary 2020-12-23 17:32:31 -08:00
Nathaniel MacArthur-Warner
0e7cf378a4 Indent fix 2020-12-23 14:07:34 -08:00
Nathaniel MacArthur-Warner
851ccb0ca7 Fix creation of composite orthophotos in case where aspect ratio of input photos doesn't match tile 2020-12-23 11:37:38 -08:00
Fernando García Liñán
0f482c14dd Do not let OSG cull lights away 2020-12-23 12:50:06 +01:00
Fernando García Liñán
a84133e945 (Another) significant rework of the clustered shading feature
This time it tries to be as compatible as possible with older hardware setups.
The only feature that might not be supported by some really old hardware
(or picky drivers) is floating point textures. There is no way around that
though, so this is as compatible as we can be with GL 2.1 level hardware.
2020-12-22 10:52:02 +01:00
Julian Smith
718a23cbbe Fixed build failure caused by flightgear now #including logdelta.hxx.
The fix is to add logdelta.hxx to list of headerss in
simgear/debug/CMakeLists.txt.
2020-12-22 00:35:40 +00:00
Julian Smith
687e65fa36 simgear/debug/logdelta.*: added logDeltaSet() to allow dynamic control. 2020-12-21 22:36:37 +00:00
James Turner
284667c18f Fix BTG error reporting
Use gzerror, not strerror, for these codes.
2020-12-21 13:26:04 +00:00
Fernando García Liñán
68caf780b0 Clustered Shading: Don't use static variables, use class member variables instead 2020-12-18 23:29:08 +01:00
Julian Smith
d1aa5a0b82 simgear/props/props.*: added method to add exising SGPropertyNode_ptr as child.
Avoids the need to create a new child and copy recursively.
2020-12-18 17:44:57 +00:00
Julian Smith
42c89ba6d3 simgear/props/props.cxx: parse_name(): improved exception text.
Also fixed indentation.
2020-12-18 17:44:57 +00:00
Fernando García Liñán
995608fc9e Fix wrong Compositor buffer formats 2020-12-18 01:45:26 +01:00
Scott Giese
e8f715c255 Maintenance: convert atoi to modern equivalence
Out of range results in undefined behavior in the C library.
Coverting to C++ library to avoid this risk.
2020-12-17 18:01:49 -06:00
Scott Giese
e031ea7f7c Crash prevention: throw during dtor
get_manager() will be called during dtor, so throwing an exception would cause a hard crash.
2020-12-17 17:02:40 -06:00
Scott Giese
9bac911fe1 Maintenance: Use empty instead of size==0 2020-12-17 16:08:06 -06:00