Permalink
Browse files

Update site

  • Loading branch information...
Zap Andersson
Zap Andersson committed Mar 20, 2018
1 parent 0988a06 commit ba5c0bb014e2a2bd042f556969bf6d086050035c
Showing with 3,393 additions and 2 deletions.
  1. +22 −0 3ds Max Shipping Shaders/BlackBody.osl
  2. +73 −0 3ds Max Shipping Shaders/Candy.osl
  3. +71 −0 3ds Max Shipping Shaders/Color1of10.osl
  4. +61 −0 3ds Max Shipping Shaders/Color1of5.osl
  5. +25 −0 3ds Max Shipping Shaders/ColorAdd.osl
  6. +19 −0 3ds Max Shipping Shaders/ColorClamp.osl
  7. +17 −0 3ds Max Shipping Shaders/ColorComp.osl
  8. +23 −0 3ds Max Shipping Shaders/ColorDiv.osl
  9. +26 −0 3ds Max Shipping Shaders/ColorJuggler.osl
  10. +18 −0 3ds Max Shipping Shaders/ColorMax.osl
  11. +18 −0 3ds Max Shipping Shaders/ColorMin.osl
  12. +23 −0 3ds Max Shipping Shaders/ColorMul.osl
  13. +25 −0 3ds Max Shipping Shaders/ColorSub.osl
  14. +45 −0 3ds Max Shipping Shaders/ColorTweak.osl
  15. +33 −0 3ds Max Shipping Shaders/Compare.osl
  16. +46 −0 3ds Max Shipping Shaders/Composite.osl
  17. +17 −0 3ds Max Shipping Shaders/DegToRad.osl
  18. +164 −0 3ds Max Shipping Shaders/Digits.osl
  19. +70 −0 3ds Max Shipping Shaders/Float1of10.osl
  20. +60 −0 3ds Max Shipping Shaders/Float1of5.osl
  21. +30 −0 3ds Max Shipping Shaders/Float2Int.osl
  22. +17 −0 3ds Max Shipping Shaders/FloatACos.osl
  23. +17 −0 3ds Max Shipping Shaders/FloatASin.osl
  24. +17 −0 3ds Max Shipping Shaders/FloatATan.osl
  25. +17 −0 3ds Max Shipping Shaders/FloatAbs.osl
  26. +18 −0 3ds Max Shipping Shaders/FloatAdd.osl
  27. +18 −0 3ds Max Shipping Shaders/FloatAngle.osl
  28. +19 −0 3ds Max Shipping Shaders/FloatClamp.osl
  29. +17 −0 3ds Max Shipping Shaders/FloatComp.osl
  30. +17 −0 3ds Max Shipping Shaders/FloatCos.osl
  31. +18 −0 3ds Max Shipping Shaders/FloatDiv.osl
  32. +17 −0 3ds Max Shipping Shaders/FloatExp.osl
  33. +20 −0 3ds Max Shipping Shaders/FloatInterpolate.osl
  34. +17 −0 3ds Max Shipping Shaders/FloatLog.osl
  35. +18 −0 3ds Max Shipping Shaders/FloatLogX.osl
  36. +18 −0 3ds Max Shipping Shaders/FloatMax.osl
  37. +18 −0 3ds Max Shipping Shaders/FloatMin.osl
  38. +18 −0 3ds Max Shipping Shaders/FloatMod.osl
  39. +18 −0 3ds Max Shipping Shaders/FloatMul.osl
  40. +17 −0 3ds Max Shipping Shaders/FloatNegate.osl
  41. +18 −0 3ds Max Shipping Shaders/FloatPow.osl
  42. +57 −0 3ds Max Shipping Shaders/FloatRange.osl
  43. +17 −0 3ds Max Shipping Shaders/FloatRecip.osl
  44. +17 −0 3ds Max Shipping Shaders/FloatSin.osl
  45. +17 −0 3ds Max Shipping Shaders/FloatSqrt.osl
  46. +18 −0 3ds Max Shipping Shaders/FloatSub.osl
  47. +17 −0 3ds Max Shipping Shaders/FloatTan.osl
  48. +38 −0 3ds Max Shipping Shaders/GaborNoise.osl
  49. +50 −0 3ds Max Shipping Shaders/GetAttribute.osl
  50. +23 −0 3ds Max Shipping Shaders/GetCoordSpace.osl
  51. +20 −0 3ds Max Shipping Shaders/GetFrame.osl
  52. +53 −0 3ds Max Shipping Shaders/GetMtlID.osl
  53. +16 −0 3ds Max Shipping Shaders/GetNodeID.osl
  54. +18 −0 3ds Max Shipping Shaders/GetNodeName.osl
  55. +17 −0 3ds Max Shipping Shaders/GetObjSpace.osl
  56. +53 −0 3ds Max Shipping Shaders/GetObjectID.osl
  57. +18 −0 3ds Max Shipping Shaders/GetParticleAge.osl
  58. +20 −0 3ds Max Shipping Shaders/GetTime.osl
  59. +39 −0 3ds Max Shipping Shaders/GetUVW.osl
  60. +22 −0 3ds Max Shipping Shaders/GetWireColor.osl
  61. +28 −0 3ds Max Shipping Shaders/GreaterThan.osl
  62. +21 −0 3ds Max Shipping Shaders/IdxRndCol.osl
  63. +21 −0 3ds Max Shipping Shaders/IdxRndFlt.osl
  64. +21 −0 3ds Max Shipping Shaders/IdxRndVec.osl
  65. +19 −0 3ds Max Shipping Shaders/Interpolate.osl
  66. +19 −0 3ds Max Shipping Shaders/LiftGammaGain.osl
  67. +48 −0 3ds Max Shipping Shaders/Mandelbrot.osl
  68. +74 −0 3ds Max Shipping Shaders/Noise.osl
  69. +82 −0 3ds Max Shipping Shaders/Noise3D.osl
  70. +76 −0 3ds Max Shipping Shaders/OSLBitmap.osl
  71. +17 −0 3ds Max Shipping Shaders/RadToDeg.osl
  72. +259 −0 3ds Max Shipping Shaders/RandomBitmap.osl
  73. +165 −0 3ds Max Shipping Shaders/Rivets.osl
  74. +17 −0 3ds Max Shipping Shaders/SetColor.osl
  75. +49 −0 3ds Max Shipping Shaders/SetFile.osl
  76. +17 −0 3ds Max Shipping Shaders/SetFloat.osl
  77. +17 −0 3ds Max Shipping Shaders/SetInt.osl
  78. +71 −0 3ds Max Shipping Shaders/SetNumFile.osl
  79. +17 −0 3ds Max Shipping Shaders/SetString.osl
  80. +17 −0 3ds Max Shipping Shaders/SetVector.osl
  81. +23 −0 3ds Max Shipping Shaders/SmoothStep.osl
  82. +23 −0 3ds Max Shipping Shaders/SmoothStepC.osl
  83. +39 −0 3ds Max Shipping Shaders/UVWEnviron.osl
  84. +34 −0 3ds Max Shipping Shaders/UVWRowOffset.osl
  85. +36 −0 3ds Max Shipping Shaders/UVWTransform.osl
  86. +112 −0 3ds Max Shipping Shaders/UberBitmap.osl
  87. +21 −0 3ds Max Shipping Shaders/VectorAdd.osl
  88. +19 −0 3ds Max Shipping Shaders/VectorCross.osl
  89. +18 −0 3ds Max Shipping Shaders/VectorDist.osl
  90. +19 −0 3ds Max Shipping Shaders/VectorDiv.osl
  91. +19 −0 3ds Max Shipping Shaders/VectorDot.osl
  92. +17 −0 3ds Max Shipping Shaders/VectorInv.osl
  93. +26 −0 3ds Max Shipping Shaders/VectorJuggler.osl
  94. +17 −0 3ds Max Shipping Shaders/VectorLength.osl
  95. +18 −0 3ds Max Shipping Shaders/VectorMax.osl
  96. +18 −0 3ds Max Shipping Shaders/VectorMin.osl
  97. +19 −0 3ds Max Shipping Shaders/VectorMul.osl
  98. +17 −0 3ds Max Shipping Shaders/VectorNorm.osl
  99. +21 −0 3ds Max Shipping Shaders/VectorSub.osl
  100. +17 −0 3ds Max Shipping Shaders/Wavelength.osl
  101. +29 −0 3ds Max Shipping Shaders/checker.osl
  102. BIN OSL shaders in 3ds Max 2019.pdf
  103. +6 −2 README.md
  104. BIN The OSL Map and You V1.pdf
