Colour Coding Facades - 2008

Colour Coding is a MEL scripted tool, developed to assign component based patterns to any polygon model in Maya. Basics are simple: the tool reads the subdivision of the polygon model as the grid to apply the pattern and reads the colour of the poly as the parameter to control the pattern. For the code to perform at its best, the faces of the poly should be equal 4 edged faces.
The grid could be defined by the edges of the poly, allowing one component to be placed on each vertex, or by center point of faces, allowing the components to be placed in the middle of the faces. The patterns that I like the most are usually the ones that use both grids simultaneously.

The driving parameter also could be colour of the vertices, commonly known as Colour-Per-Vertex (CPV), or colour of the faces of poly, commonly known as Colour-Per-Face (CPF). Each vertex or each face can have its own unique colour which works as the main parameter for controlling the value of the pattern on that specific point of the grid.

Theoretically the component could be any 2D poly which would lie on the grid and rap around the model. The more complicated the model, the more detailed component needs to be, to be able to take the shape of the model accurately. The tool could work with one individual component, or two topologically equal but separate components. If one component is used, the CPVs or CPFs could be interpreted as the scale of the component. If two components are used, the tool will make a blend between the two and the colour would define the value of the blend between the two extremes of two introduced components.

CPVs and CPFs could be defined by assigning direct colour to the vertices or faces, by using painting tools in Maya, by blending different colours on the model (for this we will need a separate code), or by using the shading values on the model (I will further describe this). The CPVs and CPFs can directly be used as the driving values of the tool, or they could be moderated within the tool. Moderation actions could be changing the contrast, controlling the two extreme values while blending, or adding randomness parameters.
In the examples below I will illustrate the impact of each parameter. I should add that you could always use the same tool and the same technique for controlling 3D objects on a grid (Coming Soon…..)

Samples below show the result of using one component, smoothly changing scale from top to down, or vice versa. The component could behave differently when using the vertices grid than when using the faces grid. You could also just use a different component for each grid.

Following samples have been achieved by blending two different components. Once again we could use different components or different moderating values for each grid.

In examples above I was using a simple gradient between white and black at top and at the bottom of the model. In the examples below I will use the Painting tools in Maya to paint directly on the model.

Adding Randomness Moderating Factor could produce interesting results. Randomness factor can vary between 0 to 100%.

Another unique use of this technique could be assigning pattern which is driven by shading values on the surface. You could always define the position of the sun, calculate the shading values, bake them on the model in Maya as CPVs and use them to control the pattern on the model. In this way for example we could say that the more sun shining on one part of the façade, the more intense the pattern on that part of façade.

We also could use the CPVs and CPFs to actually control the colour of the components. This can be used as an additional parameter adding up to all the previous ones.