earlyworm portfolio for will earl

Udim Displacement Shader

Using Multi-Tile Displacement Maps in Renderman and 3Delight

A renderman compliant displacement shader which supports multi-tile texture maps using the udim naming convention. The shader supports both displacement and bump mapping. Also if you extract displacements as floating point images from Mudbox or Cyslice the only thing you need to do is make sure the displacement gain is set to 1.0

DOWNLOAD DISPLACEMENT SHADER HERE

Installing…

  1. Download the zip file and extract both files (udim.h and will_basic_dsp.sl) to your shaders directory.
  2. Open up a shell and compile the file called will_basic_dsp.sl using the shader (Renderman) or shaderdl (3Delight) command.
  3. Load the resulting compiled shader into Renderman or 3Delight.

Settings…

  1. Midpoint: Value at which no displacement occurs in your displacement map.
  2. File Extension: File extension used by your textures. Change this according to what type of file your using. TDL = 3Delight, TEX/TX = Renderman.
  3. Max UDimension: The Maximum number of tiles in the U dimension across. Mari uses 10, Zbrush/Cyslice/Mudbox allow you to set this manually.
  4. Reverse T: Flips your texture maps vertically. Use this if the texture comes out the wrong way up.
  5. Use Animated Maps: Allows you to use animated texture maps.
  6. Frame: Frame to use in image sequence.
  7. Use Variant: Allows you to use texture variants.
  8. Variant Name: Name of your texture variant.
  9. Displacement Gain: How much displacement to use.
  10. Displacement Mode: Allows you to set it to Bump or Displacement.
  11. Displacement Texture: Path and name of texture map.

Naming conventions…

The shader uses the following naming conventions.

  • Standard texture = mytexture.$UDIM.tdl
  • Animated texture = mytexture.$FRAME.$UDIM.tdl
  • Variant texture = mytexture_$VARIANT.$UDIM.tdl
  • Animated Variant texture = mytexture_$VARIANT.$FRAME.$UDIM.tdl

Examples…

Below are examples of displacement, bump and what the object looks like without any displacement. These examples are using 4 x 1K maps. I did also extract 2K and 4K maps to test it out, however there was only a subtle difference between the various resolutions as I didn’t put much detail or thought into what I was sculpting – the only real difference was the time it took to extract the 2K and 4K maps. All three sets of maps rendered in about the same time. Click on the images to see the full size renders.

Looking at this you’ll notice some artifacting and stair-stepping in places. In order to test this out I just went haywire with all the various sculpting brushes in Mudbox – the artifacting is present in the hires sculpted geo (only around one million poly faces – so not that hires for a sculpt).

You’ll notice on the inside of the anvil there is what looks like a little black artefact in the bump render, this is expected as in the sculpted geometry that piece folds over itself – again, a result of me be too carefree with the sculpting brushes in Mudbox.

This render is just to show you what the object that I’m using the displacement shader on looks like.

Comments are closed.