class eradiate.scenes.surface.DEMSurface(id='terrain', *, shape=None, shape_background=None)[source]#

Bases: Surface

DEM Surface [dem]

A mesh based representation of surface DEMs.

  • id (str, optional, default: "surface") – Identifier of the current scene element.

  • shape (BufferMeshShape or OBJMeshShape or PLYMeshShape or dict, default: None) – Shape describing the surface.

  • shape_background (SphereShape or RectangleShape or dict, optional, default: None) – Shape describing the background surface.

classmethod from_mesh(mesh, lat, lon, id='surface', geometry=None, planet_radius=None, bsdf=None)[source]#

Construct a DEMSurface from a mesh object and coordinates which specify its location.

  • mesh (BufferMeshShape or FileMeshShape) – DEM as a triangulated mesh.

  • lat (pint.Quantity) – Limits of the latitude range covered by the DEM.

  • lon (pint.Quantity) – Limits of the longitude range covered by the DEM.

  • id (str, optional, default: "surface") – Identifier of the scene element.

  • geometry (SceneGeometry, optional, default: PlaneParallelGeometry()) – Atmospheric geometry of the scene.

  • planet_radius (pint.Quantity, optional, default: EARTH_RADIUS) – Planet radius. Used only in case of a plane parallel geometry to convert between latitude/longitude and x/y coordinates.

  • bsdf (BSDF, optional, default: LambertianBSDF()) – Scattering model attached to the surface.




Traverse this scene element and collect kernel dictionary template and parameter update map contributions.


callback (SceneTraversal) – Callback data structure storing the collected data.


Enforce internal state consistency. This method should be called when fields are modified. It is automatically called as a post-init step.

property objects#

Map of child objects associated with this scene element.


dict – A dictionary mapping object names to a corresponding object to be inserted in the Eradiate scene graph.

property params#

dict[str, UpdateParameter] or None – A dictionary mapping parameter paths, consisting of dot-separated strings, to a corresponding update protocol.

property template#

Kernel dictionary template contents associated with this scene element.


dict – A flat dictionary mapping dot-separated strings describing the path of an item in the nested scene dictionary to values. Values may be objects which can be directly used by the mitsuba.load_dict() function, or InitParameter instances which must be rendered.