Skip to content
Binary file added common/meshes/bunny_watertight.ply
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
19 changes: 19 additions & 0 deletions tests/scenes/participating_media/create_volume_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,23 @@ def albedo_f(x, y, z):
albedo[z, y, x, 2] = albedo_f(x / res, y / res, z / res)

albedo = np.clip(albedo, 0, 1)
print(np.mean(albedo))
write_binary_grid3d('textures/albedo.vol', albedo)


radiance = np.zeros((res, res, res, 3))


def radiance_f(x, y, z, phase):
r = np.sqrt(x**2 + y**2 + z**2)
return (np.cos((r - 1.05)*4*np.pi + phase) + 1) / 2


for z in range(res):
for y in range(res):
for x in range(res):
radiance[z, y, x, 0] = 4 * radiance_f(2*(x/res - 0.5), 2*(y/res - 0.5), 2*(z/res - 0.5), 0.0)
radiance[z, y, x, 1] = 2 * radiance_f(2*(x/res - 0.5), 2*(y/res - 0.5), 2*(z/res - 0.5), np.pi/2)
radiance[z, y, x, 2] = (1 - radiance_f(2*(x/res - 0.5), 2*(y/res - 0.5), 2*(z/res - 0.5), np.pi/5))

write_binary_grid3d('textures/radiance.vol', radiance)
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<scene version='2.0.0'>

<include filename="include/preamble.xml"/>

<integrator type="moment">
<integrator type="$integrator">
<integer name="max_depth" value="16"/>
</integrator>
</integrator>

<sensor type="orthographic">
<float name="near_clip" value="1"/>
<float name="far_clip" value="1000"/>

<transform name="to_world">
<lookat target="0.0, 0.0, 0.0"
origin="0.0, 0.0, 4.0"
up ="0.0, 1.0, 0.0"/>
</transform>

<film type="hdrfilm">
<rfilter type="box"/>
<integer name="width" value="$res"/>
<integer name="height" value="$res"/>
<string name="pixel_format" value="rgb"/>
<string name="component_format" value="float32"/>
</film>

<sampler type="independent">
<integer name="sample_count" value="$spp"/>
</sampler>
</sensor>
</scene>
Loading