98 Commits

Author SHA1 Message Date
NEDJIMAbelgacem
095ac5230e Add NoRendering symbol 2020-12-03 22:27:20 +01:00
NEDJIMAbelgacem
3979b47ed1 Split QgsPointCloud3DSymbol into different classes 2020-12-03 22:27:20 +01:00
NEDJIMAbelgacem
7e2528427c Implement color ramp shader stuff 2020-12-03 22:27:20 +01:00
nirvn
9dee613a2a [FEATURE][3d] Orthographic projection support for 3D scenes 2020-11-19 15:30:30 +07:00
NEDJIMAbelgacem
9655a1e8d0 sipify qgspointcloud3dsymbol 2020-11-17 17:22:44 +01:00
NEDJIMAbelgacem
43446920d2 Merge branch 'master' into point-clouds-3d-gui 2020-11-17 02:17:20 +01:00
NEDJIMAbelgacem
8faa5eee43 Address some of the reviews 2020-11-17 00:51:18 +01:00
vcloarec
7485141f84 fix lost of property definition 2020-11-15 14:59:50 +10:00
vcloarec
8e4d9ca905 fix datadefined ui 2020-11-15 14:59:50 +10:00
Nyall Dawson
2dcbf95099 [3d] Add new material type "QgsNullMaterialSettings"
This is a "null" shading material which should be used when
rendering models or scenes with native textures and no material
should be explicitly set on the loaded entities.
2020-11-14 09:02:16 +10:00
Nyall Dawson
6224ea9b1c Add new 3d rendering technique enum value for TrianglesFromModel 2020-11-14 09:01:19 +10:00
NEDJIMAbelgacem
c220bb47a3 Initial implementation of point-cloud 3D GUI 2020-11-13 15:58:41 +01:00
NEDJIMAbelgacem
810dc369f1 remove unused mTransform 2020-11-10 15:39:26 +01:00
NEDJIMAbelgacem
23b723e5a0 inital terrain elevation offset implementation 2020-11-08 16:58:57 +01:00
NEDJIMAbelgacem
a25f04641b adress reviews 2020-11-06 09:59:41 +01:00
NEDJIMAbelgacem
6f542e7ea0 moved debug settings to the advanced tab and fixed CI problems 2020-11-06 09:59:41 +01:00
NEDJIMAbelgacem
c3ef5cc324 Added configuration to debug shadow and forward depth textures 2020-11-06 09:59:41 +01:00
NEDJIMAbelgacem
1e9e4d7dc1 Started adding depth and shadow map textures preview debugging 2020-11-06 09:59:41 +01:00
NEDJIMAbelgacem
e9ac7311c4 address reviews 2020-11-06 09:59:41 +01:00
NEDJIMAbelgacem
8768b7e3e2 fix spelling mistake 2020-11-06 09:59:41 +01:00
NEDJIMAbelgacem
d1d347d13d add EDL distance 2020-11-06 09:59:41 +01:00
NEDJIMAbelgacem
618807ed2f Initial EDL implementation 2020-11-06 09:59:41 +01:00
Vincent Cloarec
b725a044ae
3D material color data defined (#39683) 2020-11-04 16:42:58 +01:00
Nyall Dawson
0a4266535e QStringLiteral 2020-10-27 05:29:14 +10:00
Nyall Dawson
b74f1d6983 Remove QgsPointCloudLayer3DRendererMetadata from sip 2020-10-27 05:29:14 +10:00
Peter Petrik
b7e8071831 some stubs for 3d classes 2020-10-27 05:29:14 +10:00
Nyall Dawson
746ee315bd Fix boolean literal presentation in dox/PyQGIS docs 2020-10-16 16:03:26 +10:00
Nedjima Belgacem
85e444e1d6
[3D] [Feature] Shadow rendering (#38448)
* Initial post processing render pass implementation

* Got shadows with directional lights working good enough

* Make the shadows more configurable

* Trying to reduce peter panning

* Add licence

* banned banned_keywords_check

* trying to remove renderStateSet memory leak

* removing include <Qt3DExtras>

* Add documentation

* remove the use of setFilterMode when using QFilterLayer

* Fixing docs

* Fix shadow rendering checkbox

* Added y coordinates for view extent

* Added shadow bias parameter

* Added shadow map texture resolution parameter

* Addressing reviews

* Set the shadow rendering parameters automatically

* Add QLayer components individually if QT_VERSION < QT_5_10

* Hide depth texture preview quad

* Remove unused member

* Fix spell check

* Remove stepType property from shadowBiasSpinBox

* Disable shadow render pass if the shadow rendering is not activated

* Clarify maximum shadow rendering distance documentation

* Add value range for shadow bias

* Delete .bom file

* Clarify the usefullness of maximum shadow rendering distance

* remove unused stuff in shaders

* Make the inverted camera matrices passed as parameters

* Move post processing shaders parameters into the post processing entity constructor

* refactor how shadow rendering update into 1 function

* Fix spelling

* Fix Save As Image tool

* Improve UI according to suggessions

* add missing docs

* remove QAbstractSpinBox::DefaultStepType
2020-09-10 15:02:03 +02:00
Nyall Dawson
d1bc82ca7b Misc typo fixes 2020-08-31 11:38:02 +10:00
Harrissou Sant-anna
09844a7dab Move the skybox enabling checkbox to the groupbox widget
Whether skybox is enabled is now saved as part of the 3D Map settings
2020-08-21 13:00:52 +10:00
Nyall Dawson
23848e0e89 Start cleaning up label line settings, by moving them from the
QgsPalLayerSettings mega class to a dedicated QgsLabelLineSettings
class
2020-08-17 11:12:33 +10:00
NEDJIMAbelgacem
d7787f2477 Use path resolver's read/writePath()
Remove QSkyboxEntity include
Use deleteLater() instead of delete
Remove unneeded todo
Add \since to skyboxSettings in qgs3dmapsettings.h
2020-08-06 01:09:20 +01:00
NEDJIMAbelgacem
58d280be60 Fix merge conflict
Merge branch 'master' into skybox-feature
2020-08-04 08:33:53 +01:00
NEDJIMAbelgacem
4ac66d08c8 Add SIP_NO_FILE and fix bindings 2020-08-04 07:07:51 +01:00
Nyall Dawson
53a8343eac Fix see also 2020-08-03 16:34:10 +10:00
Nyall Dawson
cafa347441 Add sip casting code for material types 2020-08-03 16:34:10 +10:00
Nyall Dawson
b07e0a20d0 Split textured phong material class from basic phong material class 2020-08-03 16:34:10 +10:00
Nyall Dawson
4d5518531f Split simple line material out from phong material 2020-08-03 16:34:10 +10:00
Nyall Dawson
c87a8f6afb Code shuffle to move all material classes to separate subdirectory 2020-08-03 16:34:10 +10:00
Nyall Dawson
798ed57155 Rename terrain texture for clarity 2020-08-03 16:34:10 +10:00
Nyall Dawson
7c08046a47 Don't show texture controls in terrain shading widget 2020-08-03 16:34:10 +10:00
Nyall Dawson
2455170df1 Fix broken see also link 2020-08-03 16:34:10 +10:00
Nyall Dawson
ada2c601fb Move some texture handling methods to base class 2020-08-03 16:34:10 +10:00
Nyall Dawson
b9a147659f Fix sipifaction of enum class 2020-08-03 16:34:10 +10:00
Nyall Dawson
51cde6fbd2 [3d][FEATURE] Add CAD style ("Gooch") material for polygons/extruded lines
From the qt docs:

"The Gooch lighting model uses both color and brightness to help show the
curvature of 3D surfaces. This is often better than models such as Phong
that rely purely upon changes in brightness. In situations such as in CAD
and CAM applications where photorealism is not a goal, the Gooch shading
model in conjunction with some kind of silhouette edge inking is a popular
solution.

The Gooch lighting model is explained fully in the original Gooch paper.
The Gooch model mixes a diffuse object color with a user-provided cool
color and warm color to produce the end points of a color ramp that is
used to shade the object based upon the cosine of the angle between the
vector from the fragment to the light source and the fragment's normal
vector. Optionally, a specular highlight can be added on top. The
relative contributions to the cool and warm colors by the diffuse color
are controlled by the alpha and beta properties respecitvely."""

The TLDR: the shader works well for revealing 3d details of objects
which may otherwise be hidden due to the scene's lighting. Ultimately,
it's an easier material to work with as you don't need to worry
about setting up appropriate scene lighting in order to visualise features.
2020-08-03 16:34:10 +10:00
Nyall Dawson
daf38a9f23 Rework QgsAbstractMaterialSettings class to handle different rendering techniques
Restrict choice of material in widgets based on the symbol's required technique,
and hide material settings in phong widget which don't apply to certain
rendering techniques (e.g. hiding all but the ambient color for simple 3d line
symbols)
2020-08-03 16:34:10 +10:00
Nyall Dawson
d85228654b Add an icon in the 3d material combo box 2020-08-03 16:34:10 +10:00
Nyall Dawson
4f34b8a7f8 [3d][api] Split api from specifying 3d map layers to render from api
for specifying terrain layers to render

Previously the one method was used for both, which made it very
difficult to have a different set of layers used for terrain
generation vs 3d entity generation (you had to manually create a map
theme, which is very messy)
2020-08-03 13:13:11 +10:00
NEDJIMAbelgacem
8501959150 Fix merge conflict 2020-08-02 05:38:12 +01:00
NEDJIMAbelgacem
7746575ccb Merge branch 'master' into skybox-feature 2020-08-02 04:03:46 +01:00