|
1. Range Control and Composite. When setting up tweaks, you will often find that you want a tweak to apply to a smaller range of parameters values. For example if you export a ``dirty up the surface" tweak using the Darken component, it probably doesn't make sense to allow the surface to darken all the way to solid black. As a result, you will want to restrict the tweak values that apply to Darken to a value range like 40% to 100%. Composite is the best component for doing this. Depending on the name of the tweak, you may want to invert how the tweak applies. For example, if you had a tweak named Dirty, you would want 100% to be maximum dirt. If you named it Clean instead, you would want 100% to be the cleanest setting. All you need to to is select Composite's Invert control to make this switch. You can also use Composite to manage multiple controls of different ranges linked to the same tweak. The two composites in the image are both used to control reflectivity through a single tweak. In this example, the edge increases in reflectivity more than the front facing geometry. The edge has a range from 0% to 90% while the facing range is 0% to 20%. Note: Composite is also good for bounding Bump ranges. 2. Rate of change with Composite. Another issue can be the rate at which a tweak control changes. Most parameters in DarkTree are designed to change the texture at a pretty even rate as you change their value. You may not want that behavior, especially if you are controlling multiple parameters with the same tweak. You may want the tweak to ease in more gradually or kick in fast and fade. To do this, use Composite (as described in step 1) and link its Blend Function to a Generator. The example shot shows Composite's Blend Function linked to a Bias. Bias is good for starting slow and accelerating (as in the example image) or starting fast and slowing. Gain and S-Curve are good for ease-in / ease-out rates. If you want to model a behavior exactly, use the Spline Generator. 3. Randomized Color Control. For patterns that allow for a range of random colors, there are two good methods for setting up tweak controls. You could simply use a Color Randomizer and tweak all of its controls. This works but it requires six tweak controls and can be difficult to use. Alternatively, you can use a Color Composite to blend between two tweak colors. To do this, tweak Composite's Color A and Color B for the color range and link the Mask parameter to a Percent Randomizer. In the image below, the color range was set to red and teal. As you can see, the bricks vary between these two colors. Another good method that goes along with randomized color control is biasing the color range toward one end of the color range. To do this simply link Composite's Blend Function to a Bias Generator. Then edit the Bias until you get the look you want. The example below shows the color range heavily biased toward teal. If you want to bias the HSV Attractor method, you will need to add a Percent Composite between the HSV Attractor and Randomizer while linking Composite's Blend Function to a Bias Generator. 4. Specific Color Ranges. Another tweak control structure you might want to have is a percent control that generates a specific range of colors. A good example might be if you wanted an infrared heat camera shader. You could export a control called Temperature. As Temperature increases, you want the surface to go through a specific range of colors representing different temperatures. The Mask Gradient component can serve this task. 5. Blending Generators. Another feature you might want to be able to tweak is a blend between Generator function curves. In the example below, we are blending between a Linear function and a Sine Wave. Again, the solution here is to use the Composite component. To do this, simply link Composite's Percent A and Percent B parameters to the Generators that you want to blend between. Then tweak Composite's Mask parameter as your blend amount. Note: In the example shot below, the Add component is not a necessary part of the tree. It is just there to show what the blended Generators look like. 6. Animation Speed. A final tweak control structure we will go over is an animation speed control. If you are working on a complex animated shader, you may have several sub-animations going on at once. If this is the case, it can be useful to allow the shader user to independently tweak the sub-animation rates. To do this, you will need a Linear Generator and a Composite component in addition to the Time component like in the picture below. First, link Linear's Input parameter to Time. This turns the Linear component into a time based function. Next, link Linear's Amplitude and Shift parameters to Composite. Next, edit Composite. Set Percent A to 50% and Percent B to 0%. Then tweak Mask as your animation rate control. The Amplitude control flattens Linear which slow the animation while Shift will keeps Linear glued to the bottom of the plot so the animation always starts at the beginning. |
Darkling Simulations © 1997-2003 Any questions? Mail me! skyler@darksim.com |