Skip to content

Commit

Permalink
Update, new structure.
Browse files Browse the repository at this point in the history
  • Loading branch information
haggi committed Jan 5, 2019
1 parent 808580c commit e70f968
Show file tree
Hide file tree
Showing 21 changed files with 95,708 additions and 15,054 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Expand Up @@ -3,5 +3,5 @@
shader/unused
*.tx
*.tex
mayaProject/images/tmp
shader/maya/images/tmp
.mayaSwatches
Binary file added shader/geometry/arealights.abc
Binary file not shown.
Binary file added shader/geometry/lights.fbx
Binary file not shown.
Binary file added shader/geometry/shaderballScene.abc
Binary file not shown.
Binary file added shader/maya/images/appleseedOsl_0.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added shader/maya/images/arnoldOsl_0.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
275 changes: 275 additions & 0 deletions shader/maya/scenes/appleTest.ma

Large diffs are not rendered by default.

265 changes: 265 additions & 0 deletions shader/maya/scenes/delightTest.ma

Large diffs are not rendered by default.

11,537 changes: 5,840 additions & 5,697 deletions mayaProject/scenes/leafVase.ma → shader/maya/scenes/leafVase.ma

Large diffs are not rendered by default.

11,471 changes: 5,793 additions & 5,678 deletions mayaProject/scenes/leafVaseExport.ma → shader/maya/scenes/leafVaseExport.ma

Large diffs are not rendered by default.

File renamed without changes.
7,404 changes: 3,749 additions & 3,655 deletions mayaProject/scenes/shaderBallsArnold.ma → shader/maya/scenes/shaderBallsArnold.ma

Large diffs are not rendered by default.

79,733 changes: 79,733 additions & 0 deletions shader/maya/scenes/shaderBallsArnoldApple.ma

Large diffs are not rendered by default.

Binary file added shader/maya/sourceimages/appleseedEnvMap.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 5 additions & 4 deletions mayaProject/workspace.mel → shader/maya/workspace.mel
@@ -1,8 +1,8 @@
//Maya 2018 Project Definition

workspace -fr "fluidCache" "cache/nCache/fluid";
workspace -fr "JT_ATF" "data";
workspace -fr "images" "images";
workspace -fr "JT_ATF" "data";
workspace -fr "offlineEdit" "scenes/edits";
workspace -fr "STEP_ATF Export" "data";
workspace -fr "furShadowMap" "renderData/fur/furShadowMap";
Expand All @@ -15,6 +15,7 @@ workspace -fr "NX_ATF" "data";
workspace -fr "furFiles" "renderData/fur/furFiles";
workspace -fr "CATIAV5_ATF Export" "data";
workspace -fr "OBJ" "data";
workspace -fr "alembicCache" "cache/alembic";
workspace -fr "PARASOLID_ATF Export" "data";
workspace -fr "FBX export" "data";
workspace -fr "furEqualMap" "renderData/fur/furEqualMap";
Expand All @@ -23,9 +24,9 @@ workspace -fr "CATIAV5_ATF" "data";
workspace -fr "SAT_ATF Export" "data";
workspace -fr "movie" "movies";
workspace -fr "ASS Export" "data";
workspace -fr "autoSave" "autosave";
workspace -fr "move" "data";
workspace -fr "mayaAscii" "scenes";
workspace -fr "autoSave" "autosave";
workspace -fr "NX_ATF Export" "data";
workspace -fr "sound" "sound";
workspace -fr "mayaBinary" "scenes";
Expand All @@ -38,10 +39,10 @@ workspace -fr "renderData" "renderData";
workspace -fr "CATIAV4_ATF" "data";
workspace -fr "fileCache" "cache/nCache";
workspace -fr "eps" "data";
workspace -fr "3dPaintTextures" "sourceimages/3dPaintTextures";
workspace -fr "STL_ATF Export" "data";
workspace -fr "mel" "scripts";
workspace -fr "3dPaintTextures" "sourceimages/3dPaintTextures";
workspace -fr "translatorData" "data";
workspace -fr "mel" "scripts";
workspace -fr "particles" "cache/particles";
workspace -fr "scene" "scenes";
workspace -fr "SAT_ATF" "data";
Expand Down
3 changes: 2 additions & 1 deletion shader/source/osl/hSurface.mtd
@@ -1,2 +1,3 @@
[node hSurface]
maya.name STRING "hSurface"
maya.name STRING "hSurface"

40 changes: 34 additions & 6 deletions shader/source/osl/hSurface.osl
@@ -1,10 +1,38 @@

