Intro Tweak Tutorial - The purpose of this tutorial is to introduce you to Tweaks in DarkTree 2.0. We will do this by adding tweak controls to the texture we designed in the DarkTree 2 Introduction tutorial.

1. What is a Tweak?

A Tweak is a macro control that allows you to modify a DarkTree shader without having to go in and actually edit the texture tree or components. Once a shader is tweaked, those tweak controls are available in the bitmap renderer and the Simbiont plugins.

There are several reasons you would want to set up tweaks for darktree.  One reason is that you can set up controls while you are designing the texture and understand how it works. Later when you want to change the look of the material, you don’t have to know how the texture was designed. Another reason for using tweaks is that you can control any number of parameters with a single tweak control.  This lets you set up high level controls like the rustiness of a metal material or the pitting in a concrete material.  A final reason is that those tweak controls will show up in any of the Simbiont plugins.  Through the Simbiont plugins, you can tie tweak controls into advanced features like weight maps, time, images, and more (features depend on the 3D application).

2. Let’s tweak some lichen.

A For this tutorial, we are going to add tweak controls to the texture we made in the DarkTree2 Introduction tutorial.  If you don’t have that darktree, you can download it by clicking here.  Open the rock texture in the DarkTree Editor.

The rock material has small green flecks that show as lichen.  The color Rough component is what adds the green spots.  We are going to add tweaks to Rough to control the color and amount of lichen.

First, double click on the Rough component.  The Component Editor should look like the screenshot. Left click on the High parameter’s tweak pad and select New Tweak.  The tweak pad is a small box that is directly to the right of the parameter’s name. The red arrow in the screenshot shows High’s tweaks pad. Once you select New Tweak , a dialog window will pop up where you can name the new link. Use the name “Lichen Color”. The tweaked parameter will look like:  The vertical line through the type icon always indicates the parameter has been tweaked. Its meant to look like a screw head.

Now left click on Brightness’s Links Pad and call the new tweak “Lichen Amount”. Brightness will basically control how much green is shown on the surface.

3. Adjusting tweaks in the DarkTree Editor.

Now that the Lichen part of the texture has tweaks set up, lets try changing the values of the tweaks from the Tweaks Panel.  The Tweaks Panel is on the left side of the DarkTree Editor in the same area where you get components.  To get to the page with tweak controls, click on the Tweak tab (see screen shot).

Here, you will see the two tweaks you set up in step 2.  Try changing the values and see how it affects the texture.  Note that when you select a tweak here, you will see yellow corner brackets around the component(s) that are are linked to the given tweak. This can be quite useful for finding out which components are tweaked.

From the Tweaks Panel, you can set values, delete, rename, and re-order the tweaks.  To change the order of the tweaks in the list, drag them to a new spot in the list. The order here will be the same order that the tweaks show up in the Simbiont plugins.

Note:  If you make any mistakes while editing the tweaks, you can undo what you have done with Ctrl+z (also under the Edit menu).

4. Tweak the rock color. 

Lets go ahead and finish tweaking the rock colors so they can be adjusted by anyone using this darktree. The rock color is all specified in the color Pumice component so double click on it to open its component editor.  Assign a tweak named “Rock Color 1” to the Background parameter and “Rock Color 2” to the Pit parameter.

Now we have total tweak control over the coloration of the rocks.  As an example of what we can do with these controls, I set the Rock Color 1 to R=130, G=212, B=198, Lichen Amount to 44%, and Lichen color to R=80, G=80, B=80.  The Examine Window screen shot shows how these settings look.

4. Rubble tweaks.

Now, lets setup one last set of tweaks to control the rockiness. Edit the bump Gravel component.  Make a new tweak for the Roughness parameter and call it “Ruble”. This control sets how many small rocks are in among the larger bolders.  Next make a new tweak for the Gap Size called “Rock Gap”.  This will be good for spreading out the rocks.

Now that the bump settings for the rock are tweaked, we need to set up the gap darkening part of the material so that it matches.  The darkening is controled by the percent Gravel component.  Double click the component to edit it.  Here we want to set up the Ruble and Rock Gap controls like we did for the bump version.  Since these tweaks already exist, you don’t need to make new ones .  When you click to assign a tweak, choose Tweak With and the right tweak name: Ruble for Roughness and Rock Gap for Gap Size.

The rock material is now pretty well set up with tweak controls. It is now a very versitile texture that you can use with a number of projects and still keep it looking new and unique by changing tweak values.  Below are some examples of different settings for the Ruble and Rock Gap controls.

Copyright © 2006 Darkling Simulations, LLC. All rights reserved.         Any questions? Mail me! skyler@darksim.com