Skip to content

Commit ef4aad6

Browse files
committed
update docs
1 parent b9bb6d0 commit ef4aad6

File tree

2 files changed

+27
-11
lines changed

2 files changed

+27
-11
lines changed

plotoptix/enums.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,9 @@ class MissProgram(Enum):
2525
2626
Miss program is executed when ray segment is not intersecting any object
2727
at a defined maximum distance. Radiance assigned to the ray by the miss
28-
program appears as a color of the background (e.g. on primary segments)
29-
or environmental light color (segments scattered off a diffuse surfaces).
28+
program appears as a color of the background (i.e. on primary segments)
29+
or environmental light color (segments scattered off a diffuse surfaces)
30+
or sub-surface color (segments scattered inside volumes).
3031
3132
See Also
3233
--------

plotoptix/materials.py

Lines changed: 24 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"OcclusionProgram": "materials7.ptx::__closesthit__occlusion",
1313
}
1414
"""
15-
Super-fast material, color is not shaded anyhow. Use color components range <0; 1>.
15+
Super-fast material, color is not shaded anyhow. Use color components range ``<0; 1>``.
1616
"""
1717

1818
m_eye_normal_cos = {
@@ -21,7 +21,7 @@
2121
}
2222
"""
2323
Fast material, color is shaded by the cos(eye-hit-normal). Use color components range
24-
<0; 1>.
24+
``<0; 1>``.
2525
"""
2626

2727
m_diffuse = {
@@ -31,7 +31,7 @@
3131
}
3232
"""
3333
Lambertian diffuse material. Note it is available by default under the name "diffuse".
34-
Use color components range <0; 1>.
34+
Use color components range ``<0; 1>``.
3535
"""
3636

3737
m_matt_diffuse = {
@@ -41,7 +41,7 @@
4141
"VarFloat": { "base_roughness": 1 }
4242
}
4343
"""
44-
Oren-Nayar diffuse material. Surface roughness range is <0; inf), 0 is equivalent to
44+
Oren-Nayar diffuse material. Surface roughness range is ``<0; inf)``, 0 is equivalent to
4545
the Lambertian "diffuse" material.
4646
"""
4747

@@ -68,7 +68,7 @@
6868
Reflective mirror, quite simple to calculate and therefore fast material. Note, this material
6969
has default values: ``reflectivity_index = 1`` and ``reflectivity_range = 1``. In this configuration
7070
the shading algorithm overrides ``surface_albedo`` with the color assigned to each primitive (RGB
71-
range <0; 1>), which results with colorized reflections.
71+
range ``<0; 1>``), which results with colorized reflections.
7272
"""
7373

7474
m_metallic = {
@@ -168,7 +168,12 @@
168168
}
169169
"""
170170
Glass, with reflection and refraction simulated. Color components meaning is "attenuation length"
171-
and the color range is <0; inf>.
171+
and the color range is <0; inf>. Set ``radiation_length > 0`` to enable sub-surface scattering. It
172+
is supported in background modes :attr:`plotoptix.enums.MissProgram.AmbientAndVolume`,
173+
:attr:`plotoptix.enums.MissProgram.TextureFixed` and :attr:`plotoptix.enums.MissProgram.TextureEnvironment`,
174+
see also :meth:`plotoptix.NpOptiX.set_background_mode`. Use ``subsurface_color`` to set diffuse color of
175+
scattering (RGB components range should be ``<0; 1>``). Volumes can emit light in ``subsurface_color``
176+
if ``light_emission > 0``.
172177
"""
173178

174179
m_matt_glass = {
@@ -188,7 +193,12 @@
188193
}
189194
"""
190195
Glass with surface roughness configured to obtain matt appearance. Color components meaning is
191-
"attenuation length" and the color range is <0; inf>.
196+
"attenuation length" and the color range is <0; inf>. Set ``radiation_length > 0`` to enable
197+
sub-surface scattering. It is supported in background modes :attr:`plotoptix.enums.MissProgram.AmbientAndVolume`,
198+
:attr:`plotoptix.enums.MissProgram.TextureFixed` and :attr:`plotoptix.enums.MissProgram.TextureEnvironment`,
199+
see also :meth:`plotoptix.NpOptiX.set_background_mode`. Use ``subsurface_color`` to set diffuse color of
200+
scattering (RGB components range should be ``<0; 1>``). Volumes can emit light in ``subsurface_color``
201+
if ``light_emission > 0``.
192202
"""
193203

194204
m_dispersive_glass = {
@@ -208,7 +218,12 @@
208218
"""
209219
Clear glass, with reflection and refraction simulated. Refraction index is varying with the wavelength,
210220
resulting with the light dispersion. Color components meaning is "attenuation length"
211-
and the range is <0; inf>.
221+
and the range is <0; inf>. Set ``radiation_length > 0`` to enable sub-surface scattering. It
222+
is supported in background modes :attr:`plotoptix.enums.MissProgram.AmbientAndVolume`,
223+
:attr:`plotoptix.enums.MissProgram.TextureFixed` and :attr:`plotoptix.enums.MissProgram.TextureEnvironment`,
224+
see also :meth:`plotoptix.NpOptiX.set_background_mode`. Use ``subsurface_color`` to set diffuse color of
225+
scattering (RGB components range should be ``<0; 1>``). Volumes can emit light in ``subsurface_color``
226+
if ``light_emission > 0``.
212227
"""
213228

214229
m_thin_walled = {
@@ -226,5 +241,5 @@
226241
"""
227242
Ideal for the soap-like bubbles. Reflection amount depends on the refraction index, however, there is
228243
no refraction on crossing the surface. Reflections can be textured or colorized with the primitive
229-
colors, and the color values range is <0; inf>.
244+
colors, and the color values range is ``<0; inf)``.
230245
"""

0 commit comments

Comments
 (0)