• Warbirds Library V4 (Resources for now) How to


    We just posted part one of the how to on uploading new files to the Library. Part 1 covers adding new files. Part 2 will cover making changes to your the uploads you own.


    Questions or comments please post them in the regular forums. Which forum is that... Well it is the one you spend the most time in.

    Thanks the Staff

    Library How to

CFS3 Terrain Creation - is anyone still around?

Steve is there a reason not to use Google Earth for the landclass tiles?

It just didn't occur to me to do it that way


I used Modis landcover data from Earth Explorer instead
 

Attachments

  • polandLCF.jpg
    polandLCF.jpg
    271.2 KB · Views: 47
Well editing the .ers file to a lower amount of columns is a no go. Moved the mesh creation to an idle computer, so I don't really care how long it takes as long as it is a viable mesh.
I can now go back and work on lakes rivers and tweak shorelines.

Oh, figured out why I couldn't get any viable tiff for mesh creation. If you are at The Tower its the West, if you are at The Bull, Shooters Hill in Woolwich its the East.

Changing a W to a E in the ers2tiff command line made the difference.
 
I replicated the original CFS3 theater.
  1. I first made a bil file in GM with the original lat/long 55N 7W, 40N 14W. as you see it is not square at all.
  2. I then opened it up and using the projection feature of GM, click on the wrench icon, I then looked at the options in the top drop down and selected Mercator. In the options box that appears there is an option to enter the original latitude ( may have the name incorrect) I enter 48, since this is the mid-way between 55 and 40.
  3. Saved a workspace file.
  4. unloaded all data. Then opened the saved workspace and made new bil. The data in now in meters not degrees.
  5. Opened up both ers files that were made. Took the data from the first ers file and replaced the data in the new ers and saved. This tells the tools we use form MS that all the dimensions are in degrees. The pixels were not square or the same they were 2536 and 2524, just made then both 2560 in the revised ers file. I figured that this slight difference would not matter in a test.
  6. Made the msh files using the data from the spread sheet, I chose 6 by 6 to make 36 tiff files. This yielded me the same exact number of msh files MS had.
  7. Made a new landclass file in photoshop by resizing the 2560 by 2560 from the bmp file we need to make, small resizing if you think about it about a 1% resizing from 2530 to 2560 and 1.4% for the other. We can fix this as we fiddle with the map selection in the first step.
  8. zipped the files for the msh (keep the original shorelines and water as a test) Fired up the sim and flew in southern France to the coast and reached the shoreline exactly as the map in the game indicated. The elevation is off for the airbases and stuff but to be expected.

So all in all a success so far. This showed to my simple mind that we can select non-square maps areas, use GM to make them square, fiddle with the data in the ers files and boom - it works:pop4:. I need to put this aside for a few days as my paint shop appears to be reopened so I need to finish a few small bits and pieces with some planes.:biggrin-new:

Two questions Ted,

1. Were you able to do this with 3 arc second data?

2. Can you post the instructions you fed to the ers2tiff tool?
 
Can someone re-educate me.

Here is the situation. I have different types of water in the theater. Rivers, Lakes, Ocean. I want to be able to have different textures for each of them so that they are not the same color and shade. To compound the situation I want the ability to have coral type water around some of the islands. (Maybe can create an island around the islands and call it coral ocean)

I know that the make water command line allows multiple pol files to be processed at the same time.

Can someone remind me what files drive the textures of the water.

BTW, finding that in many instances I am relearning the "how to do's" that I have forgotten since 2011.
 
sorry, I not aware if the tools can make different types of water?? I know Dan has created different water colors for the defualt map but I have no clue how he did it.


I did not know you could use multiple pol files in the command line. That is good to know
 
Ok

Two questions Ted,

1. Were you able to do this with 3 arc second data?

2. Can you post the instructions you fed to the ers2tiff tool?

