Home Creators Posts Import Register Favorites Logout

Downloads

Some files exceed the archive size limit and weren't saved: 1 file. Please note these limits are in place to keep this site running long term, without costing a fortune. You can favorite the creator though, certain milestones increase the limit.

Content

In Part 4 we imported our USD chess set, created a turntable animation and a "game in progress" pose. Now it's time to set up lights and begin the material creation process!

First, we'll import another piece of geometry, a simple curved backdrop (download attached at the end of this article). Connect it and the existing chess set SceneReader to a MergeScenes node. We'll need to resize the backdrop to fit the scale and position of the scene.

Next, we'll create a standard three-point light setup. Create three cyclesQuadLights, connect them to a Group node and name it lights. (Note that I'm adding backdrops as I go in order to keep the node graph visually organized.)

Set the Name parameter on each light so they're easily identifiable. I chose light_right, light_left and light_top. 

Connect the output of the Group node to our main MergeScenes  node. The lights will now show up as a new entry in the Hierarchy View. 

Using the viewport controls we can position the lights, or use the Translate, Rotate and Scale parameters in the individual light nodes for more precise control.

Now we can create materials for each element in our scene. In Cycles, surface materials and displacement are managed separately, so we'll start with the surface materials first. We need materials for the following geometry groups:

- Chess board border- Chess board inlay edge- Chess board squares

- Backdrop

- Felt

2x (black and white):

- Pawns- Knights- Rooks- Bishops- Kings- Queens

That's 17 total. We'll also need cyclesImageTexture nodes for the color and roughness textures on each material. Set up a single cyclesPrincipledBsdf with the two textures plugged in to the Base Color and Roughness ports, respectively. Connect this to a ShaderAssignment node to finish our base material setup. 

These nodes can be copied and pasted to fill in the rest of the materials needed. Note that we're inserting all of this before the turntable and pose branches in the node tree. The order doesn't matter though; the material nodes could just as well be placed at the end.

The full texture set is attached to this article. There are color, roughness and displacement maps for all the chess set geo. Download and extract the archive, then populate the Filename field in each cyclesImageTexture node with the appropriate image.

Each ShaderAssignment will need a PathFilter to point it to the correct geometry. This is a great time to introduce some more advanced path filtering concepts. For example, we'll want every white pawn and every black pawn to have the same material. A quick and easy way to accomplish this is to set the path to /black/pawns/pawn*/pawn/pawn. The * wildcard replaces the 01, 02, 03, etc. in the paths. The /pawn/pawn at the end points to the pawn mesh only, not the felt geo and curves. We can repeat this same process for every object in the scene, such as /white/rooks/rook*/rook/rook.

Later on in the lookdev process we'll want to tweak individual parameters, such as specularity, but doing so on each material separately would be a pain. Since all the pieces are likely to need the exact same settings, we can connect a shared cyclesValue node to the Specular inputs on our chess pieces. This way we can easily control that parameter from a single location. We'll cover how to approach tasks like this with scripting later on. Here's what it looks like with a cyclesValue connected to all of the finished chess piece materials:

Note that pieces of the same type share the same roughness textures, so we can connect that texture to the inputs on multiple cyclesPrincipledBsdfs, as also shown above.

After setting everything up you should have a node network similar to this. Deploy backdrops aplenty to keep things easy to follow!

Before we start a test render, we need to create a fix for a small bug in Gaffer's Cycles integration. For now, Cycles overrides the material assignment on the same instanced geometry. The black and white piece geo is identical, but we want to assign different materials depending on the color. To work around this we need to add a PrimitiveVariables node with a string value called usd_fix set to the expression ${scene:path}. Click the plus icon, then enter the values as follows:

Add a PathFilter pointing this to all of the chess piece geo. We don't need to create this fix for any other objects in the scene, just the pieces.

What this does is add an attribute to each piece with a unique name based on the path. This forces Cycles to treat each instance as separate geo, letting us assign different materials as desired.

Let's fire up a render and see how things are looking:

A bit dark! This is a good opportunity to use the Light Editor to control all the lights in our scene from one convenient location. Simply choose Cycles from the dropdown and the list should be populated with our lights group and the three quad lights. Increase the intensity/exposure of each until the scene is nicely lit.

That's all for lights and materials! Coming up in Part 6 we'll cover everything we need to start rendering, including cameras, geometry and render settings, and an Image Catalogue. Click here!

Files

Comments

No comments found for this post.