Skip to content

Commit

Permalink
Added support for reference .spd files as textures
Browse files Browse the repository at this point in the history
Switched color parameters from being treated as sRGB values to be treated as linear RGB. This will change rendered results.
Updated example renders and scenes to reflect switch from sRGB to linear RGB for parameter values.
Added example scene showing texture and .spd file use.
  • Loading branch information
hpd committed Oct 27, 2018
1 parent 72356a5 commit 3a129b6
Show file tree
Hide file tree
Showing 63 changed files with 1,263 additions and 202 deletions.
Binary file modified maya/images/mitsuba_material_blend.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified maya/images/mitsuba_material_conductor.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified maya/images/mitsuba_material_dielectric.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified maya/images/mitsuba_material_diffuse.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified maya/images/mitsuba_material_diffuse_transmitter.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified maya/images/mitsuba_material_hk.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified maya/images/mitsuba_material_homogeneous.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified maya/images/mitsuba_material_mixture.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified maya/images/mitsuba_material_phong.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified maya/images/mitsuba_material_plastic.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified maya/images/mitsuba_material_rough_coating.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified maya/images/mitsuba_material_rough_conductor.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified maya/images/mitsuba_material_rough_dielectric.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified maya/images/mitsuba_material_rough_diffuse.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified maya/images/mitsuba_material_rough_plastic.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified maya/images/mitsuba_material_smooth_coating.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified maya/images/mitsuba_material_sss_dipole.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified maya/images/mitsuba_material_ward.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
62 changes: 62 additions & 0 deletions maya/renderData/__pPlane1.obj
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# This file uses centimeters as units for non-parametric coordinates.

g default
v 7.000000 -1.897777 -5.776457
v 5.000000 -1.897777 -5.776457
v 3.000000 -1.897777 -5.776457
v 1.000000 -1.897777 -5.776457
v 7.000000 0.034074 -5.258819
v 5.000000 0.034074 -5.258819
v 3.000000 0.034074 -5.258819
v 1.000000 0.034074 -5.258819
v 7.000000 1.965926 -4.741181
v 5.000000 1.965926 -4.741181
v 3.000000 1.965926 -4.741181
v 1.000000 1.965926 -4.741181
v 7.000000 3.897777 -4.223543
v 5.000000 3.897777 -4.223543
v 3.000000 3.897777 -4.223543
v 1.000000 3.897777 -4.223543
vt 0.000000 0.000000
vt 0.333333 0.000000
vt 0.666667 0.000000
vt 1.000000 0.000000
vt 0.000000 0.333333
vt 0.333333 0.333333
vt 0.666667 0.333333
vt 1.000000 0.333333
vt 0.000000 0.666667
vt 0.333333 0.666667
vt 0.666667 0.666667
vt 1.000000 0.666667
vt 0.000000 1.000000
vt 0.333333 1.000000
vt 0.666667 1.000000
vt 1.000000 1.000000
vn 0.000000 0.258819 -0.965926
vn 0.000000 0.258819 -0.965926
vn 0.000000 0.258819 -0.965926
vn 0.000000 0.258819 -0.965926
vn 0.000000 0.258819 -0.965926
vn 0.000000 0.258819 -0.965926
vn 0.000000 0.258819 -0.965926
vn 0.000000 0.258819 -0.965926
vn 0.000000 0.258819 -0.965926
vn 0.000000 0.258819 -0.965926
vn 0.000000 0.258819 -0.965926
vn 0.000000 0.258819 -0.965926
vn 0.000000 0.258819 -0.965926
vn 0.000000 0.258819 -0.965926
vn 0.000000 0.258819 -0.965926
vn 0.000000 0.258819 -0.965926
s 1
g pPlane1
f 1/1/1 2/2/2 6/6/3 5/5/4
f 2/2/2 3/3/5 7/7/6 6/6/3
f 3/3/5 4/4/7 8/8/8 7/7/6
f 5/5/4 6/6/3 10/10/9 9/9/10
f 6/6/3 7/7/6 11/11/11 10/10/9
f 7/7/6 8/8/8 12/12/12 11/11/11
f 9/9/10 10/10/9 14/14/13 13/13/14
f 10/10/9 11/11/11 15/15/15 14/14/13
f 11/11/11 12/12/12 16/16/16 15/15/15
62 changes: 62 additions & 0 deletions maya/renderData/__pPlane2.obj
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# This file uses centimeters as units for non-parametric coordinates.

