Date: Fri, 29 Mar 2024 08:27:55 +0000 (UTC) Message-ID: <250826183.527.1711700875743@ip-10-0-0-233.us-west-2.compute.internal> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_526_781915187.1711700875741" ------=_Part_526_781915187.1711700875741 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html
RenderMan allows for creating complex looks through layering materials. = This means effects like car paint, labels on bottles, dirt or mud, can all = be layered efficiently for rendering.
Below you can find a step by step example of creating a patina on a bron= ze statue. At the bottom of this tutorial you can find a Katana scene to do= wnload with the parts necessary to reproduce this image.
Load the layeredMaterial_prep.katana tut= orial scene which contains the framework for loading the statue geometry, a= ground plane and spot lights. The scene is renderable at this point,= however we have no materials assigned to the statue so it will render with= RenderMan's default Bxdf shader: PxrDiffuse.
Create a shading network and assign a PxrLayerSurface&= nbsp;Bxdf to your object. This is the framework that will inform RenderMan = which materials will be rendered for the assigned object (new nodes are col= ored with red):
At this point you could render with our new shading network but there's = not much you can do with this material on its own; this node has a limited = set of attributes. The reason for this is that PxrLayerSurface is des= igned as the Bxdf on top of which layers of patterns are combined. Px= rLayerSurface contains only global attributes which would apply to all laye= rs. Layer-specific attributes such as color and texture come from upstream = materlal(s) connected into the inputMaterial att= ribute.
From here planning is very important to avoid duplicating work and makin= g your material network as simple and useful as possible. In researching th= e creation of a patina on copper or other metal you will find it is a multi= -stage project which can involve a variety of methods. Depending on t= he look you are aiming for the layout of the materials will vary. For examp= le, heating a metal to produce different colors could be replicated using t= he iridescence attributes in PxrLayerSurface.&nb= sp; Another method for creating a patina is to use vinegar and salt to crea= te a crust on the metal, which is the look we'll experiment with here.
Two basic layers of materials are needed:
Below are the layers seen separately:
= span> |
---|
Create a PxrLayerMixe= r and connect its out port to th= e inputMaterial port of the PxrLayerSurface.&nbs= p; This sets up the node where we will be connecting all the layers. Let's = take a look at the default state of a PxrLayerMixer shading node:
There is a BaseLayer plus four other layers, =
numbered 1-4. Note that Layer 1 is enabled by de=
fault with the assumption being that there will usually be at least two lay=
ers coming in to the PxrLayerMixer. If a layer is enabled but not con=
nected the entire render will go black. We will focus on building our=
base layer first so let's disable Layer 1 until=
we wire our patina layer in. Note you can connect other PxrLayerMixers int=
o the layers for using collections of looks and masking them together. This=
is great if you want to reuse networks somewhere else. For this example we=
're just using two layers, the Base and
The Copper/Bronze will be our "base" layer. Create a PxrLayer= and connect its pxrMaterialOut port to the= Base Layer input port of the PxrLayerMixer.
To approximate a copper material we set the diffuse and specular then ad= d some procedural bump so the copper has a nice texture to it. = The settings are somewhat arbitrary since they are art directed, but we're = looking for an older dull copper or bronze look:
The Patina will be our "Layer 1", sitting on top of the base layer. = ; Create another PxrLayer node and connect its pxrMaterialOut<= /strong> output port to the Layer 1 input p= ort of your PxrLayerMixer. Note that you may have to re-enable Layer 1 if y= ou had disabled it while working on the base layer. The patina shadin= g is a diffuse color is sampled from a real image with some diffuse roughne= ss to help bring out the "powdery" look from the patina crust. We've = added a PxrFractal and a bump pattern to increase the realism. The pr= evious bump pattern is used again in this layer to be consistent but you co= uld actually use a different one here to really improve the realism.
This layer will completely cover the Base lay= er until we add an input to Layer 1 Mask.
We could accomplish this using textures but instead we make use of the&n= bsp;PxrDirt node to control where the patina and metal are seen.&= nbsp; PxrDirt is an occlusion shader which allows us shading effects affect= ed by the local topology in the geometry (i.e. nooks & crannies). Creat= e a new PrmanShadingNode and set the node type to PxrDirt. Its output is a = color but since we're creating a mask you can wire the resultR= into the Layer 1 Mask of the PxrLayerMi= xer (you could also use a PxrToFloat to convert the color into a scalar val= ue).
=
To produce the weathering pattern seen in the final image we increase th= e Y component of the Bias Normal attribute in Px= rDirt to stretch out the result vertically as if rain and weathering has ru= n down the statue. The PxrDirt Unoccluded a= ttribute is driven by a PxrFractal and PxrGamma to break up the result some= and control the strength respectively. Note the extra PSN_PxrConstant node= that is sitting below PxrDirt. By connecting the PxrDirt output = ;resultRGB into the emitColor&n= bsp;of the PxrConstant we could swap the PxrLayerSurface Bxdf for the PxrCo= nstant Bxdf to see the dirt layer mask rendered independently.
Below is the resulting mask rendered alone from PxrDirt:
The model is free from Three D Scans .
Find the Katana scene link above, and the Three D Scans link to obtai= n some geometry.