Yes the 3arc data is what I plan to use for everything below 60 degrees latitude. I followed the tutorial by Odin on the entries. Now the only deviation I have made is when I enter the last two numbers that correspond to the scale in pixels that the theater requires. If have used the 6 and 6 numbers as they produce the exact same number of msh files as the original CFS has. The original CFS had a LCF or 1536 by 1536 which is 256 times 6, so I see the relationship. That is why in Odin's tutorial 3 by 3 is used since 768 is 3 times 256. The 3arc files have much larger pixel counts as the theater grows. I did once try a 30 by 30 put the computer (very fast one) made over 10k files and I stopped it since this seemed unusual. I am not sure what these numbers have to do with detail and what the texture ultimately looks like, but I suspect to capitalize on the 3arc files larger numbers will be needed.

I am trying to fix up my JU88 for John so we can release these soon. Once that is done will go back to terrain stuff.
 
sorry, I not aware if the tools can make different types of water?? I know Dan has created different water colors for the defualt map but I have no clue how he did it.


I did not know you could use multiple pol files in the command line. That is good to know

[h=3]Water[/h]
As with shorelines, the preferred way to create water shape data is to run a batch file which, in turn, runs a data processing executable and then bundles the results in a ZIP file.


Usage: make_water.bat (theaterminlon theaterminlat theatermaxlon theatermaxlat) polyfile1 polyfile2 ...

Inputs to the water batch file include the coordinates of the theater, as well as one or more .POL files which specify the water polygons.

If you prefer, you can also use the water production tool directly.

Usage: water.exe resolution epsilon outputdir (theaterminlon theaterminlat theatermaxlon theatermaxlat) polyfile1 polyfile2 ...
 
I did once try a 30 by 30 put the computer (very fast one) made over 10k files and I stopped it since this seemed unusual. I am not sure what these numbers have to do with detail and what the texture ultimately looks like, but I suspect to capitalize on the 3arc files larger numbers will be needed.

Ted
I am presently running 30x30 srtm files creating mesh files. 17920 columns and rows/pixel dimension. 1720 km theater.

Chose not to run make mesh on my tower computer.
108 hours so far on a desktop, which I would consider slow. Averaging 2 files created per minute. Presently about halfway through 512. Have 256 and 128 files to go having already created 4096, 2048, and 1024.
 
Ted
I am presently running 30x30 srtm files creating mesh files. 17920 columns and rows/pixel dimension. 1720 km theater.

Chose not to run make mesh on my tower computer.
108 hours so far on a desktop, which I would consider slow. Averaging 2 files created per minute. Presently about halfway through 512. Have 256 and 128 files to go having already created 4096, 2048, and 1024.

Would this influence the resolution of the lcf file? I have heard of one person creating a much higher resolution lcf for WOFF, and I think that's a huge step forward in terms of the overall appearance of the terrain. Having landclasses in roughly 1 km x 1 km blocks seems a bit dated.


For water, cfs3h2o.dds is the key. It is a direct map of the entire theater, but it is flipped vertically. Note that it is not rotated 180 degrees, but flipped. It was very tedious to map out the shorelines pixel by pixel, and I got a huge help from a guy over at the WOFF forum who did probably 75% of that part. I think it would be a lot easier if you're able to export your water shapes to a texture sheet somehow. I used a 4096x4096 map, but I think higher might allow you to put in some decent reef detail. According to Ankor, even though the file size would be very large, the way it is done in CFS3 is efficient and will not cause a huge performance hit. I'd love to see what could be done in 16384 resolution! I would think it might be possible to paint an individual body of water or island coastline on a smaller sheet and then put the different pieces into a single large map at the appropriate places. Or are you suggesting that it might be possible to get CFS3 to recognize more than one texture each covering a section of the map.

The 16 h2od_XX.dds files are not used for color anymore, but now are used only for creating the bump map for the waves.

EDIT: here's a link to the water colors I did for the stock map: https://www.sim-outhouse.com/sohforums/showthread.php/118088-CFS3-New-Water-Colors-Europe-zip
 
Also note that water color is heavily affected by the color of the sky and clouds as it is in real life. I am currently working on bringing big improvements in this area to CFS3.
 
