|
Basic Texture Editing Colors and Patterns |
|
We are going
to have a look at some basic texture functions. How do you combine
colors together in a pretty pattern, basically. The application of
this is wide-reaching, as that pattern could be used to drive foliage
density (or anything else with a Unfortunately, that is beyond the scope of this tutorial - a future tutorial may cover texture applications with respect to foliage types (I like to think of it as a "clumpy vegetation generator"!) We are going to look at two things - how to generate a texture comprising more than one color, and how to remap that texture, once you've created it. Remapping is a process where you alter the tonal or color contrast of a texture by shifting the values of that texture around mathematically - I'll explain in more detail later on, but essentially, if you've ever used the curves function in Photoshop or Paintshop Pro, you'll have a pretty good idea of what it does. So, fire up your copy of WCS and let's go to work on the texture editor 1. The first thing you'll need to do is create a new project. Go to the File menu and select New. The create new project interface will appear:
Call the new project "TexturesEverywhere", and click on the Create and Save button. WCS will create you new project and will ask if you wish to import some data. Click No - we are going to create a new DEM of a suitable size with the Fractal DEM designer. 2. Now that you project has been created, right click in an empty matrix cell and select TexturesEverywhere Camera as the View. 3. Click the
Terrain Generator icon
your OpenGL View should update to reflect a preview of the terrain you are about to create. Note: The resolution of this preview is set with the Size parameter in the top right of the General Page of the newly created Terrain Generator Editor, and is independent of the Max Polys setting in the View Preferences. The Terrain model does not actually exist at this time, it is simply a preview of the settings entered into the Terrain Generator Editor interface. 4. Click on the Coverage Tab and change the values to match the ones shown below:
5. Switch Back to the General page, and set your Elevation Range value to 100. It will have been proportionally scaled from it's original value when you set a smaller terrain size in the last step. 6. Click the Create DEM button to create and save your .elev file in the project folder. Once WCS or VNS has done it's work (which shouldn't take long), you can close the Fractal Terrain generator interface. Voila! We have land! The terrain we have generated is 1000 meters wide and 100 meters high at its highest point. This is not too extreme, and it should be easy to remember the values when we start to look at sizing our texture. 7. Choose a point for your camera: Double click on the TexturesEverywhere Camera in the Scene-at-a-glance (hereafter referred to as the S@G). The Camera editor will pop up:
I found the above values to work well for me - we have a reasonably large area of our terrain visible, and we have some extremes of elevation in the picture (in my case it ranged from 49.2m to 94.5m). 8. Select your TexturesEverywhere camera view, and press F9. Boring isn't it?
Our landscape is being rendered using the default Ground Effect (which happens to be a dull gray). Don't worry about that - we're going to liven it up now. 9. Select the
Ground Cover task mode in S@G 10. Expand the Ground Effects category, and double click on TexturesEverywhere Ground. The following interface will appear:
11. Click on
the Material tab, and you will se the following interface:
12. Click the
13. Select Create
Texture from the popup menu. The Texture Editor will appear - at last!
yours will look different to this, as WCS chooses a random color for the second texture color. Everything else about the interface should look the same as above. WCS creates a new fractal noise pattern, and applies the two colors in a blotchy fashion, using it. There are other texture "pattern generators", but we are going to use fractal noise for now. We'll have a look at some of the others in the advanced editing section. 14. Move the texture editor so you can see your TexturesEverywhere camera view, select that window and hit F9 again. Wow! we now have a fractal noise texture of gray and another color covering the land: If your colors are similar, you may not clearly see what's going on. Let's change that. 15. Click on the left most pin under the color gradient (it should be gray)
then click in the color well to the right of the gradient:
Hopefully, the Color Editor should appear:
16. Change your gray color using the sliders or numeric entry boxes to a bright red color, say RGB 255, 0,0 17. Perform the same steps for the other color (at the right end of the gradient), but change its color to a bright blue, say RGB 0,0,255. You should see the results updated in the texture editor views - it is a bit clearer now!
18. Switch back to your Camera view and re-render - mmmmmmm, sort of blotchy, speckled red, blue and purple (where the red and blue are mixing).
The texture pattern is not visible enough though, so let's change that next. 19. Go to the Size and Position controls at the bottom edge of the texture editor window
and enter 10m on each axis. 20. Select your Camera View and hit F9 again to rerender. That's better!
Our texture shows it's true blotchiness now - if you want to see the pattern more clearly in the texture editor, increase the Preview size field in the top right hand corner. Now would be a good time to save your project (Ctrl-S). 21. Change the X axis size to 1 meter. Hit F9 to rerender - now our texture is oriented in thin streaks across the terrain:
Applied vertically, fractal noise is great for making water stains, dirt and streaks on surfaces. 22. How about something different? Change the X axis to 100 meters Z axis size to 1 meters. This refers to the size of the texture patterns in the up-down axis (elevation). See if you can guess what the texture will look like before rendering it. You should find that in places, it looks a bit like blue and red contour lines!
That's because the fractal noise is in large "plates" 100 meters by 100 meters by 1 meter thick. You only see the texture where it intersects the ground effect (ie: terrain), so we get a psychedelic stratification effect on areas where there is a reasonable slope, such as the sinkhole in the foreground. In flat areas, the texture would look like 100m by 100m areas of blue and red noise as before. So we have achieved an interesting effect by rescaling the texture disproportionately. You will find that it sometimes helps to change the scale values independently of each other to get the correct effect 23. Let's try something else, before we restore our texture to it's original scaling of 10m in each axis. Click on the Falloff button in the size and position controls. Enter 1 into the X and Y axis fields. This is a rating in %/m, so what we have told the editor to do is fade the texture out over 100/1 meters or 100m. Activate your view and hit F9, and see. Hmmm, not really the effect we wanted, was it? You should be able to see a patch of blue and red just over the hill at the top of the frame, but not much else - everything has returned to gray This is because the texture references it's falloff to it's own center. At the moment, the texture's center is the center of our DEM. 24. Open the TexturesEverywhere Overhead camera in a matrix cell. Take a look at your camera position. It is lying along the South edge of your DEM, facing roughly North-East. The DEM is 1000 meters wide, so we need to move the texture center about 300 meters South (Y axis), and about 100m West (X axis). Click the Center Button, and enter -300 into the Y axis field, and -100 into the X axis field. 25. Hit F9 to rerender your camera view. Hey Presto! Now we can see the fading rings of color, roughly centered in our view:
26. Try one more thing before we move on: Select the original fractal noise pattern (at the top of the texture editor Elements List) 27. Set the texture falloff values back to 0 in each of the X and Y axes. 28. Set the Texture Size to 100m in each of the X and Y axes, and 1m in the Z axis 29. Re-render to get an idea of what the texture looks like:
30. Click the Rotation button, and enter 15 into the X axis field. Rerender (F9). Do you see what is happening? The artificial (and fading) strata have been rotated 15 degrees around the north-south axis (Y):
With some more realistic colors and the color texture copied to the bump channel, here is a very convincing Stratified sandstone surface:
Given that we are using a default texture in a basic Ground Effect with very few changes, it's pretty impressive, and should show you how easy it is to ! 31. Reset all your texture settings back to defaults by loading the earlier saved version of the project & everything will return to how it was. Funnily enough, center is not important now we are not using falloff, as the fractal noise pattern has no easily discernible center itself. Notice we didn't change any velocity functions: changing these allows you to move a texture in any (or all) of the axes independently. Thus you could have our fractal pattern drifting across our ground over time. Try this out if you wish - it involves no keyframing, the velocity is internal to the texture. Just set it up and render a few dozen frames to get the idea. Remember to use appropriate sized units - there are 30 f/second for NTSC video, and 25 for PAL. If we set our texture to move 1cm per frame, it will take about 17 seconds to move the distance of one polygon in our terrain! Conversely, a setting of 100m per frame will make it rush so fast, it'll just seem to flicker. You should have a reasonable idea of texture placement and animation now, if you want, clone your existing project, and replace your fractal noise with another texture element from the drop-down list. If you want more detail on each of the elements and the specific parameters that can be modified for each, refer to the Texture Editor section in the WCS online reference manual. So now let's move on to Part 3 where we'll look at some of the other gadgets in the texture editor interface. |