g default
v -1.000000 -1.897777 -5.776457
v -3.000000 -1.897777 -5.776457
v -5.000000 -1.897777 -5.776457
v -7.000000 -1.897777 -5.776457
v -1.000000 0.034074 -5.258819
v -3.000000 0.034074 -5.258819
v -5.000000 0.034074 -5.258819
v -7.000000 0.034074 -5.258819
v -1.000000 1.965926 -4.741181
v -3.000000 1.965926 -4.741181
v -5.000000 1.965926 -4.741181
v -7.000000 1.965926 -4.741181
v -1.000000 3.897777 -4.223543
v -3.000000 3.897777 -4.223543
v -5.000000 3.897777 -4.223543
v -7.000000 3.897777 -4.223543
vt 0.000000 0.000000
vt 0.333333 0.000000
vt 0.666667 0.000000
vt 1.000000 0.000000
vt 0.000000 0.333333
vt 0.333333 0.333333
vt 0.666667 0.333333
vt 1.000000 0.333333
vt 0.000000 0.666667
vt 0.333333 0.666667
vt 0.666667 0.666667
vt 1.000000 0.666667
vt 0.000000 1.000000
vt 0.333333 1.000000
vt 0.666667 1.000000
vt 1.000000 1.000000
vn 0.000000 0.258819 -0.965926
vn 0.000000 0.258819 -0.965926
vn 0.000000 0.258819 -0.965926
vn 0.000000 0.258819 -0.965926
vn 0.000000 0.258819 -0.965926
vn 0.000000 0.258819 -0.965926
vn 0.000000 0.258819 -0.965926
vn 0.000000 0.258819 -0.965926
vn 0.000000 0.258819 -0.965926
vn 0.000000 0.258819 -0.965926
vn 0.000000 0.258819 -0.965926
vn 0.000000 0.258819 -0.965926
vn 0.000000 0.258819 -0.965926
vn 0.000000 0.258819 -0.965926
vn 0.000000 0.258819 -0.965926
vn 0.000000 0.258819 -0.965926
s 1
g pPlane2
f 1/1/1 2/2/2 6/6/3 5/5/4
f 2/2/2 3/3/5 7/7/6 6/6/3
f 3/3/5 4/4/7 8/8/8 7/7/6
f 5/5/4 6/6/3 10/10/9 9/9/10
f 6/6/3 7/7/6 11/11/11 10/10/9
f 7/7/6 8/8/8 12/12/12 11/11/11
f 9/9/10 10/10/9 14/14/13 13/13/14
f 10/10/9 11/11/11 15/15/15 14/14/13
f 11/11/11 12/12/12 16/16/16 15/15/15
14 changes: 7 additions & 7 deletions maya/renderData/mitsuba_material_blend.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@

<emitter type="sunsky">
<float name="turbidity" value="3.0"/>
<srgb name="albedo" value="0.15000000596 0.15000000596 0.15000000596"/>
<rgb name="albedo" value="0.0154 0.0154 0.0154"/>
<integer name="year" value="2010"/>
<integer name="month" value="7"/>
<integer name="day" value="10"/>
Expand All @@ -57,12 +57,12 @@
<bsdf type="conductor">
<string name="material" value="Mo"/>
<float name="extEta" value="1.0"/>
<srgb name="specularReflectance" value="1.0 1.0 1.0"/>
<rgb name="specularReflectance" value="1.0 1.0 1.0"/>
</bsdf>
</bsdf>
<bsdf type="twosided">
<bsdf type="diffuse">
<srgb name="reflectance" value="0.5 0.5 0.5"/>
<rgb name="reflectance" value="0.214036867023 0.214036867023 0.214036867023"/>
</bsdf>
</bsdf>
</bsdf>
Expand All @@ -71,20 +71,20 @@
<bsdf type="conductor">
<string name="material" value="none"/>
<float name="extEta" value="1.0"/>
<srgb name="specularReflectance" value="1.0 1.0 1.0"/>
<rgb name="specularReflectance" value="1.0 1.0 1.0"/>
</bsdf>
</bsdf>

<bsdf type="twosided" id="MitsubaDiffuseShader1">
<bsdf type="diffuse">
<srgb name="reflectance" value="0.5 0.5 0.5"/>
<rgb name="reflectance" value="0.214036867023 0.214036867023 0.214036867023"/>
</bsdf>
</bsdf>

<bsdf type="twosided" id="MitsubaRoughPlasticShader1">
<bsdf type="roughplastic">
<srgb name="specularReflectance" value="1.0 1.0 1.0"/>
<srgb name="diffuseReflectance" value="0.5 0.5 0.5"/>
<rgb name="specularReflectance" value="1.0 1.0 1.0"/>
<rgb name="diffuseReflectance" value="0.214036867023 0.214036867023 0.214036867023"/>
<string name="distribution" value="beckmann"/>
<float name="alpha" value="0.20000000298"/>
<string name="intIOR" value="polypropylene"/>
Expand Down
2 changes: 1 addition & 1 deletion maya/renderData/mitsuba_material_conductor.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@

