PDA

View Full Version : Problem with edited terrain textures



vonOben
March 19th, 2011, 03:21
Hi

I've done some terrain texture tests using DXTbmp, but the result hasn't been satisfactory.

Here's what I've done:
I open a default CFS3 city terrain dds texture in DXTbmp and use "Send to editor" - which is PSP in my case - and save it as bmp without doing any changes.
In DXTbmp I select Export Alpha channel and save it as another bmp.
Then I open the first bmp in DXTbmp and then select "Import Alpha Channel" and save it as a dds dxt3 file format since DXTbmp shows that the default
terrain texture was in that format. The "new" dds file looks OK in DXTbmp, exactly the same as the original texture and also the transparency looks
identical.

But when I check in CFS3 ETO Expansion the new texture looks like this:

33488

Close to my plane it looks OK but further away the texture becomes very blurred. In the top of the picture you can se the difference very clearly where the edited texture meets another city texture which is much sharper at that distance.

I also tested Pat Pattle's BoB city textures and they suffered of the same problem. Very clear close to the plane but very blurred further away.

33489

What is the reason the textures get that blurry in game? What have I done wrong? :confused:
Please advice!

Thanks!

vonOben

dancat
March 19th, 2011, 03:57
mipmaps??

vonOben
March 19th, 2011, 04:19
Hi

I’m a newbie in CFS3 modding, so please explain more.
What is mipmaps and what has that to do with an edited texture? :isadizzy:

Cheers
vonOben

MajorMagee
March 19th, 2011, 04:31
Mipmaps are a technique used to reduce the workload on the rendering engine by prerendering a set of reduced size textures that represent the steadily decreasing level of detail required at increasing distances from the viewer. Creating Mipmaps is an option that you can select when you save the dds file and shows up as a stepped down series of the primary texture and doubles the width but not the height of the file.

Pat Pattle
March 20th, 2011, 01:07
Blurry textures are a part of cfs3 how works. There are 'rings' around your viewpoint wherin the level of detail can be set. There are various tweaks around (check the SoH archive) which extend the range of these, you'll need a good pc though.

Another tweak for general texture detail is here, this works wonders:

http://www.regshanger.com/Groundcrew/homepage/Garage/2048%20textures/Ground%20Crew%20Design%20CFS3%202048x2048%20settin gs.php

One other thing is in the mos file itself you can set the mip level, Frosty is your man for this, I've never got my head around it!

Last but not least, try editing the .dds directly rather than converting which carries the risk of corrupting the image. I use 'Paint dot net' but I thought PSP could do this?

Keep up the good work Von Oben, it's great to have another modder amongst the ranks :)

vonOben
March 20th, 2011, 01:28
Hi

I’ve done some more tests now.

If I save without mipmaps the terrain tile looks sharper. :)

If I compare with the original (default CFS3) the file size becomes smaller and the first version with mipmaps was the same size as the original, which indicates that the original file was saved with mipmaps.

I did the same test with an ETO terrain tile and one of Pat’s BoB terrain tiles, the files without mipmaps become smaller so it seems also ETO and Pat’s BoB files have mipmaps.

Is it possible to check if a dds has mipmaps?

If the default terrain tile has mipmaps and looks reasonable sharp and my saved copy of the same terrain tile with mipmaps is much blurrier, could it be something else causing this? :confused:

Since mipmaps are used to increase rendering speed and reduce aliasing artifacts I hesitate not to include them.

Please enlighten me! :blind:

Thanks!

Cheers

vonOben

vonOben
March 20th, 2011, 01:51
Hi Pat



Last but not least, try editing the .dds directly rather than converting which carries the risk of corrupting the image. I use 'Paint dot net' but I thought PSP could do this?



So 'Paint dot net' can open dds files directly and also handle Alpha channel?
I have PSP 7 and I've used DXTbmp and the "Send to editor" feature.



Keep up the good work Von Oben, it's great to have another modder amongst the ranks

Thanks, but I'm still trying to figure out how things work in CFS3 and I haven't actually achieved much so far. :banghead:

Does your BoB city look as blurry as it does on my PC?
The above screenshot had terrain setting on 4 and I've also tested on 5 but that doesn't make much difference.

I would be happy if my edited terrain tile had the same sharpness as the original, that look quite OK to me. :)

Cheers

vonOben

vonOben
March 20th, 2011, 23:29
Hi

Some more tests done!

I changed all settings according to http://www.regshanger.com/Groundcrew/homepage/Garage/2048%20textures/Ground%20Crew%20Design%20CFS3%202048x2048%20settin gs.php
But it didn’t make any difference. :frown:

