Advanced Texture Editing

Multilayered Textures or "Noise Within Noise"

One of the most powerful things about a procedural texture editor, such as the one found in WCS, is the ability to "embed" textures within other textures. That is to say, to take a texture and use it as a control for how 2 other textures will blend together. In fact, you can take this to somewhat ridiculous levels in WCS - each texture element can itself be driven, controlled and remapped by other texture elements which, in turn can be made form other texture elements and so on - ad infinitum...

In the last part of the tutorial, I drew attention to the indented nature of a remap function in the texture element list. This is important, as it also applies to sub-textures or as I shall refer to them from now on, Child Textures. The main texture in the list (the one indented least) is referred to as the Root texture. Children of the Root texture can themselves be Parents of other textures.

Any attempt to continue in this vein is going to result in terminology nightmares, so let's get stuck in and get our hands dirtied...

1. Clone your TexturesEverywhere.proj as TexturesWithinTextures.proj

When prompted to import some data, click No.

2. Select Ground Cover Task Mode

3. Open the Ground Effect Editor for the TexturesEverywhere Ground Effect. Click the Material tab to switch to that page of the editor interface.

4. Click the button by the Ground Effect material's Diffuse Color, and select Edit Texture from the popup menu.

5. The texture editor interface for the Ground Effect's diffuse color will open:

6. Delete the existing Fractal Noise Texture by selecting it in the Elements List, then clicking on the button to the left of the Elements List.

7. When prompted if you wish to remove this texture, click OK.

8. We are now starting from fresh with a new set of textures. Make sure that all 3 Preview Windows are enabled.

9. Click the button to add a new texture element. It will default to Fractal Noise with a scale of 1m in all three axes.

10. Change the 2 colors of the noise to something nice and bright - we want as much contrast as possible to see what is going on. As before, I have used Red (RGB 255,0,0) and Blue (RGB 0,0,255):

11. Select the Red color pin to make it active. Red should show in the color well.

12. Click on the button to the right of the color well.

13. First thing you should notice is that you now have an indented entry in the element list named Color <-Fractal Noise. Also all the preview windows will have changed. Take a second to try and work out what has happened:

14. The Texture editor will have created another instance of Fractal Noise with random colors - in my case it was gray and bile green (lovely!). It will have selectively replaced all the red in the original pattern with this new Fractal Noise pattern. Where you have 50% red in the original (ie: purple in my case), the new pattern gets combined with the blue color at 50% strength. It is as simple as that, but let's not be preemptive, let's take this chance to play and get a feel for it.

15. Select your Root texture element (the original Fractal Noise pattern), and remap it as in Part 4 to give more contrast - I used a Square Wave Remap with an Width of 100% and a Phase of 50%. Note that the remap entry in the element list says Remap Function 1 <- Square Wave . This allows us to see what each child element is affecting from the list:

16. Select your new Fractal Noise element. Select Brick from the drop down list. The entry in the element list should now read Color <-Brick. Click the Center button at the bottom of the texture editor interface. Enter 0.25m into the box for Z. You should see your brick texture appear everywhere now, instead of just a single line in the middle of the texture swatch.

17. The bricks should only be visible where there was red before. Where there was blue in the original pattern, there is still blue:

Let's change that now.

18. Select the Fractal Noise Root texture element. Click the Blue color pin in the gradient to select it, then click the button to the right of it.

19. WCS will again insert a random colored (in my case gray and salmon pink - bleeeccchhh!) Fractal Noise Pattern wherever the blue previously appeared:

20. Select this new entry in the list and choose Pebbles from the drop down list.

21. Adjust the colors of the Pebbles and Brick textures to suit - I used Dark green and yellow in the Pebbles texture, to try and represent some sort of vegetation growing on the wall, with little flowers in it (ahhhh!), and a dark browny-red for the bricks and gray/brown for the mortar. By this time, my texture interface looks like this:

22. Everything still looks a bit flat to me though. Let's try and make it more convincing. Select the Brick texture element in the list.

23. Click the color pin on the color gradient that represents your brick color to make it active.

24. Click the button to the right of the color well. WCS will add a new Fractal Noise pattern wherever there was Brick before. The mortar should remain unaffected.

25. Select the new Fractal Noise pattern, then click the Size button at the bottom of the texture editor interface. Enter a value of 0.1m for x,y, and z axes.

26. Adjust the colors of the new Fractal Noise element so that your gradient runs from a brick color of your choice to black (0,0,0)

27. You should see that the bricks now look far more realistic, so do a similar thing for the mortar, to add some depth to it. In this case, I used a beige color and dark gray and set the size of the texture to 0.05m, but only in the y axis. This gives the impression of streaks on the mortar:

