eradiate.scenes.atmosphere.Atmosphere#
- class eradiate.scenes.atmosphere.Atmosphere(id='atmosphere', geometry='plane_parallel')[source]#
Bases:
CompositeSceneElement
,ABC
Abstract base class defining common facilities for all atmospheres.
An atmosphere expands as a
mitsuba.PhaseFunction
, amitsuba.Medium
and amitsuba.Shape
.- Parameters:
id (
str
, optional, default:"atmosphere"
) – Identifier of the current scene element.geometry (
SceneGeometry
ordict
orstr
, optional, default:"plane_parallel"
) – Parameters defining the basic geometry of the scene.
- Fields:
geometry (
SceneGeometry
) – Parameters defining the basic geometry of the scene.
- abstract eval_mfp(ctx)[source]#
Compute a typical scattering mean free path. This rough estimate can be used e.g. to compute a distance guaranteeing that the medium can be considered optically thick.
- Parameters:
ctx (
KernelDictContext
) – A context data structure containing parameters relevant for kernel dictionary generation.- Returns:
mfp (
quantity
) – Mean free path estimate.
- traverse(callback)#
Traverse this scene element and collect kernel dictionary template and parameter update map contributions.
- Parameters:
callback (
SceneTraversal
) – Callback data structure storing the collected data.
- update()#
Enforce internal state consistency. This method should be called when fields are modified. It is automatically called as a post-init step.
- property medium_id#
- Returns:
str
– ID of the medium associated with the atmosphere in the Mitsuba scene tree.
- property objects#
Map of child objects associated with this scene element.
- Returns:
dict
– A dictionary mapping object names to a corresponding object to be inserted in the Eradiate scene graph.
- property params#
- Returns:
dict[str
,UpdateParameter
] orNone
– A dictionary mapping parameter paths, consisting of dot-separated strings, to a corresponding update protocol.
See also
- abstract property phase#
- Returns:
PhaseFunction
– Phase function associated with the atmosphere.
- property phase_id#
- Returns:
str
– ID of the phase function associated with the atmosphere in the Mitsuba scene tree.
- property shape#
- Returns:
Shape
– Shape associated with this atmosphere, based on the scene geometry.
- property shape_id#
- Returns:
str
– ID of the shape associated with the atmosphere in the Mitsuba scene tree.
- property template#
Kernel dictionary template contents associated with this scene element.
- Returns:
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 themitsuba.load_dict()
function, orInitParameter
instances which must be rendered.
See also