TSE/Atlas/Create a Terrain/Carving Roads Into Atlas
From TDN
Introduction
In the absence of terrain painting and shaping tools for Atlas, we've been pretty creative with deforming terrain using Photoshop. Here is a method for creating roads or dirt paths by modifying heightmaps in Photoshop.
Contents |
Create the Atlas Source Files
For starters, create the source files in L3DT (or other preferred terrain generation tool). This example used a 512KB Greyscale Heightmap in .RAW format and a 2048 Color Texturemap in JPEG format. Our texture map is intentionally 4x larger than the heightmap in order to show greater texture resolution.
Draw the Roads in Photoshop
Step 1. Load the .RAW file into Photoshop.
Step 2. Create a new Layer (Layer->New Layer) for the file, named Road
Step 3. Select the Brush tool (or press B)
Step 4. Set the brush size as you need it (start with 16 pixels for now) and 100% pressure - the higher the pixel size of the brush, the wider the road will be. Also, be sure to set the brush to solid Black
Step 5. Select the Pen tool (or press P) and select 'Paths' from the options (not 'shape layers')
Step 6. On the Road layer, start dropping points along your road path
Step 7. After all the anchor points are plotted, right mouse click on the path
Step 8. Select 'Stroke Path' from the popup window and choose the Brush tool
Step 9. With the Road layer selected reduce it's layer opacity to 8% - the higher the opacity, the deeper the road will sink into the terrain.
Step 10. Finally, save the .raw file back to disk and convert it to .chu (Dont close this file yet...)
My settings...
generateChunkFileFromRaw16("atlasconv/cool.raw", 512, 5.0, 1.0 / 256.0, "game/data/terrains/cool.chu", 2.0,5);
(NOTE) Instead of using the Pen tool, you can certainly use the Brush too and free-hand draw the road... you just need a steady hand on the mouse to avoid getting jagged roads.
Painting the Road Texture in Photoshop
At this point, the heightmap has a road or path embedded into it. When it loads on screen, it should look like the path was dug out of the existing terrain. By the way, you should be able to have a raised path too, if you prefer. Just set the brush to solid white instead of black. Anyway, the next step is to paint the texture on to the terrain.
Step 1. From within the modified RAW file... Hide the Background base layer
Step 2. Return the Road layer opacity back to 100%
Step 3. Resize the .RAW image to match your texture map (in my case 2048x2048)
Step 4. select the Road layer, right-click the mouse, and choose 'Duplicate Layer...'
Step 5. In the Duplicate Layer dialog box, choose your open texture map as the Destination Document
For Textured Roads...
Step 6. Now that the road appears overlapped within your texture map, select the Paint tool (or press G), select the Fill mode to 'Pattern' and choose a pattern from your pattern list... ideally a nice looking gravel texture or some sort of natural terrain texture.
For Dirt Paths...
Step 6. Select the Paint tool (or press G) and choose the Foreground Fill mode. Set the foreground color to a strong yellow and reduce the Road opacity layer to about 10-15%
Step 7. Finally, click the Paint Bucket Tool anywhere along the track to fill it in.
My settings...
generateTQT("atlasconv/cool.jpg", "game/data/terrains/cool.tqt", 5, 128);
Keep in mind that the depth and width of your road will depend entirely upon the settings you use when performing the .raw to .chu conversion. If you find that the road is too deep or too wide, you can play with the bush thickness and layer opacity to correct it.








