Shapes¶
The Eradiate kernel provides two shape plugins:
arectangle— an axis-aligned rectangle shape, equivalent to Mitsuba’srectanglebut with additional support for Eradiate’s atmospheric scene geometry conventions.instancelist— efficiently instantiates a large collection of identical subsets of a scene geometry (e.g. a canopy of identical trees) by referencing a shared shape group with many per-instance transforms.
Analytical rectangle (arectangle)¶
Parameter |
Type |
Description |
Flags |
|---|---|---|---|
flip_normals |
boolean |
Is the rectangle inverted, i.e. should the normal vectors be flipped? (Default: false) |
|
to_world |
transform |
Specifies a linear object-to-world transformation. (Default: none (i.e. object space = world space)) |
P, ∂, D |
silhouette_sampling_weight |
float |
Weight associated with this shape when sampling silhouettes in the scene. (Default: 1) |
P |
This shape plugin describes a simple rectangular shape primitive. It is mainly provided as a convenience for those cases when creating and loading an external mesh with two triangles is simply too tedious, e.g. when an area light source or a simple ground plane are needed. By default, the rectangle covers the XY-range \([-1,1]\times[-1,1]\) and has a surface normal that points into the positive Z-direction. To change the rectangle scale, rotation, or translation, use the to_world parameter.
The following XML snippet showcases a simple example of a textured rectangle:
<shape type="rectangle">
<bsdf type="diffuse">
<texture name="reflectance" type="checkerboard">
<transform name="to_uv">
<scale x="5" y="5" />
</transform>
</texture>
</bsdf>
</shape>
'type': 'rectangle',
'material': {
'type': 'diffuse',
'reflectance': {
'type': 'checkerboard',
'to_uv': mi.ScalarTransform4f().scale([5, 5, 1])
}
}
InstanceList (instancelist)¶
Parameter |
Type |
Description |
Flags |
|---|---|---|---|
(Nested plugin) |
shapegroup |
A reference to a shape group that should be instantiated. |
|
transforms |
tensor |
Specifies a buffer of object-to-world transformations of shape [N,4,4] with N being the number of instances. |
P |
This is utility plugins allows to create multiple instances of a shape group
from a buffer of object-to-world transforms. For details on how to create
instances, refer to the shapegroup and instance plugins from Mitsuba’s core plugin library.