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.
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)
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)
If enabled, shows a sphere at light source origins, allowing easier repositioning
and placement of light sources relative to the scene contents
Fixes#37726
Seperate the calls for whether a user has enabled diffuse texture
from API for determining whether diffuse texture should be used during
rendering. And don't try to use diffuse textures when the texture
path hasn't yet been set, which causes a flood of Qt warnings...
* [Feature] texturing support for vector layer
* Fixed tesselation test not passing issue
* Fixed diffuse_texture_path typo
* Refactoring according to code review
* [Bugfix] the texture coordinates are not setup properly for certain walls
* Added seperation between roofs and walls
* [Feature] texture coordinates rotation
* took back the seperation of texture rotation between walls and roofs because the user will be specifying them with different symbols anyway
* Fixed docs test not passing issue
* Fixed compilation problem
* Fixed compilation problem
* Executed sipify_all trying to fix test not passing issue
* [ui] Harmonize play button across the board
* [ui] Better network logger icon
* [ui] Harmonize loop widget of 3D map view
* [ui] Add a record icon and use it in the network logger panel
* [ui] Move icon-less network logger toolbar actions under settings menu
* [ui] Reflect playback stay in the 3D map view's play button
* Fix azure
* Use prefix increment operator to fix cppcheck warnings related to postfixOperator
* [afs] Read field aliases from layer definition
* Fix ui build warning
* [FEATURE][processing] Add modeler algorithm to set a project expression variable
Allows a model to set Project-level expression variables during execution. Especially
useful with the new Export Print Layout algorithms to allow models which dynamically set variables
used in a layout prior to export.
* Add test
* Refactoring according to code review
Co-authored-by: nirvn <nirvn.asia@gmail.com>
Co-authored-by: Even Rouault <even.rouault@spatialys.com>
Co-authored-by: Nyall Dawson <nyall.dawson@gmail.com>
Otherwise this provider cannot be initialized from standalone Python
scripts
Fixes#36661
Also cleanup 3d sip generation by correctly defining SIP_NO_FILE
in headers we don't want to expose, so that the sip_include script
can do its magic
Introduce a renderer for 1D mesh edges that can vary width over the line. The line can also have different color based on the actual dataset value on the line's point.
Co-authored-by: Peter Petrik <zilolv@gmail.com>
* Add button to change billboard symbol.
* Add shaders for billboards.
* Add billboard material class.
* Add sample billboard image.
* Add dummy handler for billboard.
* Add billboard geometry class.
* First working version of 3D point as billboard.
* Make selected feature bigger.
* Use default symbol preview as billboard.
* Update billboard when changes the viewport size.
* Use QgsTerrainTextureImage for adding image to texture.
* Show better quality of billboard default symbol.
* Promote QgsSymbolButton not working.
* Add QgsSymbolButton properly.
* Add seTexture2DFromSymbol.
* Use default symbol
* [On Progress] Get symbol from the QgsSymbolButton.
* [On progress] failed to change the symbol
* Fix billboard fragment shader for macOS
* Better transparency handling.
* Use size from the symbol.
* Add set layer for 3d billboard symbol.
* Set billboard size from the symbol pixel size * 20
* Use size from the image.
* [Debug] set white symbol to success kid, it work when previous billboard is success kid.
* Use store and restore symbol from Nyall.
* Remove unrelated code.
* Apply random extent to fix the bug, from Martin.
* Remove add mesh entities for billboard.
* Hide material and transformation widget for billboard.
* Remove add scene entities for billboard.
* Add selected as parameter in drawPreviewIcon.
* Add QgsMarkerSymbol to store the symbol in billboard
* Put billboard symbol in point3dsymbol serialization.
* Add billboard height in the UI.
* Set height for billboard.
* Store billboard height separately. Perhaps better to use existing transform.
* Set height of billboard to TY.
* Flipped image for billboard symbol.
* Add helper function to set billboard function.
* Generate billboard transform from general transform.
* Use static dpi for context size.
* Remove debug message.
* Use Qgs3DRenderContext for selection color and dpi from QgsApplication.
* Remove unnecessary file and code.
* Remove commented iut code.
* Add documentation of new classes.
* Fix banned keywords.
* Add missing parameter's documentation.
* Address PR review.
* Use context from readXML.
* Remove one line function.
* Fix billboard size.
* Make some functions private, remove unused function.
* Use unique_ptr for the ownership.
* Use unique_ptr for default symbol to avoid memory leak.
* Add parent to texture2D.
* Fix documentation.
* Add copy constructor.
* Fix documentation.
* Remove documentation warning.
* Fix sip error.
* Add unit test for billboard rendering.
* Set ambient to not transparent for measurement line.
* Add dpi in the Qgs3DMapSetting
* Update billboard rendering unit test.
* Remove layer from 3d point widget since it's not supported yet.
* Addressing PR review from Martin.
* Attach dom directly for the billboard symbol.
* Remove unused constructor for point3dsymbol.
* Use stroke width ratio for solving big stroke width.
* Update unit test for rendering with some stroke color.
* Fix typo.
For the c++ api dox this expands to "\c nullptr" (the
\c directive indicates a code literal value), and for sipify/Python
it expands to ``None`` (`` is sphinx annotation for literal values)
Makes for nicer dox for both c++ and Python!
This adds new options for user to choose how the terrain should be rendered:
- shading disabled - color of terrain is determined only from map texture
- shading enabled - color of terrain is determined using Phong's shading model,
taking into account map texture, terrain normal vector, scene light(s) and
terrain material's ambient+specular colors and shininess
(configuration of lights is not there yet - now we always have a single point
light with white color at the middle of the scene at 1km above the zero elevation)