shader hSurface(
color diffuseColor = color(.25, .25, .25),
float diffuseMultiplier = 1.0,
float diffuseRoughness = 0.0,
output closure color result = 0
shader hSurface
[[
string maya_classification = "surface", string niceName = "Haggi's Surfaceshader", string maya_typeID = "0x0011CF56", // 3delight metadata
string as_node_name = "hSurface", int as_maya_type_id = 0x0011CF56, string as_maya_classification = "drawdb/shader/surface:shader/surface" // appleseed metadata
]]
(
color diffuseColor = color(.25, .25, .25)
[[
string as_maya_attribute_name = "diffuseColor",
string as_maya_attribute_short_name = "dfc",
string label = "Diffuse Color",
string page = "Diffuse"
]],
float diffuseMultiplier = 1.0
[[
string as_maya_attribute_name = "diffuseMultiplier",
string as_maya_attribute_short_name = "dfm",
string label = "Diffuse Multiplier",
float min = 0.0,
float softMax = 1.0,
string page = "Diffuse"
]],
float diffuseRoughness = 0.0
[[
string as_maya_attribute_name = "diffuseRoughness",
string as_maya_attribute_short_name = "dfr",
string label = "Diffuse Roughness",
float min = 0.0,
float max = 1.0,
string page = "Diffuse"
]],

output closure color outColor = 0 // output has to be called outColor for 3delight to avoid crash
)
{
result = diffuse(N) * diffuseMultiplier * diffuseColor;
outColor = oren_nayar(N, diffuseRoughness) * diffuseMultiplier * diffuseColor;
}
21 changes: 10 additions & 11 deletions shader/source/pythonPlugin/fragments/hSurface.xml
Expand Up @@ -2,24 +2,23 @@
<fragments>
<fragment_ref name="maya16LightAccum" ref="maya16LightAccum" />
<fragment_ref name="mayaSurfaceShaderOutput" ref="mayaSurfaceShaderOutput" />
<fragment_ref name="hSurfaceDiffuse" ref="hSurfaceDiffuse" />
<fragment_ref name="hSurfaceCombiner" ref="hSurfaceCombiner" />
<fragment_ref name="hSurfaceFragment" ref="hSurfaceFragment" />
</fragments>
<connections>
<connect from="hSurfaceDiffuse.outColor" to="maya16LightAccum.scaledDiffuse" />
<connect from="hSurfaceDiffuse.outColor" to="maya16LightAccum.scaledSpecular" />
<connect from="hSurfaceFragment.outColor" to="maya16LightAccum.scaledDiffuse" />
<connect from="hSurfaceFragment.outColor" to="maya16LightAccum.scaledSpecular" />
<connect from="maya16LightAccum.scaledDiffuse" to="hSurfaceCombiner.diffuseColor" />
<connect from="maya16LightAccum.scaledSpecular" to="hSurfaceCombiner.specInput" />
<connect from="hSurfaceCombiner.mayaSurfaceShaderOutput" to="mayaSurfaceShaderOutput.mayaSurfaceShaderOutput" />
</connections>
<properties>
<float3 name="diffuseColor" ref="hSurfaceDiffuse.diffuseColor" />
<float3 name="Nw" ref="hSurfaceDiffuse.N" flags="varyingInputParam" />
<float3 name="Vw" ref="hSurfaceDiffuse.V"/>
<float3 name="Lw" ref="hSurfaceDiffuse.L"/>
<float3 name="SLw" ref="hSurfaceDiffuse.SL"/>
<float3 name="diffuseI" ref="hSurfaceDiffuse.diffuseI" />
<float3 name="specularI" ref="hSurfaceDiffuse.specularI" />
<float3 name="diffuseColor" ref="hSurfaceFragment.diffuseColor" />
<float3 name="Nw" ref="hSurfaceFragment.N" flags="varyingInputParam" />
<float3 name="Vw" ref="hSurfaceFragment.V"/>
<float3 name="Lw" ref="hSurfaceFragment.L"/>
<float3 name="SLw" ref="hSurfaceFragment.SL"/>
<float3 name="diffuseI" ref="hSurfaceFragment.diffuseI" />
<float3 name="specularI" ref="hSurfaceFragment.specularI" />
<string name="selector" ref="maya16LightAccum.selector" />
</properties>
<values>
Expand Down
2 changes: 1 addition & 1 deletion shader/source/pythonPlugin/hSurface.py
Expand Up @@ -10,7 +10,7 @@

logger = logging.getLogger("render")

NODE_ID = OpenMaya.MTypeId(0x106E20)
NODE_ID = OpenMaya.MTypeId(0x0011CF56)


class hSurface(OpenMayaMPx.MPxNode):
Expand Down

0 comments on commit e70f968

Please sign in to comment.