Using Darktree Textures on 3d Renders

For the Simbiont:Fusion plugin we added the ability use an image source as the texture coordinate for the Darktree. In this simple tutorial, I’ll show you how to use the UVW input to retexture a image sequence from 3D render passes. And I’ve provided the files so you can try it out yourself.

Simbiont:Fusion UVW Tutorial

Case Study

In this example we are showing how renders from a 3d software package can be used in conjunction with Simbiont:Fusion. I’ll only cover usage as diffuse color, but certainly other techniques can be employed. This example won’t be using any of the 3d tools in Fusion, only image sequences.

dt_pass_diagram

Ingredients
  • Lighting Pass(es) – This is the scene without the textures applied. Mine is all grey but you could have colored lights, sub-surface scattering, or render one pass per light and mix them in post
  • Matte Passes – These let you isolate an object or group of objects
  • UVW pass(es) – This is the most important part. We’ll need a texture that converts position or UVW into RGB. The renders need to be unclamped float color, openEXR for example. In 3ds Max, use InfoTexture, to generate these passes. Make sure that there is no lighting in pass and the textures should be fully self-illumnated. In this tutorial I added two alternate UVW passes to demonstrate some different behaviors.
    • Sticky – Texture sticks to deforming Objects
    • Sliding – Texture Slides when Object Deforms
    • Reflection Vectors - Simulates spherical reflection mapping
  • DarkTrees – These are the files that darktree uses. They consist of the components, like Fusion’s tools, wired up in a node tree, and the settings on all the parameters. Some of those parameters are exposed to the Simbiont called “tweaks.” This is similar to Fusion’s macros. The internals are hidden and only the important controls are exposed.

The composite is pretty straightforward. Copy the matte pass into the alpha of the UVW pass, and isolate area you want to apply the texture. Connect this to the UVW input on the Simbiont tool. At this stage you should see the texture conforming to the original object. Repeat this for all the objects in the scene. Then merge on the lighting pass with the mode set to multiply. At this point the composite is done. Try adjusting the tweaks in the simbionts and the scaling. Also experiment color correcting the lighting.

Results

And here all three versions. We plan on using more interesting models in our examples but tubes and spheres will have to do for now.

Get the Flash Player to see the wordTube Media Player.

This is a close up of the tube with all three variations and with the UVW passes that generated them.

Get the Flash Player to see the wordTube Media Player.
General Advice

Retexturing like most post effects only work on a single sample per pixel. This means that blending operations like anti-aliasing, transparency, reflections etc won’t work in a utility pass ( uvw, z-buffer, etc). Blending in color passes is valid but meaningless in a z-buffer pass. At the edge of an object one must not anti-alias. Combining a distance of 100m and 1m doesn’t mean the pixel really lay at 50m. They must be dealt with separately. This also includes motion blur and depth of field. So consider this technique with care.

The uvw pass should be 32 float and unclamped. Allow for negative values if possible. Remember we are converting position into RGB.

Experiment with manipulation of the uvw pass. Color correct or add noise. Swap the channels.

Tweak passes need be rendered from the 3D scene. Otherwise it will look like the camera is manipulating the texture.

FeedBack

Love feedback. Tell me what you think. I intend to do more tutorials, both for our own tools and also for existing software. So watch this blog.

Ben Lipman

One Response

  1. Chad Says:

    While it is certainly easy to render out tweak passes in 3ds max, you can use the retexturing method you describe to make the tweaks directly in Fusion. Any 2D image or another Darktree could be mapped onto the object, and the result could be used to tweak the SiFu. There’s nothing preventing you from connecting a series of SiFu’s to get the final effect you want. Compositing is fun like that.

Leave a Comment

Please note: Comment moderation is enabled and may delay your comment. There is no need to resubmit your comment.