Or are you suggesting that it might be possible to get CFS3 to recognize more than one texture each covering a section of the map.

The 16 h2od_XX.dds files are not used for color anymore, but now are used only for creating the bump map for the waves.

I am at a loss when it comes to landclass, it was a dead stop for me when doing RS as I do not have adobe photoshop, but have coral. I am hoping in the future someone will come to my rescue on png redux when the time comes to put together the lcf.

Yes Dan my thought is that there may be a method to have separate dds files for ocean, coral ocean, and lakes. Presently we process the lake and ocean water as two pol files as they are areas and at the same time. I think they use the same dds file.

Rivers being vectors are processed with railroads and roads.
Rivers have their own separate texture sheet from ocean water.

Do you know specifically which dds file is for the ocean? Update figured it was the h2o.dds.

What are the 16 h20d_xx files you mention?



Thank you for the info.

In further thinking I have not tried running an area vector in the the vector data process normally used for line type vectors. hmmm maybe maybe not.
 
Last edited:
Ted
What files did you download?

EarthExplorer/nasa lpdaac collection/modis landcover ver6.1
I used the 2002/2003 data as its about the resolution I wanted but newer data is much sharper
 
Resolution

I was going to make a couple of theaters with different values for the last two numbers and see if the differences were noticeable. Glad to see that I was not the only one making a 30 by 30 theater. Once we figure this out this will mean so much to the old game.

There is one more data point that interests me in the ers2tiff process and it is this one ers2tiff *.ers N38.1875 W28.1875 256 1024 1974 CFS3Europe -393216 -393216 3 3. As you know when you change (value in red Stride Check as per the CFS3 Theater Scratchpad) this to a lower value it alters the dimensions displayed for the theater. But for the life of me, I really do not know what this value does as far as creating msh files. I question this value since it does alter the theater size and with a 1024 value the dimensions in km is not equal to the size of the theater. Lowering it to 256 in some cases gets the size to be similar to what the theater is but not exact. Steve mentioned to be that he believes that a lower value sharpens up the scenery. What is interesting the scratchpad has a value of 2 as the smallest values that can be used. What I am getting to understand (or not) is this, if you want all these numbers to work, we may need to select our theaters in km and find a stride check that gives us a value that agrees with the formula in the new theater kit supplied by Odin. We do as rbp does a use the larger values for the last two numbers.....This may explain the size of the cfs3 theater being smaller than the max allowable and the original lcf being 1536 pixels. Oh the mystery.... I am going to spend some time in the Theater scratchpad to see what I can learn. Anyone know who Robert Bruce is, his name appears as you scroll over some cells....
 
Spent some time understanding Robert Bruce's Scratch Pad