28. Now let us do the same for the greenery: Select the Pebbles texture in the element list and click on the color pin that corresponds to your vegetation color to select it.

29. Click the button to the right of the color well. WCS will, as ever, enter a new Fractal Noise pattern into the list.

30. Select it and choose Turbulence from the Elements drop down list.

31. Click in the middle of the color gradient to add another color pin at around the 50% mark (exact placement isn't important). Set all three colors to be vegetation-like (greens, browns, whatever you want!). I used a series of greens to add variation to the vegetation, and also set the size of the turbulence pattern to 0.5m in all axes. Remap the Turbulence Pattern to give more contrast - I used a Bell Curve with default settings.

28. Wow! If you got through this far, your texture editor interface should look similar to mine, and should be a distinct improvement over the original veg-covered brick texture that we created:

29. Play with all the elements you have created. Disable and re-enable them. See how they interact, and get a feel for what is possible, by perhaps adding another layer of complexity. Be aware that these sorts of textures will take time to render - more time the more complex they become. Try and keep things as simple as you can. In the words of Phil Tippett "it only has to be good enough". 3D is about fooling people into thinking the detail is there, without actually adding all that complexity. Look for the larger patterns and reproduce those first, then concentrate on the detail.

30. Feel free at this point to save your project, or alternatively, you can save the texture settings that you have created as a component. The nice thing about that is that you can then later load this texture component into any texture interface, regardless of the one in which it was first created and applied . eg: you might import a 3d object of a wall and load a texture component onto it that was created in a ground effect component! You are only limited by your imagination! Let's learn another way to create the same effect, but first let's save our component to disk:

31. Click the Save Complete Texture to Disk icon in the top left of the Texture Editor interface.

32. The Save Component to Disk interface will open. Edit the settings to add a name and comment. Now all we need to do is add a thumbnail.

33. Previously we loaded our WCSLastRender.iff image as a thumbnail. This time we are going to use the Preview thumbnail from the Texture Editor.

34. Click on the Thumbnail space (currently empty) on the Save Component to Disk interface, then click on the Root & Children thumbnail on your Texture Editor interface. The Thumbnail will be copied across and your Save Component to Disk interface should look something like this:

35. Select Color<-Brick in the texture element list. This is the element just below the Root Fractal Noise texture element.

36. Click the Delete Element icon.

37. When prompted to remove this Texture, click OK.

38. The Brick texture and all its child elements will disappear from the list and the texture thumbnails will update appropriately:

39. Now click the checkbox marked Self-Opacity. This will have the effect of making the leftmost color pin on your texture gradient completely transparent. Your texture previews will again, update accordingly:

40. Add a new Texture Element by clicking the Add Element icon. As ever, a new Fractal Noise Root texture element will be added to your element list and your Texture Editor will look something like this:

Hopefully this will make things a lot more obvious straight away - the transparent areas of the original texture are allowing the new Fractal Noise texture element to show through beneath it. You could now edit the Fractal Noise element as you did before to create a convincing brick representation, and with the same settings, the end result would look identical to what we achieved before by embedding textures one within the other. Let's try that now:

41. Use the settings provided in steps 16 and 22-27, recreate our brick texture. At the end of which, your texture editor interface should look like this:

Depending on the particular texture you want to create, this method can sometimes be more versatile than the one I showed you originally, which does take a little more planning in advance.

42. Feeling more confident yet? Good - because I'm going to try and explain how those little preview windows work now!

43. In the diagram above, the Root texture element is selected. Therefore, the three preview windows show (from top to bottom): The whole texture (Root & Children), the whole texture (element & children), and the original red and blue fractal noise (element only)

44. Select the Color <- Brick entry now. Your Preview windows should update to reflect something like this:

In this case, the windows show (top to bottom): The whole texture (root & children), the complex brick texture with eroded brickwork and streaked mortar (Element & children), and the original simple 2 color Brick texture (element only)

45. The secret to avoiding confusion here is to remember the terminology: Root refers to the leftmost texture in the indented list (ie: the one that is not indented at all). Unless you start to use self-opacity, this will be at the top of the list. Root & Children therefore refers to the texture created by this root and ALL its children (and their children and grandchildren etc). Element refers to the currently SELECTED element in the list, therefore Element & Children refers to the texture created by this element ONLY and ALL its children (and their children and grandchildren etc). Of course, Element Only displays ONLY the currently selected element, nothing else.

46. Well, I think that wraps this part up! Join me in Part 6 where I'll try and show you how to use a Material Gradient to control the placement and rendering of more than one of these materials.

Copyright © 2003 N-Light Ltd All Rights Reserved