<emitter type="sunsky">
<float name="turbidity" value="3.0"/>
<srgb name="albedo" value="0.15000000596 0.15000000596 0.15000000596"/>
<rgb name="albedo" value="0.0154 0.0154 0.0154"/>
<integer name="year" value="2010"/>
<integer name="month" value="7"/>
<integer name="day" value="10"/>
Expand Down
155 changes: 155 additions & 0 deletions maya/renderData/mitsuba_material_conductor_with_texture.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,155 @@
<?xml version='1.0' encoding='utf-8'?>
<scene version="0.5.0">
<integrator type="path">
<integer name="maxDepth" value="-1"/>
<integer name="rrDepth" value="5"/>
<boolean name="strictNormals" value="false"/>
<boolean name="hideEmitters" value="false"/>
</integrator>

<sensor type="perspective">
<float name="fov" value="26.9914665616"/>
<string name="fovAxis" value="x"/>
<float name="nearClip" value="0.1"/>
<transform name="toWorld">
<lookat origin="0.0 4.25 -45.0" target="-5.158373421e-15 -0.177128654616 -2.87868449425" up="-1.28010447961e-17 0.994521895368 0.104528463268"/>
</transform>
<sampler type="independent">
<integer name="sampleCount" value="4096"/>
</sampler>
<film type="ldrfilm">
<string name="fileFormat" value="jpeg"/>
<string name="pixelFormat" value="rgb"/>
<string name="tonemapMethod" value="gamma"/>
<float name="gamma" value="-1.0"/>
<float name="exposure" value="0.0"/>
<float name="key" value="0.180000007153"/>
<float name="burn" value="0.0"/>
<boolean name="banner" value="false"/>
<boolean name="highQualityEdges" value="false"/>
<integer name="height" value="540"/>
<integer name="width" value="960"/>
</film>
</sensor>

<emitter type="sunsky">
<float name="turbidity" value="3.0"/>
<rgb name="albedo" value="0.0154 0.0154 0.0154"/>
<integer name="year" value="2010"/>
<integer name="month" value="7"/>
<integer name="day" value="10"/>
<float name="hour" value="15.0"/>
<float name="minute" value="0.0"/>
<float name="second" value="0.0"/>
<float name="latitude" value="34.0219993591"/>
<float name="longitude" value="118.481002808"/>
<float name="timezone" value="8.0"/>
<float name="stretch" value="1.0"/>
<integer name="resolution" value="512"/>
<float name="sunScale" value="4.0"/>
<float name="skyScale" value="4.0"/>
<float name="sunRadiusScale" value="1.0"/>
</emitter>

<bsdf type="twosided" id="MitsubaConductorShader2">
<bsdf type="conductor">
<string name="material" value="Cu"/>
<float name="extEta" value="1.0"/>
<rgb name="specularReflectance" value="1.0 1.0 1.0"/>
</bsdf>
</bsdf>

<bsdf type="twosided" id="MitsubaConductorShader1">
<bsdf type="conductor">
<string name="material" value="none"/>
<float name="extEta" value="1.0"/>
<rgb name="specularReflectance" value="1.0 1.0 1.0"/>
</bsdf>
</bsdf>

<bsdf type="twosided" id="MitsubaDiffuseShader1">
<bsdf type="diffuse">
<rgb name="reflectance" value="0.214036867023 0.214036867023 0.214036867023"/>
</bsdf>
</bsdf>

<bsdf type="twosided" id="MitsubaRoughPlasticShader1">
<bsdf type="roughplastic">
<rgb name="specularReflectance" value="1.0 1.0 1.0"/>
<rgb name="diffuseReflectance" value="0.214036867023 0.214036867023 0.214036867023"/>
<string name="distribution" value="beckmann"/>
<float name="alpha" value="0.20000000298"/>
<string name="intIOR" value="polypropylene"/>
<string name="extIOR" value="air"/>
<boolean name="nonlinear" value="false"/>
</bsdf>
</bsdf>

<bsdf type="twosided" id="MitsubaConductorShader3">
<bsdf type="conductor">
<string name="material" value="Au"/>
<float name="extEta" value="1.0"/>
<rgb name="specularReflectance" value="1.0 1.0 1.0"/>
</bsdf>
</bsdf>

<bsdf type="twosided" id="MitsubaDiffuseShader2">
<bsdf type="diffuse">
<texture type="bitmap" name="reflectance">
<string name="filename" value="/Volumes/BOOTCAMP/work/client/hpd/code/MitsubaForMaya/hpd/MitsubaForMaya/maya/sourceimages/projection_pattern.exr"/>
</texture>
</bsdf>
</bsdf>

