|
Basic Texture Editing Remap Functions |
|
So then - you've made it this far, now what? The next thing we ought to have a look at are the remap functions - I know that they seem horrible and complicated and result in much wailing and gnashing of teeth, but they are pretty useful too, so let's have a look at how they work and what we can do with them. 1. Open up your TexturesEverywhere.proj file, and double click on our ground cover component, then switch to the materials tab and click on the button to launch us back into the Texture Editor interface. You should see the following (familiar) interface:
2. First, let us change our texture to more clearly see what is happening when we add/change remap functions. Using the color wells as before, change your gradient so that it's color gradient is running from black (on the left of the gradient at 0%) to white (on the right of the gradient at 100%). If you can't remember how to do this, have a look back at parts 1-3 of the tutorial. 3. Notice the two texture buttons below the gradient strip, labeled Remap function 1 and Remap function 2. 4. Click on the one marked Remap Function 1 5. You should see another texture element appear indented in the Texture editor's list. This will be one of the remap functions, by default it will be Bell Curve. Note the indentation - this shows that the function is a child of the parent Fractal Noise element.
6. Make sure that all three preview windows are displaying your texture sample. Check the boxes for Element only, Element & Children, and Root & Children. I will be returning to these display windows in Part 5, so don't worry if you can't understand their exact significance at this stage. 7. Click on your Fractal Noise texture element. You should see the following things displayed in the preview windows:
8. Select the Remap function - Bell Curve element, then click the box marked Enabled to deselect it. This has the effect of disabling that texture element without losing all the settings that you may have input. This can be a useful function when trying to determine whether a particular texture element is having the effect that you want, or if it can be deleted without affecting the overall texture too much. Remember that reducing the number and complexity of elements in your textures will optimize render time. 9. Click the Enabled checkbox again to re-enable the remap function. You should see the preview windows showing the change as you make it. Can you work out what is happening? Probably not....I couldn't the first time I looked at them! If you can work out what is happening, further progression through this part of the tutorial is unnecessary - Congratulations! You can proceed on to Part 5! 10. The rest of us ought to do a bit of playing with the settings to see if things become more clear. 11. Select your Bell Curve function in the element list. 12. Click on the drop down list of texture elements and select Linear from the list. 13. Select and deselect the Enabled checkbox for the new linear element. Do you see any change between the normal and remapped versions of your fractal noise? You shouldn't at this point... 14. Change the Amplitude value to 100%. Do you see a change now? You should see the texture become more contrasty, with less midtones and more pure black and pure white. Those of you who are more astute may be beginning to get an idea of what is happening here. I chose Linear as the remap function because it is easiest to see what is going on with a simple remap function. 15. The Remap graph that you see represents the mathematical remapping of input and output values in the texture (hence, also, the reason why I chose black and white as a color scheme for this part of the tutorial). In layman's terms, what is happening is that WCS looks at the values for RGB at a particular point in the texture and remaps them to other values based on a set of mathematical transformations. If you remember back to the start of this part of the tutorial, I mentioned that these remap functions are like Photoshop's Curves function. Those who have prepress experience will be familiar with performing Gamma Correction on scanned and other artwork for print. A Gamma Curve is just a remap function using an S-shaped curve (normally). 16. If you look at the graph that we've got now, you should see the following:
It is flat at the bottom left, then rises to the top of the graph over about 75% of it's length, then is flat again at the top right. Now you have to imagine that this graph represents input and output values of the texture. What I mean by this is that the horizontal (x) axis of the graph represents input values (the value of the non-remapped texture at that particular point in xyz space). These run from 0 to 1, left to right. The vertical (y) axis represents output values (the value of the remapped texture at that particular point in xyz space). This is helped by the addition of two grayscale value bars to all remap graphs in the preview windows. Note the grayscale running along the bottom and right hand sides of the the remap graph preview window. 17. In our case, those values in the original texture which fall between 0 and approximately 25% gray (RGB 64,64,64) are remapped to 0 (or black). Those values in the original texture which fall between 75% and 100% (RGB 192,192,192 to 255,255,255) are remapped to pure white. The remaining 50% of gray tones are stretched to be spread over the entire 100% tonal range. This has the effect of increasing the contrast by increasing the number of values in the texture at extremes of our range (in this case black to white). Originally, the remap function was working, but it was simply remapping a value of 0 to a value of 0, and a value of 1 to a value of 1. All values in between were also being remapped to the same value...hence, no texture change, although with an unnecessary processor overhead! 18. Try changing the values in the Linear texture element and see what happens. After a while, you should be able to disable the texture preview windows and try and predict what effect your changes will have. 19. Disable the Linear function by clicking it's Enabled checkbox. Change the function to Square Wave from the dropdown list and enter the following values: Phase 50%, Width 100%. Leave all other values at default. The graph should look like this:
20. Our graph now shows a line which is horizontal for half the display then rises vertically and continues at the top of the graph for the remaining half of its length. Applying the reasoning that I used earlier, this should have the following effect: Values from black (0,0,0) to 50% mid gray (128,128,128) will be remapped to the bottom of the graph (ie: 0,0,0 or black) and values above mid gray will be universally remapped to white (or 255, 255,255). This graph should split the texture into black and white areas which previously corresponded to a range of greyscales. 21. Click the Enabled checkbox for the new remap function and see if we were right. Excellent, eh?! 22. Hopefully by now you are getting a feel for the remap functions - there are simply too many parameters and elements to plough through in detail, but the general concepts should be more clear now. If in doubt, draw the graph on a piece of paper and label the two axes Input and Output, then trace your values across the graph to get an idea of how the remap needs to be to affect the texture how you want. An example diagram is below:
You can use the "Custom Curve texture element to create a remap function like the one above very easily, without having to understand the parameters associated with the premade remap elements. 23. Right! Onwards
ever onwards - as soon as you feel confident, let's get on with making
our textures a little more complex, and have a closer look at the
preview swatches that give you an early idea of the way your texture
will look. Part 5 awaits! |