It seems that to get the math to work in CFS3, picking the size of the theater in km is key to have the dimensions to sync with the math in the tiff2ers. In an earlier post the original CFS3 theater is not 1835, but 1572 or so in km. If you enter this into the spreadsheet main tab and you enter in the original CFS3 data (position of theater etc you reproduce the data that is in the tiff2ers code, that is the dim data ers2tiff *.ers N38.1875 W28.1875 256 1024 1974 CFS3Europe -393216 -393216 3 3. Double these and you get 786432, which is the data in the formulas Robert Bruce developed. This goes along with my earlier posts on the fact that the original CFS3 is 14 degrees N/S and 21 degrees E/W and to make it square you can change this in Global mapper. When you do this you will get data in meters which I hope is in sync with all of this. Bottom line, I think I am getting the math and how to enter the stride check data (the 1024 number). Will need to take more time than I can give it this week but may get it yet. Please look at the terrain scratchpad.
 

Attachments

  • CFS3_Terrain_Scratchpad.zip
    165.7 KB · Views: 6
Before I began running the 30x30 srtm Dems, I ran some Worldwide - GTOPO30 Format Dems with Resolution: ~900 m, 30 arc-sec
With the gotopo the columns and rows were 1792 and ended up with 7 7 in the ERS2tiff command line. Notice the resolution of the gotopo. I believe the 30x30 maybe 90 meter resolution. therefore the 17920 columns and rows and 70 70.

Presently over 6 days running mesh, still in 510. Probably got another week. Just hope no loss of power next week with eclipse and thunderstorms forecasted all next week.​
 
I am at a loss when it comes to landclass, it was a dead stop for me when doing RS as I do not have adobe photoshop, but have coral. I am hoping in the future someone will come to my rescue on png redux when the time comes to put together the lcf.

Yes Dan my thought is that there may be a method to have separate dds files for ocean, coral ocean, and lakes. Presently we process the lake and ocean water as two pol files as they are areas and at the same time. I think they use the same dds file.

Rivers being vectors are processed with railroads and roads.
Rivers have their own separate texture sheet from ocean water.

Do you know specifically which dds file is for the ocean? Update figured it was the h2o.dds.

What are the 16 h20d_xx files you mention?



Thank you for the info.

In further thinking I have not tried running an area vector in the the vector data process normally used for line type vectors. hmmm maybe maybe not.


There are 16 h20d_xx.dds in the effects/fxtextures folder. In stock CFS3 they controlled the wave animation and influenced water color. With Ankor's shaders they no longer influence color, which is now entirely determined by cfs3h2o.dds and environment reflections from the sky.

I have been curious if the river vectors could be repurposed. For instance on the stock map, many large and important rivers are represented by the river vector and appear only as a minor stream. On the one hand a more limited use of the river vector for only those truly minor streams might be appropriate, or the river texture could possibly be repainted as an alternate shoreline without surf and the vector placed along the shoreline. That way we could still have ocean surf for ocean shorelines, but also a lake shore/river bank textures for calmer bodies of water.

I have experimented with using the alpha channel to mix the local color of the water with the shore texture instead of trying to paint water the onto the shoreline. I then added a white wave foam texture on top for the surf. It then fits with any location, color-wise, but it would be great to be able to limit surf to ocean shorelines while still having a shoreline texture for the rest of the bodies of water.
MbeHJ4f.jpeg
 
From my AnKor's Shaders Developer Notes.

*** 5. Water Mods ***

CFS3 default water animation files are located in the effects\fxtextures folder and are named h2od_01.dds through h2od_16.dds


With AnKors shaders the color for these files is rendered using the cfs3h2o.dds file for the local water color information. The cfs3h2o.dds file is a vertically inverted rendering of the entire theater so each pixel's tint covers a fairly large area of sea surface shading. Edits to cfs3h2o.dds can create local effects like muddy river water exiting a delta into the sea, sandy shoals and coral reefs.


The BaseOpacity parameter controls how easily you can see through the water animation to the texture underneath. This can easily go wrong if the underlying textures don't look like a sea bed.


The reflectiveness of the clouds and sky on the surface is controlled by the ReflectLevel parameter. The sun sparkle on the surface is controlled by the SpecularPower and SpecilarNormDivisor parameters.


The AddFoam parameter in SeaWater.fx is used to determine the grey scale level that will be interpreted as foam. The animations files need to have their brightness level distribution adjusted to provide discrete areas for foam patches to appear and dissapear as the wave crest passes by. The boundry of the textures need to wrap the opposide edges to avoid having seams appear. A somewhat randomized pattern of foam patches helps hide repeating patterns as the sea surface is tiled with these textures. Using low numbers creates an interesting effet that will make the sea surface appear to be covered in sea ice, high numbers will remove all of the foam patterns.


An optional set of water animation files set up to display the sea foam are provided with this package, but you may use the game's originals if you prefer without any conflict other than the difference in wave pattern and foam appearance.


It turns out that the alpha channel in the effects\fxtextures\h20d_##.dds files has to be pretty finely textured, and the color variations have to be subtle (no harsh shade transitions) for it to bump map realistically.


The CFS3 Default Water Detail Texture Size is 5 and the SeaWater.fx settings in this package are preset to match. Using a different texture size will change the appearance of the wave dimensions unless you adjust the WaveBump and WaveScale values in SeaWater.fx to match.
 
Back
Top