<bsdf type="twosided" id="MitsubaDiffuseShader3">
<bsdf type="diffuse">
<spectrum name="reflectance" filename="/Volumes/BOOTCAMP/work/client/hpd/code/MitsubaForMaya/hpd/MitsubaForMaya/maya/sourceimages/cie.stdillum.D6500.spd"/>
</bsdf>
</bsdf>

<shape type="obj">
<string name="filename" value="__Geometry__MitsubaSphere__Geometry__Mesh.obj"/>
<ref id="MitsubaConductorShader2"/>
</shape>

<shape type="obj">
<string name="filename" value="__Geometry__MitsubaSphere__Geometry__Mesh1.obj"/>
<ref id="MitsubaConductorShader2"/>
</shape>

<shape type="obj">
<string name="filename" value="__referenceSpheres__chromeSphere.obj"/>
<ref id="MitsubaConductorShader1"/>
</shape>

<shape type="obj">
<string name="filename" value="__referenceSpheres__diffuseSphere.obj"/>
<ref id="MitsubaDiffuseShader1"/>
</shape>

<shape type="obj">
<string name="filename" value="__referenceSpheres__glossySphere.obj"/>
<ref id="MitsubaRoughPlasticShader1"/>
</shape>

<shape type="obj">
<string name="filename" value="__ground.obj"/>
<ref id="MitsubaDiffuseShader1"/>
</shape>

<shape type="obj">
<string name="filename" value="__materialSphere.obj"/>
<ref id="MitsubaConductorShader3"/>
</shape>

<shape type="obj">
<string name="filename" value="__pPlane1.obj"/>
<ref id="MitsubaDiffuseShader2"/>
</shape>

<shape type="obj">
<string name="filename" value="__pPlane2.obj"/>
<ref id="MitsubaDiffuseShader3"/>
</shape>

</scene>
18 changes: 9 additions & 9 deletions maya/renderData/mitsuba_material_dielectric.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@

<emitter type="sunsky">
<float name="turbidity" value="3.0"/>
<srgb name="albedo" value="0.15000000596 0.15000000596 0.15000000596"/>
<rgb name="albedo" value="0.0154 0.0154 0.0154"/>
<integer name="year" value="2010"/>
<integer name="month" value="7"/>
<integer name="day" value="10"/>
Expand All @@ -54,28 +54,28 @@
<bsdf type="dielectric" id="MitsubaDielectricShader1">
<string name="intIOR" value="water"/>
<float name="extIOR" value="1.0"/>
<srgb name="specularReflectance" value="1.0 1.0 1.0"/>
<srgb name="specularTransmittance" value="1.0 1.0 1.0"/>
<rgb name="specularReflectance" value="1.0 1.0 1.0"/>
<rgb name="specularTransmittance" value="1.0 1.0 1.0"/>
</bsdf>

<bsdf type="twosided" id="MitsubaConductorShader1">
<bsdf type="conductor">
<string name="material" value="none"/>
<float name="extEta" value="1.0"/>
<srgb name="specularReflectance" value="1.0 1.0 1.0"/>
<rgb name="specularReflectance" value="1.0 1.0 1.0"/>
</bsdf>
</bsdf>

<bsdf type="twosided" id="MitsubaDiffuseShader1">
<bsdf type="diffuse">
<srgb name="reflectance" value="0.5 0.5 0.5"/>
<rgb name="reflectance" value="0.214036867023 0.214036867023 0.214036867023"/>
</bsdf>
</bsdf>

<bsdf type="twosided" id="MitsubaRoughPlasticShader1">
<bsdf type="roughplastic">
<srgb name="specularReflectance" value="1.0 1.0 1.0"/>
<srgb name="diffuseReflectance" value="0.5 0.5 0.5"/>
<rgb name="specularReflectance" value="1.0 1.0 1.0"/>
<rgb name="diffuseReflectance" value="0.214036867023 0.214036867023 0.214036867023"/>
<string name="distribution" value="beckmann"/>
<float name="alpha" value="0.20000000298"/>
<string name="intIOR" value="polypropylene"/>
Expand All @@ -87,8 +87,8 @@
<bsdf type="dielectric" id="MitsubaDielectricShader2">
<string name="intIOR" value="carbon tetrachloride"/>
<float name="extIOR" value="1.0"/>
<srgb name="specularReflectance" value="1.0 1.0 1.0"/>
<srgb name="specularTransmittance" value="1.0 1.0 1.0"/>
<rgb name="specularReflectance" value="1.0 1.0 1.0"/>
<rgb name="specularTransmittance" value="1.0 1.0 1.0"/>
</bsdf>

<shape type="obj">
Expand Down
Loading

0 comments on commit 3a129b6

Please sign in to comment.