Shih-Chin


Study Notes about Computer Graphics

Implementing Disney Principled BRDF in Arnold

Disney “principled” BRDF [1] is a very interesting shading model. It can achieve various physically plausible appearances with only one color parameter and ten scalar parameters! This shading model is designed not only to catch most of the measured data from MERL, but also to follow the principles below: Intuitive rather than physical. As few parameters as possible. Parameters are zero to one over their plausible range. Parameters are allowed to be pushed beyond their plausible range where it makes sense. » read more »
Arnold , BRDF

Implementing GGX BRDF in Arnold with Multiple Importance Sampling

Monte Carlo path tracing has a slow convergence rate close to \(O(1/\sqrt n)\), it needs to quadruple the number of samples to halve the error. Many mainstream production renderers have deployed multiple importance sampling (MIS) technique to reduce the variance of sampling result (i.e. the noise in image). If we want to make our custom material shader efficiently executed along with the entire render scene in Arnold, we shall definitely consider exploiting the power of MIS. » read more »
Arnold , BRDF , Importance Sampling

Quick Start Guide for PySide in Maya

The goal of tool-making is to make users do certain works more efficiently. A functional tool with poor designed interface would not be fully utilized by users, because users aren’t willing to use that tool if the interaction makes them feel frustrated.

» read more »
Maya API , Python , PySide

Assign Custom Shapes' Components to Sets in Maya

Recently, I tried to extend the functionalities of GPU cache in Maya with dag item selection and shader assignment. In order to achieve the seamless integration, the idea is to use face component to represent each dag item within the Alembic cache. Therefore, users can select the dag item from the cache in component mode and assign those components to a shader. This idea is pretty simple, but the implementation is not as easy as it sounds. » read more »
Maya API

Render Tips for Arnold in Maya

All photo-realistic ray-tracers are trying to solve the rendering equation. Although they are all categorized as ray-tracer instead of rasterizer, the infrastructure of each implementations are quite different (i.e. uni-directional vs. bi-directional, pure path tracing vs. works with photon-map or irradiance caching, etc).

Arnold is an un-bias uni-directional path tracer with a remarkable importance sampling mechanism and great memory management to achieve amazing performance excellence. However, if we blindly increase the number of ray samples for every render scene, we would not always get a cleaner imagery. Which means that when we switch from one ray-tracer to another, we had better use different strategies to adjust render settings. Here is the summary about what I’ve learned from experience, hope it would help any Arnold user. :)

» read more »
Arnold , Maya

Building AbcExport/AbcImport on Windows

Alembic is a popular data format for geometry cache nowadays, however, there are no simple workflow to build the AbcImport/AbcExport on windows. In this post, I tried to demonstrate a building flow as simple as possible.

Here is the pre-built binaries for Maya 2013 x64.

» read more »
CMake , Maya

Insert checking routine right before file opening in Maya

ScriptJob is a very convenient approach for us to register a routine for certain event. However, when we want to inject a check routine for an opened file and to be capable of canceling the open operation of the invalid file. We will find that ScriptJob only contains NewSceneOpened, PostSceneRead and SceneOpened, …, and none of these events can abort the current operation within our registered routine. Fortunately, the MSceneMessage from API could help us achieve our purpose: » read more »
Maya API , Python

Sorting is FUN

Since few artist friends of mine want to learn about computer programming, thus we formed a small python learning group, we call it PyClub, in our office. Recently at our PyClub, I introduced some sorting algorithms by demonstrating with poker cards. It’s especially fun for all of us to sort a deck of cards manually with quicksort algorithm, and we all felt the power of divide-and-conquer at that moment! However, the pseudo codes are not easy for my artist friends to memorize the algorithms, so I tried to find some other resources about the visualization of sorting algorithms. » read more »
Coding

Building PySide for Maya 2012 on Windows

One of my friend received some tools developed in PySide for Maya recently. He tried to copy the latest pre-built binaries of PySide into Maya’s site-packages but got an import error. Therefore, we have to build the PySide for Maya from the ground up and this post is about the entire building process we’ve been through. Hope this note might be helpful for people who want to use PySide in Maya. :)

BTW, the PySide for Maya 2012 built by vc9 can be downloaded here, enjoy it!

» read more »
Maya , PySide , CMake

How to select hard edges from a mesh in Maya?

A hard edge (aka crease edge or feature edge) is: shared by two polygons. and the dihedral angle (i.e the angle between two polygons) is above user-specified threshold. To find these edges in Maya, the intuitive approach is to traverse all the edges by MItMeshEdge and examining the dot product of two adjacent faces’ normals. Suppose we have MObject(s) of target mesh and edge components (optional) selected by user, and we want to replace current selection with the hard edges from these input. » read more »
Maya API , Python