@@ -0,0 +1,22 @@
// Blackbody Color Shader
// Blackbody.osl, by Zap Andersson
// Modified: 2018-02-08
// Copyright 2018 Autodesk Inc, All rights reserved. This file is licensed under Apache 2.0 license
// https://github.com/ADN-DevTech/3dsMax-OSL-Shaders/blob/master/LICENSE.txt
shader Blackbody
[[ string help = "Modulates a color between two Kelvin temperatures" ]]
(
float Input = u,
float Min = 0.0 [[ float min = 0.0, float max = 10000.0 ]],
float Max = 5000.0 [[ float min = 0.0, float max = 10000.0 ]],
int Normalize = 1 [[ string widget = "checkBox" ]],
float Intensity = 1.0,
output color Col = 0.0,
)
{
Col = blackbody(mix(Min, Max, Input));
if (Normalize)
Col = normalize(Col);
Col *= Intensity;
}
@@ -0,0 +1,73 @@
// Random circles (or spheres, really) with outputs
// for bump, random factor, etc. Can be made to make
// very cool random candy cover...
//
// Candy.osl, by Zap Andersson
// Modified: 2018-02-08
// Copyright 2018 Autodesk Inc, All rights reserved. This file is licensed under Apache 2.0 license
// https://github.com/ADN-DevTech/3dsMax-OSL-Shaders/blob/master/LICENSE.txt
shader Candy
[[ string help="Random circles with random colors and a tunable bump output. For random dots or candy sprinkles." ]]
(
// For convenience, default to object space
// You can connect any other coordinate space
// as input anyway...
point UVW = transform("object", P) [[ string help = "The position input, defaulting to object space. Connect an UVW shader for other alternatives." ]],
float Scale = 20.0,
float Radius = 0.5 [[ float min=0.0, float max=2.0 ]],
int RandomOverlap = 0 [[ string widget = "checkBox" ]],
float BumpAmount = 1.0,
float BumpShape = 1.0,
output color Col = 0,
output float Fac = 0,
output float Bump = 0,
output float Dist = 0,
output float Rnd = 0
)
{
point pnt = UVW / Scale;
float pri = -1;
// Sandard method for randomization:
// Go through a 3x3x3 grid that we offset
for (float x = -1; x <= 1; x++)
{
for (float y = -1; y <= 1; y++)
{
for(float z = -1; z <= 1; z++)
{
// Point that sources all our randomization
// We run these through cell noises to get
// random values
point rndpoint = pnt + point(x, y, z);
// Compute a center
point dotcenter = floor(rndpoint) + noise("cell", rndpoint, 1);
float dist = distance(dotcenter, pnt);
// Randomize the priority, all they all look "stacked" in
// the same direction if they overlap
float priority = noise("cell", rndpoint, 2);
// If within the radius, and priority is higher
if (dist < Radius && priority > pri)
{
pri = priority;
Col = noise("cell", rndpoint, 3);
Dist = dist / Radius;
Bump = pow(sin((1.0 - Dist) * 1.58), BumpShape) * BumpAmount;
Fac = 1.0;
Rnd = priority;
// If we exit early, shader is more efficient,
// but any "overlap" becomes completely sorted
// in an X/Y/Z order and looks fake.
if (!RandomOverlap)
return;
}
}
}
}
}
@@ -0,0 +1,71 @@
// Pick one of ten inputs
// Color1of10.osl, by Zap Andersson
// Modified: 2018-02-08
// Copyright 2018 Autodesk Inc, All rights reserved. This file is licensed under Apache 2.0 license
// https://github.com/ADN-DevTech/3dsMax-OSL-Shaders/blob/master/LICENSE.txt
shader Color1of10
[[ string help = "Pick one of 10 inputs",
string label= "1 of 10 (color)",
string category = "Switchers" ]]
(
int Index = 0
[[ string label = "Input index to use",
string help = "Pick the index (number) of the input to use. "]],
color I0 = color(1.0, 0.5, 0.4) [[ string label = "Input 0" ]],
color I1 = color(1.0, 1.0, 0.4) [[ string label = "Input 1" ]],
color I2 = color(0.5, 1.0, 0.4) [[ string label = "Input 2" ]],
color I3 = color(0.5, 1.0, 1.0) [[ string label = "Input 3" ]],
color I4 = color(0.0, 0.5, 1.0) [[ string label = "Input 4" ]],
color I5 = color(1.0, 0.5, 1.0) [[ string label = "Input 5" ]],
color I6 = color(1.0, 1.0, 1.0) [[ string label = "Input 6" ]],
color I7 = color(0.6, 0.6, 0.6) [[ string label = "Input 7" ]],
color I8 = color(0.2, 0.2, 0.2) [[ string label = "Input 8" ]],
color I9 = color(0.1, 0.1, 0.1) [[ string label = "Input 9" ]],
int StartIdx = 0
[[ string label = "Start Index",
string help =
"Offsets the input index so that this number will map to the first input. "
"E.g. if set to 10, the first input (labeled Input 0) will map to index 10, rather than 0. "
"This is used when cascading multiple switchers into each other and allow them "
"to cover different ranges." ]],
int Mod = 0
[[ string label = "Range: Number of inputs",
string help = "If 0, returns all outputs and any outside the range uses the 'Outside Range' input. "
"If a nonzero number, only uses that many inputs, repeated in a rotating fashion." ]],
color Outside = 0.0
[[ string label = "Outside Range",
string help =
"The value to return when the index falls outside the set of available inputs. "
"This can be used to connect a second switcher to support a larger number of inputs. "]],
output color Out = color(0.1,0.2,0.3),
)
{
int idx = Index - StartIdx;
if (Mod)
idx = idx % Mod;
if (idx < 0 || idx > 9)
{
Out = Outside;
}
else
{
#define OUT(X) if (idx == X) { Out = I##X; } else
OUT(0)
OUT(1)
OUT(2)
OUT(3)
OUT(4)
OUT(5)
OUT(6)
OUT(7)
OUT(8)
OUT(9)
Out = Outside;
#undef OUT
}
}
@@ -0,0 +1,61 @@
// Pick one of five inputs
// Color1of5.osl, by Zap Andersson
// Modified: 2018-02-08
// Copyright 2018 Autodesk Inc, All rights reserved. This file is licensed under Apache 2.0 license
// https://github.com/ADN-DevTech/3dsMax-OSL-Shaders/blob/master/LICENSE.txt
shader Color1of5
[[ string help = "Pick one of 5 inputs",
string label= "1 of 5 (color)",
string category = "Switchers" ]]
(
int Index = 0
[[ string label = "Input index to use",
string help = "Pick the index (number) of the input to use. "]],
color I0 = color(1.0, 0.5, 0.4) [[ string label = "Input 0" ]],
color I1 = color(1.0, 1.0, 0.4) [[ string label = "Input 1" ]],
color I2 = color(0.5, 1.0, 0.4) [[ string label = "Input 2" ]],
color I3 = color(0.5, 1.0, 1.0) [[ string label = "Input 3" ]],
color I4 = color(1.0, 0.5, 1.0) [[ string label = "Input 4" ]],
int StartIdx = 0
[[ string label = "Start Index",
string help =
"Offsets the input index so that this number will map to the first input. "
"E.g. if set to 10, the first input (labeled Input 0) will map to index 10, rather than 0. "
"This is used when cascading multiple switchers into each other and allow them "
"to cover different ranges." ]],
int Mod = 0
[[ string label = "Range: Number of inputs",
string help = "If 0, returns all outputs and any outside the range uses the 'Outside Range' input. "
"If a nonzero number, only uses that many inputs, repeated in a rotating fashion." ]],
color Outside = 0.0
[[ string label = "Outside Range",
string help =
"The value to return when the index falls outside the set of available inputs. "
"This can be used to connect a second switcher to support a larger number of inputs. "]],
output color Out = 0.0,
)
{
int idx = Index - StartIdx;
if (Mod)
idx = idx % Mod;
if (idx < 0 || idx > 4)
{
Out = Outside;
}
else
{
#define OUT(X) if (idx == X) { Out = I##X; } else
OUT(0)
OUT(1)
OUT(2)
OUT(3)
OUT(4)
Out = Outside;
#undef OUT
}
}
@@ -0,0 +1,25 @@
// Adds (and optionaly scales) two colors
// ColorAdd.osl, by Zap Andersson
// Modified: 2018-02-08
// Copyright 2018 Autodesk Inc, All rights reserved. This file is licensed under Apache 2.0 license
// https://github.com/ADN-DevTech/3dsMax-OSL-Shaders/blob/master/LICENSE.txt
shader ColorAdd
[[ string help = "Adds (and optionaly scales) two colors",
string label= "Add (color)",
string category = "Math\Color" ]]
(
color A = 0.5 [[ string label = "A" ]],
color B = 0.5 [[ string label = "B" ]],
float A_Amount = 1.0 [[ string label = "A scale" ]],
float B_Amount = 1.0 [[ string label = "B scale" ]],
int Clamp = 0
[[ string widget="checkBox", string label = "Clamp Result" ]],
output color Out = 0.0,
)
{
Out = A*A_Amount + B*B_Amount;
if (Clamp)
Out = clamp(Out, 0.0, 1.0);
}
@@ -0,0 +1,19 @@
// Clamps a color.
// ColorClamp.osl, by Zap Andersson
// Modified: 2018-02-08
// Copyright 2018 Autodesk Inc, All rights reserved. This file is licensed under Apache 2.0 license
// https://github.com/ADN-DevTech/3dsMax-OSL-Shaders/blob/master/LICENSE.txt
shader ColorClamp
[[ string help = "Clamps a color",
string label= "Clamp (color)",
string category = "Math\Color" ]]
(
color Input = 0.0,
color Min = 0.0,
color Max = 1.0,
output color Out = 0.0,
)
{
Out = clamp(Input, Min, Max);
}
@@ -0,0 +1,17 @@
// Complements a color.
// ColorComp.osl, by Zap Andersson
// Modified: 2018-02-08
// Copyright 2018 Autodesk Inc, All rights reserved. This file is licensed under Apache 2.0 license
// https://github.com/ADN-DevTech/3dsMax-OSL-Shaders/blob/master/LICENSE.txt
shader ColorComp
[[ string help = "Inverts (Complements) a color number (1 - Input)",
string label= "Invert (color)",
string category = "Math\Color" ]]
(
color Input = 0.0,
output color Out = 0.0,
)
{
Out = 1 - Input;
}
@@ -0,0 +1,23 @@
// Divides two colors
// ColorDiv.osl, by Zap Andersson
// Modified: 2018-02-08
// Copyright 2018 Autodesk Inc, All rights reserved. This file is licensed under Apache 2.0 license
// https://github.com/ADN-DevTech/3dsMax-OSL-Shaders/blob/master/LICENSE.txt
shader ColorDiv
[[ string help = "Divides two colors",
string label= "Divide (color)",
string category = "Math\Color" ]]
(
color A = 0.5,
color B = 0.5,
int Clamp = 0
[[ string widget="checkBox", string label = "Clamp Result" ]],
output color Out = 0.0,
)
{
Out = A / B;
if (Clamp)
clamp(Out, 0.0, 1.0);
}
@@ -0,0 +1,26 @@
// Color Channel Juggler Shader
// ColorJuggler.osl, by Zap Andersson
// Modified: 2018-02-08
// Copyright 2018 Autodesk Inc, All rights reserved. This file is licensed under Apache 2.0 license
// https://github.com/ADN-DevTech/3dsMax-OSL-Shaders/blob/master/LICENSE.txt
shader ColorJuggler
[[ string help = "A utility to combine or split color components",
string label = "Components (color)",
string category = "Math\Color" ]]
(
color Input = 0.0 [[ string label="Input (RGB)" ]],
float Ri = Input[0] [[ string label="R" ]],
float Gi = Input[1] [[ string label="G" ]],
float Bi = Input[2] [[ string label="B" ]],
output color Out = 0 [[ string label="Out (RGB)" ]],
output float R = 0.0,
output float G = 0.0,
output float B = 0.0
)
{
Out = color(Ri,Gi,Bi);
R = Out[0];
G = Out[1];
B = Out[2];
}
@@ -0,0 +1,18 @@
// Returns the maximum of two colors
// ColorMax.osl, by Zap Andersson
// Modified: 2018-02-08
// Copyright 2018 Autodesk Inc, All rights reserved. This file is licensed under Apache 2.0 license
// https://github.com/ADN-DevTech/3dsMax-OSL-Shaders/blob/master/LICENSE.txt
shader ColorMax
[[ string help = "Returns the maximum of two colors",
string label= "Max (color)",
string category = "Math\Color" ]]
(
color A = 0.5,
color B = 0.5,
output color Out = 0.0,
)
{
Out = max(A, B);
}
@@ -0,0 +1,18 @@
// Returns the minimum of two colors
// ColorMin.osl, by Zap Andersson
// Modified: 2018-02-08
// Copyright 2018 Autodesk Inc, All rights reserved. This file is licensed under Apache 2.0 license
// https://github.com/ADN-DevTech/3dsMax-OSL-Shaders/blob/master/LICENSE.txt
shader ColorMin
[[ string help = "Returns the minimum of two colors",
string label= "Min (color)",
string category = "Math\Color" ]]
(
color A = 0.5,
color B = 0.5,
output color Out = 0.0,
)
{
Out = min(A, B);
}
Oops, something went wrong.

0 comments on commit ba5c0bb

Please sign in to comment.