Slim
Paper Cup


return to main index

cutrPaperCup.slim



Introduction

This page presents the code for a custom node that demonstrates how Slim can be used to apply both "shape" (aka displacements) and "shading" to simple geometry in order to achieve a "look" that would be tedious to achieve using geometric modelling or displacement mapping techniques.


A Cupcake Liner

The look to be achieved is shown in the following reference image. Cupcake liners are generally made of thin paper or "metal" foil. Both materials have about 30 ridges that are more-or-less sinusoidal, with a depth that diminishes to almost zero at the base. The ridges have varying degrees of distortion.



Figure 1


The geometry for a liner and its resulting "look" when shaded with the custom node and GPSurface are shown in figures 2 and 3.



Figure 2
24 polygon with edge loop and "subdiv scheme"


Figure 3


cutrPaperCup.slim

Although the code for the slim template is still in development it is intended to provide sufficient flexibility that the shading network requires the least number of nodes. For example, the (preliminary) Slim shading network used for figure 3 is shown below.



Figure 3



Figure 4


An additional custom node called Velvet was used to lighten the color of the ridges but, unfortunately, it lightens both the valleys and the crests of the ridges when it should only effect the valleys. Nonetheless, the cutrPaperCup.slim is a good starting point for further refinement of the node.

The node provides good control over the profile for the ridges - from a pure sine wave to a triangle wave. I am indebted to Aleksandar Rodic for very kindly providing me with the code that sums the odd harmonics of a sine wave. See,
    ShaderToy







© 2002- Malcolm Kesson. All rights reserved.