Difference between revisions of "PBR MAT"

From Derivative
Jump to navigation Jump to search
Line 2: Line 2:
 
{{Summary|OPfamily=MAT|OPtype=pbr|OPlabel=PBR|OPlicense=Non-Commercial|OPclass=pbrMAT_Class|OPfilter=False
 
{{Summary|OPfamily=MAT|OPtype=pbr|OPlabel=PBR|OPlicense=Non-Commercial|OPclass=pbrMAT_Class|OPfilter=False
  
|short=
+
|short=The PBR MAT creates a material using a Physically Based Rendering (PBR) lighting model.
  
|long=
+
|long=The PBR MAT creates a material using a Physically Based Rendering (PBR) lighting model. It has support for textures, reflections, bumps, cone lights, rim lights, alpha maps and more.
 +
 
 +
It also supports [http://www.allegorithmic.com/products/substance-designer Substance Designer] PBR materials loaded in the [[Substance TOP]].
 +
 
 +
You can output its [[:Category:GLSL|GLSL shader]] into two [[DAT]]s for further adaptation in a [[GLSL MAT]] by using the Output Shader parameter.
 +
 
 +
This OP creates physically based materials from texture maps you assign to it and works with any content pipeline whether you use Maya, Houdini, Unreal, Photoshop etc
 +
 
 +
See also: [[Substance TOP]], and the PBR texture libraries such as [http://quixel.se/ Quixel] and [http://www.poliigon.com/ Poliigon]
  
 
}}
 
}}
Line 13: Line 21:
 
{{ParRGB|OPfamily=MAT|OPtype=pbr|Parname=basecolor|Parlabel=Base Color|Parorder=0
 
{{ParRGB|OPfamily=MAT|OPtype=pbr|Parname=basecolor|Parlabel=Base Color|Parorder=0
  
|Parsummary=
+
|Parsummary=Base color of the texture, used to calculate diffuse and specular contributions.
  
 
|Paritems=
 
|Paritems=
Line 37: Line 45:
 
{{ParFloat|OPfamily=MAT|OPtype=pbr|Parname=specularlevel|Parlabel=Specular Level|Parorder=1
 
{{ParFloat|OPfamily=MAT|OPtype=pbr|Parname=specularlevel|Parlabel=Specular Level|Parorder=1
  
|Parsummary=
+
|Parsummary=The amount of contribution the Specular Level Map adds to the material.
  
 
}}
 
}}
 
{{ParFloat|OPfamily=MAT|OPtype=pbr|Parname=metallic|Parlabel=Metallic|Parorder=2
 
{{ParFloat|OPfamily=MAT|OPtype=pbr|Parname=metallic|Parlabel=Metallic|Parorder=2
  
|Parsummary=
+
|Parsummary=The amount of contribution the Metallic Map adds to the material.
  
 
}}
 
}}
 
{{ParFloat|OPfamily=MAT|OPtype=pbr|Parname=roughness|Parlabel=Roughness|Parorder=3
 
{{ParFloat|OPfamily=MAT|OPtype=pbr|Parname=roughness|Parlabel=Roughness|Parorder=3
  
|Parsummary=
+
|Parsummary=The amount of contribution the Roughness Map adds to the material. Used to calculate specular D, R, and F (blog.selfshadow.com/publications/s2013-shading-course/karis/s2013_pbs_epic_notes_v2.pdf page 3).
  
 
}}
 
}}
 
{{ParFloat|OPfamily=MAT|OPtype=pbr|Parname=ambientocclusion|Parlabel=Ambient Occlusion|Parorder=4
 
{{ParFloat|OPfamily=MAT|OPtype=pbr|Parname=ambientocclusion|Parlabel=Ambient Occlusion|Parorder=4
  
|Parsummary=
+
|Parsummary=The amount of contribution the Ambient Occlusion Map adds to the material.
  
 
}}
 
}}
 
{{ParFloat|OPfamily=MAT|OPtype=pbr|Parname=envlightquality|Parlabel=Env Light Quality|Parorder=5
 
{{ParFloat|OPfamily=MAT|OPtype=pbr|Parname=envlightquality|Parlabel=Env Light Quality|Parorder=5
  
|Parsummary=
+
|Parsummary=The sampling quality of the Environment Light with the material.
  
 
}}
 
}}
 
{{ParRGB|OPfamily=MAT|OPtype=pbr|Parname=emit|Parlabel=Emit|Parorder=6
 
{{ParRGB|OPfamily=MAT|OPtype=pbr|Parname=emit|Parlabel=Emit|Parorder=6
  
|Parsummary=
+
|Parsummary=This is the color that the material will emit even if there is no light.
  
 
|Paritems=
 
|Paritems=
Line 86: Line 94:
 
{{ParRGB|OPfamily=MAT|OPtype=pbr|Parname=constant|Parlabel=Constant|Parorder=7
 
{{ParRGB|OPfamily=MAT|OPtype=pbr|Parname=constant|Parlabel=Constant|Parorder=7
  
|Parsummary=
+
|Parsummary=Adds to the final color. Where there are point colors, finalcolor += Point Color * Constant Color. This behaves like there is ambient illumination of 1 1 1. It is not affected by textures or transparency.
  
 
|Paritems=
 
|Paritems=
Line 110: Line 118:
 
{{ParMenu|OPfamily=MAT|OPtype=pbr|Parname=frontfacelit|Parlabel=Polygon Front Faces|Parorder=8
 
{{ParMenu|OPfamily=MAT|OPtype=pbr|Parname=frontfacelit|Parlabel=Polygon Front Faces|Parorder=8
  
|Parsummary=
+
|Parsummary=Controls how the polygon's normal is used to light the front face of the polygon. For more information refer to the [[Two-Sided Lighting]] article.
  
 
|Paritems=
 
|Paritems=
Line 134: Line 142:
 
{{ParMenu|OPfamily=MAT|OPtype=pbr|Parname=backfacelit|Parlabel=Polygon Back Faces|Parorder=9
 
{{ParMenu|OPfamily=MAT|OPtype=pbr|Parname=backfacelit|Parlabel=Polygon Back Faces|Parorder=9
  
|Parsummary=
+
|Parsummary=Controls how the polygon's normal is used to light the back face of the polygon. For more information refer to the [[Two-Sided Lighting]] article.
  
 
|Paritems=
 
|Paritems=
Line 158: Line 166:
 
{{ParButton|OPfamily=MAT|OPtype=pbr|Parname=outputshader|Parlabel=Output Shader...|Parorder=10
 
{{ParButton|OPfamily=MAT|OPtype=pbr|Parname=outputshader|Parlabel=Output Shader...|Parorder=10
  
|Parsummary=
+
|Parsummary=This button will bring up a dialog that will create a [[GLSL MAT]] and [[Text DAT]]s with shader code that this PBR MAT is currently using. Since shaders are dependent on the number and type of lights, it will list some possible different shader choices, based on what lighting configurations have been used in the current system. '''If no shaders are listed in the dialog''', it means no shader has been rendered in the current session of TouchDesigner. Turn on the viewer for the Phong MAT, or setup a render in a Render TOP. That will create/compile some shaders and will cause the list to be populated. For example if you want to see a shader that does shadow mapping, setup a render that does shadow mapping and you will see that come up in the list.
  
 
}}
 
}}
Line 169: Line 177:
 
{{ParTopRef|OPfamily=MAT|OPtype=pbr|Parname=substance|Parlabel=Substance TOP|Parorder=0
 
{{ParTopRef|OPfamily=MAT|OPtype=pbr|Parname=substance|Parlabel=Substance TOP|Parorder=0
  
|Parsummary=
+
|Parsummary=Reference a [[Substance TOP]] containing an .sbsar file. Referencing the TOP will automatically unpack all enabled textures without having to manually fill in any of the below texture maps. Manually filling in any of the texture map parameters will override the texture automatically pulled from the .sbsar package.
  
 
|Paritems=
 
|Paritems=
Line 178: Line 186:
 
{{ParTopRef|OPfamily=MAT|OPtype=pbr|Parname=basecolormap|Parlabel=Base Color Map|Parorder=1
 
{{ParTopRef|OPfamily=MAT|OPtype=pbr|Parname=basecolormap|Parlabel=Base Color Map|Parorder=1
  
|Parsummary=
+
|Parsummary=Clicking on the arrows to the right of the map field will open the [[Texture Sampling Parameters]] for Color Map.  The other Map parameters below will have their own Texture Sampling Parameters as well.
  
 
|Paritems=
 
|Paritems=
Line 405: Line 413:
 
{{ParTopRef|OPfamily=MAT|OPtype=pbr|Parname=specularlevelmap|Parlabel=Specular Level Map|Parorder=9
 
{{ParTopRef|OPfamily=MAT|OPtype=pbr|Parname=specularlevelmap|Parlabel=Specular Level Map|Parorder=9
  
|Parsummary=
+
|Parsummary=Specifies a specular level map.
  
 
|Paritems=
 
|Paritems=
Line 676: Line 684:
 
{{ParTopRef|OPfamily=MAT|OPtype=pbr|Parname=metallicmap|Parlabel=Metallic Map|Parorder=18
 
{{ParTopRef|OPfamily=MAT|OPtype=pbr|Parname=metallicmap|Parlabel=Metallic Map|Parorder=18
  
|Parsummary=
+
|Parsummary=Specifies a metallic texture map. This is equivalent to the Metallic map in Substance Designer.
  
 
|Paritems=
 
|Paritems=
Line 947: Line 955:
 
{{ParTopRef|OPfamily=MAT|OPtype=pbr|Parname=roughnessmap|Parlabel=Roughness Map|Parorder=27
 
{{ParTopRef|OPfamily=MAT|OPtype=pbr|Parname=roughnessmap|Parlabel=Roughness Map|Parorder=27
  
|Parsummary=
+
|Parsummary=Specifies a roughness texture map. This is equivalent to the Roughness map in Substance Designer.
  
 
|Paritems=
 
|Paritems=
Line 1,218: Line 1,226:
 
{{ParTopRef|OPfamily=MAT|OPtype=pbr|Parname=ambientocclusionmap|Parlabel=Ambient Occlusion Map|Parorder=36
 
{{ParTopRef|OPfamily=MAT|OPtype=pbr|Parname=ambientocclusionmap|Parlabel=Ambient Occlusion Map|Parorder=36
  
|Parsummary=
+
|Parsummary=Specifies a ambient occlusion texture map. This is equivalent to the Ambient Occlusion map in Substance Designer.
  
 
|Paritems=
 
|Paritems=
Line 1,489: Line 1,497:
 
{{ParTopRef|OPfamily=MAT|OPtype=pbr|Parname=heightmap|Parlabel=Height Map|Parorder=45
 
{{ParTopRef|OPfamily=MAT|OPtype=pbr|Parname=heightmap|Parlabel=Height Map|Parorder=45
  
|Parsummary=
+
|Parsummary=Specifies a height texture map. This is equivalent to the Height map in Substance Designer.
  
 
|Paritems=
 
|Paritems=
Line 1,760: Line 1,768:
 
{{ParTopRef|OPfamily=MAT|OPtype=pbr|Parname=normalmap|Parlabel=Normal Map (Bump)|Parorder=54
 
{{ParTopRef|OPfamily=MAT|OPtype=pbr|Parname=normalmap|Parlabel=Normal Map (Bump)|Parorder=54
  
|Parsummary=
+
|Parsummary=Uses a [[Normal Map TOP|Normal Map]] from TOPs to create a 'bump map' effect. Bump-mapping simulates bumps or wrinkles in a surface to give it a 3D depth effect. Your geometry must have tangent attributes created for this feature to work (T[4]). Create these using the [[Attribute Create SOP]].
  
 
|Paritems=
 
|Paritems=
Line 1,987: Line 1,995:
 
{{ParFloat|OPfamily=MAT|OPtype=pbr|Parname=bumpscale|Parlabel=Bump Scale|Parorder=62
 
{{ParFloat|OPfamily=MAT|OPtype=pbr|Parname=bumpscale|Parlabel=Bump Scale|Parorder=62
  
|Parsummary=
+
|Parsummary=A multiplier for the 'bump effect' created by the Normal Map parameter.
  
 
}}
 
}}
 
{{ParToggle|OPfamily=MAT|OPtype=pbr|Parname=parallaxmapping|Parlabel=Parallax Mapping|Parorder=63
 
{{ParToggle|OPfamily=MAT|OPtype=pbr|Parname=parallaxmapping|Parlabel=Parallax Mapping|Parorder=63
  
|Parsummary=
+
|Parsummary=Enable parallax mapping. Must be used in conjunction with a normal map.
  
 
}}
 
}}
 
{{ParFloat|OPfamily=MAT|OPtype=pbr|Parname=parallaxclamp|Parlabel=Parallax Clamp|Parorder=64
 
{{ParFloat|OPfamily=MAT|OPtype=pbr|Parname=parallaxclamp|Parlabel=Parallax Clamp|Parorder=64
  
|Parsummary=
+
|Parsummary=Clamp the parallax shift to a certain value. Parallax shift refers to the calculated offset of the mapped textures.
  
 
}}
 
}}
 
{{ParTopRef|OPfamily=MAT|OPtype=pbr|Parname=emitmap|Parlabel=Emit Map|Parorder=65
 
{{ParTopRef|OPfamily=MAT|OPtype=pbr|Parname=emitmap|Parlabel=Emit Map|Parorder=65
  
|Parsummary=
+
|Parsummary=Specifies a TOP texture that is multiplied with the Emit color parameter of the material. The object must have texture coordinates. The alpha of this map is ignored.
  
 
|Paritems=
 
|Paritems=

Revision as of 14:16, 31 July 2017


  • Invalid title: ""

Summary
[edit]

The PBR MAT creates a material using a Physically Based Rendering (PBR) lighting model. It has support for textures, reflections, bumps, cone lights, rim lights, alpha maps and more.

It also supports Substance Designer PBR materials loaded in the Substance TOP.

You can output its GLSL shader into two DATs for further adaptation in a GLSL MAT by using the Output Shader parameter.

This OP creates physically based materials from texture maps you assign to it and works with any content pipeline whether you use Maya, Houdini, Unreal, Photoshop etc

See also: Substance TOP, and the PBR texture libraries such as Quixel and Poliigon

PythonIcon.png[[{{{opClass}}}]]


Parameters - Page

Template:ParRGB Template:ParFloat Template:ParFloat Template:ParFloat Template:ParFloat Template:ParFloat Template:ParRGB Template:ParRGB Template:ParMenu Template:ParMenu Template:ParButton


Parameters - Page

Template:ParTopRef Template:ParTopRef Template:ParTopRef Template:ParTopRef Template:ParTopRef Template:ParTopRef Template:ParTopRef Template:ParTopRef Template:ParFloat Template:ParToggle Template:ParFloat Template:ParTopRef


Parameters - Page

Template:ParTopRef Template:ParToggle Template:ParFloat Template:ParFloat Template:ParFloat Template:ParToggle Template:ParToggle


Parameters - Page

Template:ParToggle Template:ParTopRef Template:ParRGB Template:ParAngleJack Template:ParFloat Template:ParFloat Template:ParTopRef Template:ParToggle Template:ParTopRef Template:ParRGB Template:ParAngleJack Template:ParFloat Template:ParFloat Template:ParTopRef


Parameters - Page

Template:ParFloat Template:ParRGB Template:ParToggle Template:ParRGB Template:ParTopRef Template:ParToggle Template:ParToggle Template:ParDynamicMenu Template:ParDynamicMenu Template:ParDynamicMenu Template:ParDynamicMenu Template:ParDynamicMenu Template:ParDynamicMenu Template:ParDynamicMenu Template:ParDynamicMenu


Parameters - Page

Template:ParMenu Template:ParMenu Template:ParMenu Template:ParMenu Template:ParMenu Template:ParMenu


Parameters - Page

Template:ParToggle Template:ParMenu Template:ParSopRef Template:ParString Template:ParString Template:ParString Template:ParMatRef


Parameters - Common Page

Blending

Blending is summing the color value of the pixel being drawn and the pixel currently present in the Color-Buffer. Blending is typically used to simulate Transparency. The blending equation is: Final Pixel Value = (Source Blend * Source Color) + (Dest Blend * Destination Color)


Blending(Transparency) blending - This toggle enables and disables blending. However see the wiki article Transparency.

Source Color * srcblend - - This value is multiplied by the color value of the pixel that is being written to the Color-Buffer (also know as the Source Color).

  • Zero zero -
  • Dest Color dcol -
  • One Minus Dest Color omdcol -
  • Source Alpha sa -
  • One Minus Source Alpha omsa -
  • Dest Alpha da -
  • One Minus Dest Alpha omda -
  • Source Alpha Saturate sas -
  • One one -

Destination Color * destblend - - This value is multiplied by the color value of the pixel currently in the Color-Buffer (also known as the Destination Color).

  • One one -
  • Src Color scol -
  • One Minus Src Color omscol -
  • Source Alpha sa -
  • One Minus Source Alpha omsa -
  • Dest Alpha da -
  • One Minus Dest Alpha omda -
  • Zero zero -

Separate Alpha Function separatealphafunc - This toggle enables and disables separate blending options for the alpha values.

Source Alpha * srcblenda - - This value is multiplied by the alpha value of the pixel that is being written to the Color-Buffer (also know as the Source Alpha).

  • Zero zero -
  • Dest Color dcol -
  • One Minus Dest Color omdcol -
  • Source Alpha sa -
  • One Minus Source Alpha omsa -
  • Dest Alpha da -
  • One Minus Dest Alpha omda -
  • Source Alpha Saturate sas -
  • One one -

Destination Alpha * destblenda - - This value is multiplied by the alpha value of the pixel currently in the Color-Buffer (also known as the Destination Alpha).

  • One one -
  • Src Color scol -
  • One Minus Src Color omscol -
  • Source Alpha sa -
  • One Minus Source Alpha omsa -
  • Dest Alpha da -
  • One Minus Dest Alpha omda -
  • Zero zero -

Depth Test

Depth-Testing is comparing the depth value of the pixel being drawn with the pixel currently in the Frame-Buffer. A pixel that is determined to be in-front of the pixel currently in the Frame-Buffer will be drawn over it. Pixels that are determined to be behind the pixel currently in the Frame-Buffer will not be drawn. Depth-Testing allows geometry in a 3D scene to occlude geometry behind it, and be occluded by geometry in-front of it regardless of the order the geometry was drawn.

For a more detailed description of Depth-Testing, refer to the Depth-Test article.


Depth Test depthtest - Enables and disables the Depth-Test. If the depth-test is disabled, depths values aren't written to the Depth-Buffer.

Depth Test Function depthfunc - - The depth value of the pixel being drawn is compared to the depth value currently in the depth-buffer using this function. If the test passes then the pixel is drawn to the Frame-Buffer. If the test fails the pixel is discarded and no changes are made to the Frame-Buffer.

  • Less Than less -
  • Less Than or Equal lessorequal -
  • Equal equal -
  • Greater Than greater -
  • Greater Than or Equal greaterorequal -
  • Not Equal notequal -
  • Always always -

Write Depth Values depthwriting - If Write Depth Values is on, pixels that pass the depth-test will write their depth value to the Depth-Buffer. If this isn't on then no changes will be made to the Depth-Buffer, regardless of if the pixels drawn pass or fail the depth-test.

Alpha Test

Alpha-testing allows you to choose to draw or not draw a pixel based on its alpha value.


Discard Pixels Based on Alpha alphatest - This enables or disables the pixel alpha test.

Keep Pixels with Alpha alphafunc - - This menu works in conjunction with the Alpha Threshold parameter below in determining which pixels to keep based on their alpha value.

  • Less Than less -
  • Less Than or Equal lessorequal -
  • Greater Than greater -
  • Greater Than or Equal greaterorequal -

Alpha Threshold alphathreshold - This value is what the pixel's alpha is compared to to determine if the pixel should be drawn. Pixels with alpha greater than the Alpha Threshold will be drawn. Pixels with alpha less than or equal to the Alpha Threshold will not be drawn.

Wire Frame

The wire-frame feature will render the geometry as wire-frame, using the actual primitive type used in the render. What this means is surfaces like Metaballs, NURBs and Beziers will become a wire-frame of the triangles/triangle-strips used to render them (since these types of primitives can't be natively rendered in OpenGL).


Wire Frame wireframe - - Enables and disables wire-frame rendering with the option of OpenGL Tesselated or Topology based wireframes.

  • Off off -
  • OpenGL Tesselated Wire Frame tesselated -
  • Topology Wire Frame topology -

Line Width wirewidth - This value is the width that the wires will be. This value is in pixels.

Cull Face

The cull face parameter will cull faces from the render output. This can be used as an optimization or sometimes to remove artifacts. See Back-Face Culling for more infomation.


Cull Face cullface - - Selects which faces to render.

  • Use Render Setting userender - Use the render settings found in the Render or Render Pass TOP.
  • Neither neither - Do not cull any faces, render everything.
  • Back Faces backfaces - Cull back faces, render front faces.
  • Front Faces frontfaces - Cull front faces, render back faces.
  • Both Faces bothfaces - Cull both faces, render nothing.

Polygon Depth Offset

This feature pushes the polygons back into space a tiny fraction. This is useful when you are rendering two polygons directly on-top of each other and are experiencing Z-Fighting. Refer to Polygon Depth Offset for more information. This is also an important feature when doing shadows.


Polygon Depth Offset polygonoffset - Turns on the polygon offset feature.

Offset Factor polygonoffsetfactor -

Offset Units polygonoffsetunits -


TouchDesigner Build: