Switching default texture format to DDS: Difference between revisions

Jump to navigation Jump to search
m
+- tables: fix and more color; - some empty lines
m (+- tables: fix and more color; - some empty lines)
Line 9: Line 9:


== Feedback needed - should FlightGear switch the defaults to DDS format for terrain texturing? ==
== Feedback needed - should FlightGear switch the defaults to DDS format for terrain texturing? ==
However, the DDS compression algorithm is patented, which means that it is not readily available for open source graphics drivers used by Linux distributions. Dependent on the specific hardware, this may or may not be a problem (modern graphics cards typically do not need the driver to process DDS, for older graphics cards there are non-patented workarounds available which decompress the DDS on the software level). The development team is concerned about making the FlightGear experience pleasant for all users, hence we would like to gather feedback how many users would be affected by a change in practice.
However, the DDS compression algorithm is patented, which means that it is not readily available for open source graphics drivers used by Linux distributions. Dependent on the specific hardware, this may or may not be a problem (modern graphics cards typically do not need the driver to process DDS, for older graphics cards there are non-patented workarounds available which decompress the DDS on the software level). The development team is concerned about making the FlightGear experience pleasant for all users, hence we would like to gather feedback how many users would be affected by a change in practice.


Line 25: Line 24:


=== What we need you to do? ===
=== What we need you to do? ===
FlightGear already provides the simple option to test a DDS texture set. If you are running on Linux and use an open source graphics driver, please take 5 minutes to help during your next FG session:
FlightGear already provides the simple option to test a DDS texture set. If you are running on Linux and use an open source graphics driver, please take 5 minutes to help during your next FG session:


Line 38: Line 36:


== Tested hardware and graphics drivers ==
== Tested hardware and graphics drivers ==
=== NVIDIA proprietary driver ===
=== NVIDIA proprietary driver ===
{| class="wikitable sortable"
{| class="wikitable sortable"
Line 56: Line 53:
|Tom_ch
|Tom_ch
|-
|-
|GeForce GT640
|GeForce GT 640
|343.13
|343.13
|{{yes}}
|{{yes}}
Line 113: Line 110:


=== NVIDIA open source driver (Nouveau)===
=== NVIDIA open source driver (Nouveau)===
{| class="wikitable sortable"
{| class="wikitable sortable"
!Card
!Card
Line 139: Line 135:
|HD Graphics 3000 (i7-2600K)
|HD Graphics 3000 (i7-2600K)
|10.2.6
|10.2.6
|???
|{{n/a}}
|{{yes}}
|{{yes}}
|cdesai
|cdesai
Line 145: Line 141:
|HD Graphics 3000 (i3-2330M)
|HD Graphics 3000 (i3-2330M)
|10.2.2
|10.2.2
|???
|{{n/a}}
|{{yes}}
|{{yes}}
|Flyhigh/saiarcot895
|Flyhigh/saiarcot895
Line 151: Line 147:
|HD Graphics Sandy Bridge (Pentium B980)
|HD Graphics Sandy Bridge (Pentium B980)
|10.1.0
|10.1.0
|no
|{{no}}
|{{yes}}
|{{yes}}
|f-jjth
|f-jjth
Line 184: Line 180:
|AMD Radeon HD 7950
|AMD Radeon HD 7950
|10.2.1
|10.2.1
|???
|{{n/a}}
|{{yes}}
|{{yes}}
|Saga
|Saga
|
|-
|-
|AMD Radeon R9 270X
|AMD Radeon R9 270X
|10.3~git20140805
|10.3~git20140805
|no
|{{no}}
|{{no}}
|{{no}}
|nine
|nine
|
|-
|-
|AMD Radeon R9 270X
|AMD Radeon R9 270X
|10.3~git20140805
|10.3~git20140805
|yes
|{{yes}}
|{{yes}}
|{{yes}}
|nine
|nine
Line 204: Line 198:


== Sample test ==
== Sample test ==
=== DDS Test at the airport of Orio (Bergamo - Italy) ===
=== DDS Test at the airport of Orio (Bergamo - Italy) ===
[[File:Terrain texture scheme DDS 01-2000.jpg|800px|thumb|Comparison of texture in relation to the three possible choices in "Rendering Options" -> "Terrain texture scheme"]]The final result, with all the "Shader Options" active, is not very satisfactory, I would say very poor. Apparently not check on any improvement in the speed of image loading. I think on modern machines with quad-core processors 16 GB, with latest graphics cards (NVIDIA 870) 6 GB, the loading of these images is not really a "bottleneck". I propose to insert the DDS functionality, but in a transparent way, ie convert "on the fly" the images before inserting them into the temporary memory, for example using the convert function of ImageMagick. However, I do not know if it really is a useful feature, I think there are many other things to do before this.<BR>These are the parameters used by the startup script "run_fgrun.sh":
[[File:Terrain texture scheme DDS 01-2000.jpg|800px|thumb|Comparison of texture in relation to the three possible choices in "Rendering Options" -> "Terrain texture scheme"]]The final result, with all the "Shader Options" active, is not very satisfactory, I would say very poor. Apparently not check on any improvement in the speed of image loading. I think on modern machines with quad-core processors 16 GB, with latest graphics cards (NVIDIA 870) 6 GB, the loading of these images is not really a "bottleneck". I propose to insert the DDS functionality, but in a transparent way, ie convert "on the fly" the images before inserting them into the temporary memory, for example using the convert function of ImageMagick. However, I do not know if it really is a useful feature, I think there are many other things to do before this.<BR>These are the parameters used by the startup script "run_fgrun.sh":
{{Note|To reproduce this test, you can use the following [[Fgfsrc]] file - you should set up [[$FG_ROOT]] and [[$FG_SCENERY]] specifically for your own system though.}}
{{Note|To reproduce this test, you can use the following [[Fgfsrc]] file - you should set up [[$FG_ROOT]] and [[$FG_SCENERY]] specifically for your own system though.}}
Line 235: Line 227:


== Excerpts from the ongoing discussion ==
== Excerpts from the ongoing discussion ==
{{FGCquote
{{FGCquote
   |Here is my suggestion how to proceed:
   |Here is my suggestion how to proceed:
Line 269: Line 260:


== DDS Debate in 2012 ==
== DDS Debate in 2012 ==
=== Legalities ===
=== Legalities ===
{{See also|Talk:Switching default texture format to DDS#Using patented algorithms}}
{{See also|Talk:Switching default texture format to DDS#Using patented algorithms}}
Line 354: Line 344:
   }}
   }}
}}
}}


{{FGCquote
{{FGCquote
Line 437: Line 426:


=== Approaches ===
=== Approaches ===
{{FGCquote
{{FGCquote
   |Well, the default f16 does not work anymore for example.<br/>
   |Well, the default f16 does not work anymore for example.<br/>
Line 451: Line 439:
   }}
   }}
}}
}}


{{FGCquote
{{FGCquote
Line 523: Line 510:
   }}
   }}
}}
}}
=== Precomputed mipmaps  ===
=== Precomputed mipmaps  ===
{{FGCquote
{{FGCquote
   |Could we do dds files without compression but with precomputed mipmaps?<br/>
   |Could we do dds files without compression but with precomputed mipmaps?<br/>
Line 536: Line 523:
   }}
   }}
}}
}}


