Day 18 – I’ll take 110 servings of 2 pixels to the left, please

In Day 17 I described how Dave Regula (aka Tiltrider) dug me out of yet another hole in my ongoing tilt at the Caesar Creek scenery windmill.  At this point, I have been able to get one tile rendered properly so that the forest background color lines up with the forest map that generates trees in the scenery, so this post will concentrate on generalizing that effort to the entire scenery.  Here’s what I think I need to do:

  • Modify all 110 ‘DeciduousTile_XXYY.bmp’ files to move the mask 2 pixels to the left.  According to Dave, this involves the following procedure
    • Load the far upper-left tile image into Photoshop (DeciduousTile_1009.bmp for me)
    • Right-click on the ‘Background’ layer and select ‘Duplicate’.  Call this new layer ‘Shift’ (any name will do, but…)
    • Hide the background image by removing the ‘eye’ icon for that layer.
    • Make sure the ‘Shift’ layer is highlighted, and then select the entire image with Ctrl-A (you should see the ‘marching ants’ border around the entire image)
    • Use the ‘Move’ tool (arrow with a cross) and slide the entire image 2 pixels left.  The way I did this was to blow up the image as far as it would go so that I could easily see individual pixels, scroll to the extreme right, and then slide the whole thing left until I could see 2 pixel blocks uncovered on the right side.  Also, on my 512×512 image, I can see the right border move from ‘512’ to ‘510’ on the top ruler display.
    • Load the next tile to the right into PS (DeciduousTile_0909.bmp for me). Use Ctrl_A, Ctrl-C, and Ctrl-V to copy/paste the entire contents of this image into the previous one (DeciduousTile_1009.bmp for me).  This should create another layer in DeciduousTile_1009.bmp named ‘Layer1’
    • With the ‘Layer1’ layer selected, use Ctrl-A to select the entire image, and then use the ‘Move’ tool to shift the entire image all the way to the right except for the last 2 pixels on the left.
    • Check your work by hiding and unhiding the ‘Shift’ and ‘Layer1’ layers.  I found it helpful to set the opacity of the ‘Layer1’ layer to 50% so I could easily distinguish the tool.  Make sure you check the lower-right edge of the image as well as the right-hand side, as it is easy to move the ‘Layer1’ image up or down a few pixels while sliding it to the right.  Set the opacity back to 100% when you are done checking.
    • Use ‘Layer->Flatten Image’ to finish the image, selecting ‘OK’ for ‘Discard hidden layers’
    • Use ‘File->Save’ to save the 2-pix left-shifted image back to your Working/Terragen folder
    • Close the finished image, leaving only the image to the right (DeciduousTile_0909.bmp for me) open in PS.  This is now the new target image for the next left-shift operation.  Repeat the above procedure, starting with the second step (‘Right-click on ….’).
  • In Terragen, modify my ‘Deciduous Forest’ surface definition in Terragen to use a more forest-like color (instead of the current red)
  • Figure out how to use Hitzi’s TerragenForCondor utility to render all 110 tiles in batch mode.  Dave believes TFC can pair the correct Deciduous/ConiferousTile_XXYY.bmp’ file with each ‘XXYY.ter’ file so the correct forest background mask is applied each time
  • In Landscape Editor, select the scenery and reload textures with ‘Tools->Import Terragen textures’.  Select the ‘Forest maps’ option in the ‘View/Modify’ window and verify that the forest map and the forest background colored areas line up properly.
  • In LE, export textures to DDS format using ‘File->Export textures to DDS’
  • Test in Condor.  If it all works – go have a beer and celebrate.  If it doesn’t, call Dave Regula – not me! ;-).

Although a bit tedious, modifying the tile images went fairly well for me.  I started with my top-left tile (DeciduousTile_1009.bmp for me) and worked my way quickly across the top row.  When I reached DeciduousTile_0009.bmp (the top-right tile), I had nothing with which to fill in the missing two pixels on the right, so I just used the paintbucket tool to fill them with black (i.e. no tree background color).  Then I loaded up tile 1008 and started on the next row – repeat until finished.  At the start, each row took about 30-45 minutes, but after a few rows I had the process down to about 15-20 minutes per row.  Still, this took me several calendar days as I had to snatch time between Condor races, Condor XC instruction, and RL chores, but I got it all done.

Next, I changed the surface color for ‘Deciduous Forest’ to a more realistic dark green color

Next I have been trying to get Hitzi’s TerragenForCondor utility to render the tiles automatically.  I was able to do this before (without the SoPack option enabled), but now I’m having trouble getting it to run with it enabled.  I have been trying various options, but nothing seems to work reliably.  I could just render all 110 files manually, and with my 512 x 512 pixel tiles, that would not take that long.  However, if I later want to try this trick again with the paid version of Terragen and larger tile sizes, then manual tile rendering will take a long time.  I yelled for help (yet again) to David Regula, but this time he wasn’t able to help me , other than advising me to check very carefully for typos (I did, but didn’t find anything).

A search of the Condor forum, yielded a number of posts by others who were experiencing the same problem, and it appeared that the answer was to use the older v0.8 version of SoPack rather than the latest v0.9 version.  I tried this and though I seemed to be getting closer to render nirvana, I still couldn’t get it to reliably work through the tiles.  Clearly there is something else going on, but I can’t for the life of me figure out what it is.  Maybe Hitzi can come up with a ‘single-step’ or ‘debug’ version of TFC that will allow users to figure out problems as they arise?

Stay tuned!

 

Frank (TA)

 

 

Series Navigation