It’s very evident where the first ring is and where the transition to the next mipmap is, probable because the city textures have more details than other terrain tiles where I haven’t noticed this or the blurry problem.

Pat’s BoB City texture is high res so I don’t understand why it’s so blurry. The default texture is only 512x512, but I still don’t understand why the quality becomes so bad when resaved by DXTbmp. :confused:

Am I doing anything wrong?

Wrong settings in DXTbmp perhaps?

Wrong CFS3 config settings?

Wrong video card settings (Radeon HD 5770, 1GB)?

Is there a better way of opening, editing and saving dds files with alpha channel and mipmaps?

Cheers

vonOben

MajorMagee
March 21st, 2011, 03:15
There are a couple of files behind the level of detail rings. If you had been messing with those parameters I might think you just got those too far off from the original for your system, but that would effect all ground textures, not just your modified ones.

vonOben
March 21st, 2011, 04:24
Hi

I only modify one thing at the time and what I’ve done is:

1. Re-save one default city dds tile and test and remove the file before next test.

2. Testing Pat’s BoB city terrain tile dds files with the corresponding mos files.

Everything else is default ETO and the default city tiles look OK without any problem.

Ideas and suggestions to what might be the cause would be very welcome! :applause:

Cheers

vonOben

Pat Pattle
March 21st, 2011, 12:15
Von Oben you have hit upon something here! I've just re-saved all of the city and rural textures in my BoB install without mipmaps. The result is quite clear, the mipmaps create a blurry image. I think it maybe that the lower res textures in them are being stretched over the terrain tile.

taken at Northolt, 10,000ft clear summer day.

With mipmaps

http://i497.photobucket.com/albums/rr332/Pat_Pattle/Northolt_10000_mipmaps.jpg

without mipmaps - still not great but definately better.

http://i497.photobucket.com/albums/rr332/Pat_Pattle/Northolt_10000_no_mipmaps.jpg

Pat Pattle
March 21st, 2011, 12:23
Also, what type of dds are you saving them as VonOben? I use DXT5 literitive fit / highest quality.
I have little experience of PSP but in paintdot net you work directly in the .dds and alpha, you don't have to save a seperate channel.

vonOben
March 21st, 2011, 13:16
Hi Pat

Thanks for listening and testing in your end! :salute:

I saved as DXT3 because the original file was in that type, I haven’t tried any other types.

Can Paint dot Net also make mipmaps?

Is it a good idea to have terrain tiles without mipmaps?
Isn’t that going to lower the framerate and create more shimmering?

Cheers

vonOben

Pat Pattle
March 21st, 2011, 13:25
Can Paint dot Net also make mipmaps?


Yes



Is it a good idea to have terrain tiles without mipmaps?
Isn’t that going to lower the framerate and create more shimmering?

Pc's have come on a ways since cfs3 came out and what was necessary then may be ok without now. I couldn't see an fps hit or any change in shimmering so will keep testing.
The ETO & BoB mos files are far simpler with only 2 layers compared to many in the stock ones, whether or not this has had an effect or not also needs to be looked at.

cheers,

Pat

vonOben
March 24th, 2011, 03:54
Hi

I've downloaded a program to investigate dds files and done some more research:

ETO terrain tiles: dds Dxt1 2048x2048, don't have mipmaps, Mem usage: 2048 kB
OFF 3 terrain tiles: dds Dxt1 1024x1024, have mipmaps, Mem usage 512 kB
BoB City terrain tiles: dds Dxt5 2048x2048, have mipmaps, Mem usage 4096 kB

Pat,
since you don't have any alpha channel in the terrain texture they don't need Dxt5 AFAICT. With Dxt5 instead of Dxt1 you get an unneeded alpha channel that doubles the used video memory for each terrain tile....

I did some tests converting BoB City terrain tiles in DXTbmp to dds Dxt1 without alpha channel and I also copied the CompositeSceneryBudgets.xml and compositescenerytextures.xml from my OFF installation.
Here's a screenshot showing how it looked without mipmaps. The city textures gets blurry at distance which looks rather realistic:

33835

Here's a screenshot showing how it looked with mipmaps. The city textures looked slightly sharper at distance but there was to much shimmering dispite of maximum AA and AF in the CCC.


33836

The CompositeSceneryBudgets.xml and compositescenerytextures.xml from my OFF installation made a big difference since they displayed the high res tiles further out. :)

Cheers

vonOben
http://www.sim-outhouse.com/sohforums/images/misc/pencil.png

Pat Pattle
March 24th, 2011, 04:58
Pat,
since you don't have any alpha channel in the terrain texture they don't need Dxt5 AFAICT. With Dxt5 instead of Dxt1 you get an unneeded alpha channel that doubles the used video memory for each terrain tile....



