Have you ever found yourself executing repetitive actions like creating a shader, plugging-in texture nodes, connecting attributes, setting parameters and then doing it over again for another object? When I was creating the ‘Creepy still life’ artwork I felt the need to have a tool which would automate the look development process by storing my shader network setups as a library of materials which would be accessible and build interactively during a render session.
After I realized that I was spending too much time on trivial tasks, I decided to write a framework which would take care of the routine part . This is how BlissLib was born. It took me around two weeks to write the tool and it came out pretty robust. The framework allows a user to build a library of shader networks and presets for interactive reuse and storage. And because the framework came out to be pretty cool, I couldn’t just keep it for myself, so I share it with you guys absolutely for free. In addition, the tool comes with a simple UI to browse the shader library. I included several RenderMan and Mental Ray material examples which demonstrate the functionality of the tool. Here is the video which demonstrates BlissLib functionality.
BlissLib has already found its home at LollipopShaders team, who helped to make the tool as production friendly as possible. LollipopShaders used BlissLib to author their RenderMan RIS100 library. Check it out, they have a free library sample with 20 nice presets on lollipopshaders.com
In order to install BlissLib, we need to make 5 simple steps:
Step 1. Download the package. Unpack its content inside Maya scripts folder.
Windows: C:\Users\UserName\Documents\maya\2016\scripts OSX: /Users/UserName/Library/Preferences/Autodesk/maya/2016/scripts
Step 2. Open Maya ScriptEditor, create a Python tab and copy paste this code
import BlissLib blissUI = BlissLib.buildUI()
Step 3. Run the code. And you’ll see the BlissLib browser.
Step 4. Create a new PxrDisney material or mia_material_x assign it to an object. Select the object and click on a swatch with corresponding render logo on it. The selected material will be adjusted according to the swatch clicked.
Step 5. Drag and drop the code into Maya Shelf to create a button so we don’t have to run the code from Script Editor each time we want to launch BlissLib. These are simple installation steps to load and use the shader network examples.
To author your very own custom shader library:
First of all, we need to create a Maya scene. Create a set of configured shader networks or simple materials of your preferred renderer. Give shaders meaningful names. And run the following lines in a Maya Script Editor.
from BlissLib import shadingNetworkIO shadingNetworkIO.ShadingNetwork.writeNetwork()
This command will create a database of all materials. So if we open BlissLib with our shelf button we will see a new set of buttons with the names of the created materials. However, the buttons do not have swatches! No worries, we haven’t created any swatches yet. It is a fairly easy process. All we need to do is to create a 150×150 pixel image for every material we just created. Each picture should have exactly the same name as the material it represents. So if we have a material named CarPaint the image should be named CarPaint.jpg Once the thumbnails are ready, copy them into the swatch directory.
Windows: C:\Users\User_1\Documents\maya\2016\scripts\BlissLib\swatch OSX: /Users/UserName/Library/Preferences/Autodesk/maya/2016/scripts/BlissLib/swatch
Next time we launch BlissLib the buttons will have swatches we just created.
That is it! BlissLib can support complex and heavy networks and has been tested with Renderman RIS, Mental Ray and Maya Software. In theory it should work with any renderer which plays nicely with Maya Hypershade.
BlissLib supports Maya 2014, 2015, 2016 and on. Follow @renderstory to get new updates on tech and storytelling.