Difference between revisions of "QGIS 3D Animations"
Line 16: | Line 16: | ||
<br> | <br> | ||
− | = | + | =Method= |
− | + | ==Configure the QGIS Workspace== | |
+ | Configure the QGIS workspace and display the depth (d) datasets. The same process can be followed for other output datasets. | ||
<ol> | <ol> | ||
<li>Load the '''DEM.tif''' into the QGIS workspace. | <li>Load the '''DEM.tif''' into the QGIS workspace. | ||
− | <li> | + | <li>Open the TUFLOW Viewer from the TUFLOW plugin toolbar: <br> |
− | <li> | + | <br> |
+ | [[File:tuflow_plugin_tuflow_viewer.png]]<br> | ||
+ | <br> | ||
+ | <li> Open the 2D model results. Go to 'File' > 'Load Results - Map Outputs' from the TUFLOW Viewer menu options and navigate to the '''*.xmdf''' results file (e.g. '''TUFLOW\results\M01_5m_001.xmdf'''). For more information on loading map outputs, please refer to <u>[[TUFLOW_Viewer_-_Load_Results_-_Map_Outputs | TUFLOW Viewer - Load Results - Map Outputs]].</u> | ||
+ | <li>Click on a scalar dataset 'Depth' under the Result Type in the TUFLOW Viewer 'Map Outputs' list. | ||
+ | <li>Update the map styling as desired. In this example, the 'Blues' colour ramp has been selected and the temporal bar has been adjusted to show depth results near the peak of the event. <br> | ||
+ | '''Note:''' For more details on map styling, please refer to <u>[[TUFLOW_Viewer_-_Map_Outputs_-_Styling_Scalar_Types | TUFLOW Viewer - Map Outputs - Styling Scalar Types]].</u><br> | ||
+ | <br> | ||
+ | [[File:QGIS 3D ani 1.png||800px]] | ||
+ | <br> | ||
</ol> | </ol> | ||
− | |||
− | |||
− | =Configure DEM in 3D Map View= | + | ==Configure DEM in 3D Map View== |
+ | Create a new 3D map view and configure the DEM to display as a 3D Mesh. | ||
<ol> | <ol> | ||
− | <li> | + | <li> In the top dropdown menu options, go to View > 3D Map Views > New 3D Map View. |
+ | <br> | ||
[[File:New 3d mapview.jpg||500px]]<br> | [[File:New 3d mapview.jpg||500px]]<br> | ||
− | The following 3D Map View window will | + | <br> |
− | [[File:3d mapview window.png]]<br><br> | + | <li> The following 3D Map View window will open: <br> |
− | + | <br> | |
− | + | [[File:3d mapview window.png]]<br> | |
− | <li> | + | <br> |
− | * | + | <li>Configure the DEM to display as a 3D mesh: |
− | * | + | * Select 'Zoom Full' [[File:Zoom full icon.png]] to center the map view on to the DEM. |
− | + | * Select 'Options' [[File:Settings icon.png]] > 'Configure'. A '3D Configuration' window will open. Select the 'Terrain' tab and enable the following settings (leave all other settings as default): | |
** Type: Mesh | ** Type: Mesh | ||
** Elevation: M01_5m_001 | ** Elevation: M01_5m_001 | ||
− | ** Smooth triangles | + | ** Tick on 'Smooth triangles' |
− | ** | + | ** Rendering style: Color Ramp Shader |
− | ** Color ramp: Greys >> Invert Color Ramp | + | ** Color ramp: Greys >> Invert Color Ramp <br> |
− | ** Click OK | + | [[image of things to click to get colour ramp]] |
− | [[File:3d DEM config.png|800px]] | + | ** Click OK <br> |
− | < | + | <br> |
− | + | [[File:3d DEM config.png|800px]]<br> | |
− | The | + | <br> |
+ | <li>The 3D Map View now displays the 3D surface:<br> | ||
+ | <br> | ||
+ | [[File:3d mapview DEM.png|400px]]<br> | ||
<br> | <br> | ||
− | [ | + | '''Note:''' For more information on navigating within the 3D map view, please refer to <u>[https://docs.qgis.org/3.34/en/docs/user_manual/map_views/3d_map_view.html#navigation-options QGIS Documentation - 3D Map View, Navigation Options].</u> |
− | |||
</ol> | </ol> | ||
− | =Load Results in 3D Map View= | + | ==Load Results in 3D Map View== |
− | + | Load the maximum depth results in to the 3D Map View. | |
<ol> | <ol> | ||
− | <li> | + | <li>In the QGIS Layers panel, right click the results layer and select 'Properties...'<br> |
− | [[File:Open layer properties.png]] < | + | <br> |
− | <li> | + | [[File:Open layer properties.png]]<br> |
− | * Enable 3D Renderer | + | <br> |
− | * | + | <li>In the 3D View tab, enable the following settings (leave all other settings as default): |
− | * Dataset group for vertical value: | + | * Tick on 'Enable 3D Renderer' |
+ | * Tick on 'Smooth Triangles' | ||
+ | * Dataset group for vertical value: Depth/Maximums | ||
* Rendering style: "2D Contour Color Ramp Shader" | * Rendering style: "2D Contour Color Ramp Shader" | ||
− | * Click OK | + | * Click OK <br> |
− | [[File:Results 3DView settings.png|none]] | + | <br> |
− | + | [[File:Results 3DView settings.png|none]]<br> | |
− | + | <br> | |
− | <li> Open the 3D Map | + | <li> Open the 3D Map View to view the 3D Water Level results and terrain. |
− | [[File:3Dview results.png|none]] | + | [[File:3Dview results.png|none]]<br> |
− | Note | + | <br> |
− | + | '''Note:''' The "2D Contour Color Ramp Shader" rendering style option sets the symbology of the results to replicate the current symbology in the current 2D map view. For this example, the depth results in the 3D map view reflects the depth map output symbology. | |
− | |||
</ol> | </ol> | ||
− | = | + | ==Create a 3D Animation== |
To create an animation, refer to instructions published on the QGIS website: [https://docs.qgis.org/3.34/en/docs/user_manual/map_views/3d_map_view.html#creating-an-animation Creating an animation]. | To create an animation, refer to instructions published on the QGIS website: [https://docs.qgis.org/3.34/en/docs/user_manual/map_views/3d_map_view.html#creating-an-animation Creating an animation]. | ||
Revision as of 12:19, 22 January 2025
Page Under Construction
Introduction
This page outlines the process for creating a 3D animation using QGIS. QGIS version 3.34.1 has been used for this example.
Required Data
To create a 3D animation in QGIS, the following files are required as a minimum:
- Digital Elevation Model (DEM) or TIN; and
- 2D Model Results.
Note: Additional files may also be used to enhance the animation.
This example uses the DEM and 2D results from Tutorial Module 1. The complete model is available from Tutorial Introduction.
Method
Configure the QGIS Workspace
Configure the QGIS workspace and display the depth (d) datasets. The same process can be followed for other output datasets.
- Load the DEM.tif into the QGIS workspace.
- Open the TUFLOW Viewer from the TUFLOW plugin toolbar:
- Open the 2D model results. Go to 'File' > 'Load Results - Map Outputs' from the TUFLOW Viewer menu options and navigate to the *.xmdf results file (e.g. TUFLOW\results\M01_5m_001.xmdf). For more information on loading map outputs, please refer to TUFLOW Viewer - Load Results - Map Outputs.
- Click on a scalar dataset 'Depth' under the Result Type in the TUFLOW Viewer 'Map Outputs' list.
- Update the map styling as desired. In this example, the 'Blues' colour ramp has been selected and the temporal bar has been adjusted to show depth results near the peak of the event.
Note: For more details on map styling, please refer to TUFLOW Viewer - Map Outputs - Styling Scalar Types.
Configure DEM in 3D Map View
Create a new 3D map view and configure the DEM to display as a 3D Mesh.
- In the top dropdown menu options, go to View > 3D Map Views > New 3D Map View.
- The following 3D Map View window will open:
- Configure the DEM to display as a 3D mesh:
- Select 'Zoom Full'
to center the map view on to the DEM.
- Select 'Options'
> 'Configure'. A '3D Configuration' window will open. Select the 'Terrain' tab and enable the following settings (leave all other settings as default):
- Type: Mesh
- Elevation: M01_5m_001
- Tick on 'Smooth triangles'
- Rendering style: Color Ramp Shader
- Color ramp: Greys >> Invert Color Ramp
- Click OK
- Click OK
- Select 'Zoom Full'
- The 3D Map View now displays the 3D surface:
Note: For more information on navigating within the 3D map view, please refer to QGIS Documentation - 3D Map View, Navigation Options.
Load Results in 3D Map View
Load the maximum depth results in to the 3D Map View.
- In the QGIS Layers panel, right click the results layer and select 'Properties...'
- In the 3D View tab, enable the following settings (leave all other settings as default):
- Tick on 'Enable 3D Renderer'
- Tick on 'Smooth Triangles'
- Dataset group for vertical value: Depth/Maximums
- Rendering style: "2D Contour Color Ramp Shader"
- Click OK
- Open the 3D Map View to view the 3D Water Level results and terrain.
Note: The "2D Contour Color Ramp Shader" rendering style option sets the symbology of the results to replicate the current symbology in the current 2D map view. For this example, the depth results in the 3D map view reflects the depth map output symbology.
Create a 3D Animation
To create an animation, refer to instructions published on the QGIS website: Creating an animation.
Additional Resources
The Qgis2threejs plugin can also be used to create a 3D map view and animation. For more details, see Qgis2threejs Plugin Document
Up |
---|
![]() |