-
Notifications
You must be signed in to change notification settings - Fork 2
Creating a Geologic Model Using Gempy
bsomps edited this page Mar 1, 2025
·
34 revisions
This operator uses the GemPy v3 module to compute geological surfaces from orientation and formation data. The workflow integrates with Blender's georeferenced 3D environment, allowing users to create geologically and spatially accurate models.
Gempy_example.mp4
Gempy_example2.mp4
gempy_example4.mp4
- Set model extents using a cube object in the Blender scene.
- Define formations and orientations based on objects in specified collections.
- Organize formations into stratigraphic or fault series with customizable relations.
- Generate surfaces (and lith blocks) for each stratigraphic or fault series using the GemPy engine.
-
Georeferenced Extents: Define model boundaries using a cube object to set
xmin
,xmax
,ymin
,ymax
,zmin
, andzmax
. - Formation and Orientation Data: Extract custom properties (e.g., azimuth, dip) from objects to create input CSV files for GemPy.
-
Series Management: Organize formations into stratigraphic or fault series, with user-defined order and relations (e.g.,
Erode
,Onlap
,Basement
). - Surface Generation: Compute and visualize geologic surfaces directly in Blender.
- Lith Block Generation Check box of optional creation of lith blocks
- Use the drill hole importer or point data importer to add your data into the Blender scene.
- Input data can be either curve object collections (drill hole interval data) or mesh objects collections (point data).
- If point or interval data is brought in with fields (ie columns in your CSV)
azimuth
,dip
, andpolarity
then your custom properties in Blender will reflect these values, if not, thenazimuth
,dip
, andpolarity
fields will auto-populate with azimuth=0, dip=0, and polarity=1. Thename
field can be generated using the manager operator. For example, if you stylize your objects based on the a categorical property calledrock type
then thisrock type
name will become the name in the outliner.
- Create a cube object in the scene and position it to enclose the area of interest. TIP -- Set the cube object to appear as wireframe so you can see what it encompasses.
- Select the cube in the "GemPy Modeller" panel as the Extents Object.
- The cube's bounding box will define the model extents (xmin, xmax, ymin, ymax, zmin, zmax).
- Name the model (can use spaces)
- Define a level of refinement (recommendation = 6). Higher refinement levels increase computational costs.
- Under
Data Uses
choose either dip direction (i.e. azimuth) or right-hand rule (i.e. strike) - important to choose this before step #4
- In the "GemPy Modeller" panel, choose collections containing formation objects and orientation objects (These can be the same collection):
-
Formations Collection: Mesh or curve objects representing the positions of the base of geological formations. (for example if
Sandstone
contactsSiltstone
along its lower contact, andLimestone
along its upper contact, the xyz location forSandstone
is where it contactsSiltstone
) Note that the code generate a CSV compatible with GemPy based on the selected collection. This means each object will become a row in the CSV file and derive thename
from the name presented in the outliner, thex
,y
, andz
location from the true xyz location in blender. -
Orientations Collection: Objects with custom properties (
azimuth
,dip
,polarity
) representing structural orientations. Note that the code generate a CSV compatible with GemPy based on the selected collection. This means each object will become a row in the CSV file and derive thename
from the name presented in the outliner, thex
,y
, andz
location from the true xyz location in blender., and theazimuth
,dip
andpolarity
from the custom properties.
-
Formations Collection: Mesh or curve objects representing the positions of the base of geological formations. (for example if
- Check your console to view where the generated CSV file was saved. Your CSV file(s) should have these exact header names;
for formations:
formation | x | y | z |
---|
For Orientations (or formations and orientations as one):
formation | x | y | z | azimuth | dip | polarity |
---|
NOTE you'll notice in your outliner that if you have 10 objects named 'Sandstone' that they will appear Sandstone.001, Sandstone.002, Sandstone.003 ect.. this is OK, when the code generates the CSV for GemPy, it removes all concatenated numbers so they will appear as just 'Sandstone'
- Add Stratigraphic Series or Fault Series:
- Stratigraphic series can be set to
Erode
,Onlap
, orBasement
. - Fault series are automatically categorized as
Fault
.
- Stratigraphic series can be set to
- Specify the order of each series to represent geologic time (0 = youngest).
- Use the check boxes in the panel to assign formations to each series.
- Click the Compute Model button to generate geological surfaces.
- GemPy will calculate surfaces based on the input extents, formations, orientations, and series relations.
- The computed surfaces are added as mesh objects to a new collection in Blender.
- If selected, the lith blocks are added as mesh objects to the scene and collection.
- Each surface/lith block mesh is assigned a unique material with colors derived from the GemPy series.
- Remember to check the structural frame in the console window to verify input parameters.
- Refinement Levels: Adjust refinement (default = 6) for smoother or coarser surfaces.
- Fault Relations: Fault relations are dynamically created based on series order.
-
Console Feedback: Check the Blender Console (
Window → Toggle System Console
) to view the stack relations and other details during model computation.
- Ensure all objects in the selected collections have the necessary custom properties (
azimuth
,dip
,polarity
) filled out correctly. - Ensure clear and consistent naming to simplify organization. Always check your
formations
andorientations
collections to ensure naming looks correct and no other objects ended up in the collection before computation If manually selecting points to use for modelling, move them all to a collection and useBatch Rename
as you see fit (Edit -> Batch Rename). - When adjusting azimuth, dip or polarity fields within Blender's UI, you can copy any items custom properties to all that you have selected (right click -> copy to selected)
- Work with small-to-moderate-sized datasets for optimal performance. large one will have long processing times.
- Take advantage of Blender's extensive editing options once the surfaces are generated (smoothing, re-color, move vertices, boolean clips ect..)
For more details about GemPy, visit the GemPy documentation.