Quote from: calico on January 16, 2008, 10:35:58 PM
@moodflow - When you have time, would you explain the Fractal Dirt 2 node group? In particular, I care about what the function nodes are and what the inverse nodes are. I'm assuming the functions are scalar to color and the inverse nodes are PFs...but what are these doing? [edit - Nope. Not PFs...still searching]
No problem Calico. This is just a fractal stack group, which took some time to develop.
Here is the theory:
Fractals have random detail, but repeating
scale. This kills the natural look. I wanted to break this up, and make it look natural. In nature, detail has various levels, varied continuously (ie analog), so we rarely see scale repetition. Can't do this in TG2 since we are working with nodes (boolean). So we'll have to stack them to simulate it, kinda like digital "simulates" analog via sample levels. In fact, I've found only a few levels should do the trick in TG2, and provide enough detail to simulate this continuous variation.
Here's how I did it (refer to that group as you read through this):
Start out with a large scale fractal, no greater than 8 octaves (though you can use any number), so kinda "blobby", but at a very large scale, like 10000 (about as big as you can see in most images unless its a high altitude image). Then use this to affect the next powerfractal down the list, each one affecting the one below it, AND dropping in scale.
In this fractal stack, I started out with scale of 1000, and selected a base high and base low color. Lets say the high color is a dark brown, and the low color is black. So there are those 2 colors and every mix of those two in between. But thats still not enough detail or color variation (for me atleast). I want to break this up with more color and a different fractal scale so the scale doesn't repeat, and more color detail is added (win/win situation).
With this first power fractal as a base, there are high colors and low colors. Lets first break up the high colors even more, with a different scaled fractal and different colors to spice it up. So create another fractal with a smaller scale and different colors (I named mine A). We'll use the original fractal to tell this fractal where to put this new detail on the overall stack. To do this in TG2, the original fractal's colors will be used as a mask. So brighter colors are more applied, darker colors are less applied. I used a "luminous to scalar" node to convert the original fractals colors to grayscale - though this may not be needed. I renamed it to "grayscale" to keep confusion down. Then plugged this node into the new fractal's blending shader. Now the new fractal knows where to apply its scale and new colors to the original fractal. It will not apply these colors to the darker areas. Good, but then these leaves darker areas "open". They need to be filled with detail and color as well. So I then created another power fractal (and named this one B) with the same scale as A, but different random number, and different colors. Then I used a "color adjust shader" to invert the colors of the grayscale node so that the darker colors are now the lighter colors. Now power fractal B knows where to apply its magic to the overall stack.
Now, do this down the list, dropping in scale each time. I used a drop down ratio of 10, starting from 1000, and ending at a scale of 0.1 (I skipped a few levels on that particular group). The results are really nice with detail at nearly every level from 1000 to 0.1 (as well as different colors). I tried to keep colors similar, but just different enough.