{{FGCquote
{{FGCquote
Line 646: Line 632:


== Implementation ==
== Implementation ==
{{FGCquote
{{FGCquote
   |As has been previously pointed out, the current DDS texture set is not<br/>
   |As has been previously pointed out, the current DDS texture set is not<br/>
Line 685: Line 670:
   }}
   }}
}}
}}


{{FGCquote
{{FGCquote
Line 701: Line 685:
   }}
   }}
}}
}}


{{FGCquote
{{FGCquote
Line 725: Line 708:


== Challenges ==
== Challenges ==
{{FGCquote
{{FGCquote
   |"dds on an open source driver (radeon and intel) I was forced to use radeon at some time, and it was fun, the planes were pink :) once libtxc-dxtn installed, dds were loaded fine again, so it can be used on open source if you are ok to use the lib."<br/>
   |"dds on an open source driver (radeon and intel) I was forced to use radeon at some time, and it was fun, the planes were pink :) once libtxc-dxtn installed, dds were loaded fine again, so it can be used on open source if you are ok to use the lib."<br/>
Line 738: Line 720:
   }}
   }}
}}
}}


{{FGCquote
{{FGCquote
Line 848: Line 829:


== Conversion ==
== Conversion ==
Also see [[DDS texture conversion]].
Also see [[DDS texture conversion]].


Line 885: Line 865:


Nothing as exotic. Just a different "origin" between OpenGL and Direct3D image conventions. OpenGL image origin is located in the lower-left corner, while Direct3D (hence DDS too) considers the top-left as the origin, resulting in a DDS image to appear vertically flipped when read in an OpenGL context. This has repercussions in the way normal-map decoded normals appear (hence the flag in the effects, which signals to the shader to flip the decoded normals). The rest is simply a matter of workflow: either use flipped coordinates and skewed/reversed conventions throughout your whole workflow, or just flip the image and (eventually) set a flag for the shader at "publish" time (said flag could be automatically set by the code on DDS texture load). ''(the latter seems more pragmatic/appealing)''
Nothing as exotic. Just a different "origin" between OpenGL and Direct3D image conventions. OpenGL image origin is located in the lower-left corner, while Direct3D (hence DDS too) considers the top-left as the origin, resulting in a DDS image to appear vertically flipped when read in an OpenGL context. This has repercussions in the way normal-map decoded normals appear (hence the flag in the effects, which signals to the shader to flip the decoded normals). The rest is simply a matter of workflow: either use flipped coordinates and skewed/reversed conventions throughout your whole workflow, or just flip the image and (eventually) set a flag for the shader at "publish" time (said flag could be automatically set by the code on DDS texture load). ''(the latter seems more pragmatic/appealing)''


{{FGCquote
{{FGCquote
Line 933: Line 912:


== Cons ==
== Cons ==
{{FGCquote
{{FGCquote
   |FG actually runs with dds textures, it just doesn't render anything reasonable, I believe you get monochromatic colors. But I don't expect the menu to be affected, it doesn't use textures.
   |FG actually runs with dds textures, it just doesn't render anything reasonable, I believe you get monochromatic colors. But I don't expect the menu to be affected, it doesn't use textures.

Navigation menu