Ah! I've just been saving them in the same way that I have the airfield textures - which need the alpha channel. I never gave that a thought - good show vonOben! I'll have a look at the OFF budgets though I get bad stutters when flying that sim on my old pc.

vonOben
March 26th, 2011, 03:14
Hi

I've downloaded a program to investigate dds files and done some more research:

ETO terrain tiles: dds Dxt1 2048x2048, don't have mipmaps, Mem usage: 2048 kB

http://www.sim-outhouse.com/sohforums/images/misc/pencil.png

Correction!
I was able to find a Nvidia DDS plugin working for PSP7 and found out that some of the ETO terrain tiles have mipmaps and some doesn't have any mipmaps!

Cheers

vonOben

vonOben
April 17th, 2011, 08:13
Hi

I asked Martin Wright the creator of DXTBmp about the problem and he said:

"It seems to be a common problem with mipmaps (in FS as well).
I have a feeling that the nVidia library I use doesn`t give the same results as microsofts own imagetool. Resaved textures seem to switch mimaps differently from the original and switch in the smaller (more blurred) mipmaps too early.
You could try experimenting with the different filter and scale settings but you may get the best results using imagetool. Or just do it without mipmaps."

Now I have spent quite some time converting to dds with these programs and testing in CFS3:

DXTBmp 4.00.82
DXTBmp 4.00.96
ImageTool CFS3 1.0.0.2
ImageTool FS2004 1.0.0.3
ImageTool FSX SP1 10.0.61355.0
ImageTool FSX SP2 10.0.61472.0
Gimp 2.6.11
Paint Net 3.5.8
Paint Shop Pro 7.02 Nvidia plugin 3.02

It’s only ImageTool 1.0.0.2 that makes terrain mipmaps as good as the original CFS3 terrain tiles, at least on my computer and I have an ATI videocard.
It doesn’t matter if it’s dxt1 or dxt3 with or without alpha mask.

In these pictures you can clearly se the difference:

Converted to dds with mipmaps using the Nvidia plugin

http://vonoben.free.fr/Temp/MipMap-Nvidia.JPG 

Converted to dds with mipmaps using ImageTool 1.0.0.2.

http://vonoben.free.fr/Temp/MipMap-ImageTool-CFS3.JPGCheers

Cheers

vonOben

popsaka
April 17th, 2011, 11:34
...and that's the Nvidia plugin with your ATI graphics card?
Yes, the Imagetool version does seem more uniform as well...

hairyspin
April 17th, 2011, 11:48
If you use the FSX version of ImageTool, it flips the bitmap 180deg before saving - a requirement for FSX .dds files. You have been warned!

vonOben
April 17th, 2011, 22:39
If you use the FSX version of ImageTool, it flips the bitmap 180deg before saving - a requirement for FSX .dds files. You have been warned!

Hi

Yes I noticed that when testing, and I tested both the SFX SP1 and SP2 version as mentioned above. But those versions of ImageTool are not good if you want good quality Mipmaps in CFS3, not on my computer anyway! :frown:

The result is very similar to those I got using the Nvidia plugin.

Cheers

vonOben

vonOben
April 19th, 2011, 03:59
Hi

Some more info from Martin Wright:

"I have a sneaking feeling that imagetool does something special with the mipmaps that is optimised for FS/CFS.

DXTBmp uses the nVidia DDS library to output textures. The Photoshop plugin uses the same libraries and I wouldn`t be surprised if the other programs also use code based on the nVidia library. I would expect all these methods to create very similar results
I remember using the commandline options in imagetool and there is a flag you can set to specify that the output is to be used for terrain. My guess is that it sets something in the file that tells FS/CFS to switch mipmaps at a greater distance than normal so making it look slightly sharper for longer. Its not that the image data is any better just that it holds on to the higher mipmaps for longer. In the same way that aircraft can be made to look sharper by removing the mipmaps (so forcing the use of the full image at all distances) delaying the switch to the next mipmap will extend the distance before terrain switches to a smaller (blurrier) mipmap.

On the other hand it is possible that the mipmap scaling algorithm used by imagetool is different to nVidia and creates mipmaps that are particularly optimised for terrain. The nVidia code is not FS-Specific as most games these days use DDS. There are options available in the plugin (and DXTBmp) to use different scaling algorithms and it may be worth experimenting with these to see if they make any difference in this situation.

Or just use imagetool (for the final output at least)."

The whole thread is here:
http://pub9.bravenet.com/forum/static/show.php?usernum=743074977&frmid=74&msgid=753640&cmd=show

Cheers

vonOben