RixPatterns
Paper Cup


return to main index

Links:
    CutrPaperCup.args
    CutrPaperCup.cpp



Introduction

This page presents a RixPattern node called CutrPaperCup that can be used to control the "shape" and "shading" of simple geometry in order to achieve a look that would be tedious to get using intricate modelling or displacement image mapping techniques.


A Cupcake Liner

The goal of the CutrPaperCup node is make simple geometry, figure 1, look like a corrugated paper cupcake liner - figure 2. Cupcake liners are generally made of thin paper or "metal" foil. Liners generally have 30 ridges that are more-or-less sinusoidal, with a depth that diminishes to almost zero at the base of the liner The ridges have varying degrees of distortion.



Figure 1
24 polygons + edge loop + "subdiv scheme"


Figure 2
Reference Image


The geometry rendered with PxrSurface, PxrDisplace and CutrCup is shown in figure 3.



Figure 3


Using the CutrPaperCup Pattern node
  1. Move the base of the geometry to the center of the modelling plane.
  2. Apply "freeze transforms".
  3. Apply PxrSurface to the model of the paper cup.
  4. Go to the shading group and connect the displacement slot to PxrDisplace.
  5. Connect CutrPaperCup:ridgesF to PxrDisplace:displacementAmount.
  6. Reduce PxrDisplace "Displacement Bound" from 1.0 to 0.03.
  7. Change the shape of the ridges using CutrPaperCup "Ridge Sharpness".
  8. Right mouse click on the PxrSurface node and choose "Graph Network".
  9. Add a PxrMix node and connect it's resultRGB to PxrSurface "Diffuse Color".
  10.     Adjust Color1 and Color2 of the PxrMix node.
  11. Connect CutrPaperCup:maskF to PxrMix "Mix".
  12. Connect CutrPaperCup:maskF to PxrSurface:diffuseTransmitGain (aka. ranslucence".

In the Diffuse Advanced panel of PxrSurface ensure that "Double Sided" and "Use Diffuse Color" are switch on.

An additional custom node called CutrVelvet 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 node presented here is a good starting point for further refinement. The node provides control over the profile for the ridges - from a smooth 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 that enables the profile of the ridges to be "sharpened". See,
    ShaderToy








© 2002- Malcolm Kesson. All rights reserved.