PreviewPack: Difference between revisions
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
{{WrongTitle|[PreviewPack]}} | {{WrongTitle|[PreviewPack]}} | ||
This section in a map file contains the picture that is to be used as the map preview. The dimensions of this image are given in the [[Preview]] section. The image itself is stored as a base64-encoded string of LZO compressed data that, when decompressed, contains the image in BGR format. The scanline of each row of pixels is precisely 3 times the width, i.e. no additional padding is used. | [[File:DCUprisingPreviewOfficial.png|200px|thumb|right|Original preview of the DC Uprising map]] | ||
This section in a map file contains the picture that is to be used as the map preview. The dimensions of this image are given in the [[Preview]] section. The image itself is stored as a base64-encoded string of LZO compressed data that, when decompressed, contains the image in BGR format. The scanline of each row of pixels is precisely 3 times the width, i.e. no additional padding is used. | |||
== Editing previews == | |||
[[File:DCUprisingPreviewCNCMaps.png|200px|thumb|right|Preview of DC Uprising map generated with CNCMaps renderer]] | |||
There is little need to edit this manually, as [[XCC Mixer]] can [[XCC Mixer file conversion#Copy As|create this section]] from any desired picture, which can then be pasted into a map file. This is used in the newest version of the [[Assault Mappacks]] to display an informational picture to users which are playing an Assault-compatible mod without downloading the mappacks themselves. (See the Assault Mappacks page for more info.) | There is little need to edit this manually, as [[XCC Mixer]] can [[XCC Mixer file conversion#Copy As|create this section]] from any desired picture, which can then be pasted into a map file. This is used in the newest version of the [[Assault Mappacks]] to display an informational picture to users which are playing an Assault-compatible mod without downloading the mappacks themselves. (See the Assault Mappacks page for more info.) | ||
The map editor [[Final Alert]] is also capable of generating previews based on the tiles of the map. Higher quality previews can be obtained using a resized picture of the full map. The [http://github.com/zzattack/ccmaps-net CNCMaps rendering tool] contains an option to directly inject a high-quality preview into the map. | The map editor [[Final Alert]] is also capable of generating previews based on the tiles of the map. Higher quality previews can be obtained using a resized picture of the full map. The [http://github.com/zzattack/ccmaps-net CNCMaps rendering tool] contains an option to create these, and directly inject a high-quality preview into the map. | ||
== Width/height proportions of original maps == | |||
[[File:PreviewPackWrongDimensionsRatio.png|200px|thumb|right|PreviewPack that does not adhere to official dimensions ratio]] | |||
The dimensions of the preview image on official maps appear to have a relation to either the LocalSize or Size of the map, depending on the game. Deviating from these dimensions ''can'' but not always will cause unwanted black pixels to appear in the image, as can be seen in the image on the right. The table below shows the formulas that appear to be used, values presented are rounded and not precise. They were taken from the research presented at{{fnl|1}}, where more precise values can be found. | |||
{| align="center" cellpadding="4" class="table_descrowdesccol" | |||
!Game | |||
!Preview width | |||
!Preview height | |||
|- | |||
!Tiberian Sun | |||
|1.975 * full width | |||
|0.995 * full height | |||
|- | |||
!FireStorm | |||
|1.975 * full width | |||
|0.995 * full height | |||
|- | |||
!Red Alert 2 | |||
|1.975 * full width | |||
|0.995 * full height | |||
|- | |||
!Yuri's Revenge | |||
|1.975 * local width | |||
|1.0 * local height | |||
|} | |||
[[Category:Maps Sections|PreviewPack]] | [[Category:Maps Sections|PreviewPack]] | ||
== See also == | |||
==See also== | {{fn|1|[[https://docs.google.com/spreadsheet/ccc?key=0AiVQdoAJ4w7bdGFraGRqM3FZZk5FWVBiR0pIYnJGbGc&usp=sharing C&C TS/RA2 - PreviewPack / LocalSize / Map Size proportions]] - Spreadsheet containing the proportions between preview sizem LocalSize and full map size for the official TS, FS, RA2 and YR maps.}} | ||
Revision as of 16:49, 26 August 2013
This section in a map file contains the picture that is to be used as the map preview. The dimensions of this image are given in the Preview section. The image itself is stored as a base64-encoded string of LZO compressed data that, when decompressed, contains the image in BGR format. The scanline of each row of pixels is precisely 3 times the width, i.e. no additional padding is used.
Editing previews
There is little need to edit this manually, as XCC Mixer can create this section from any desired picture, which can then be pasted into a map file. This is used in the newest version of the Assault Mappacks to display an informational picture to users which are playing an Assault-compatible mod without downloading the mappacks themselves. (See the Assault Mappacks page for more info.) The map editor Final Alert is also capable of generating previews based on the tiles of the map. Higher quality previews can be obtained using a resized picture of the full map. The CNCMaps rendering tool contains an option to create these, and directly inject a high-quality preview into the map.
Width/height proportions of original maps
The dimensions of the preview image on official maps appear to have a relation to either the LocalSize or Size of the map, depending on the game. Deviating from these dimensions can but not always will cause unwanted black pixels to appear in the image, as can be seen in the image on the right. The table below shows the formulas that appear to be used, values presented are rounded and not precise. They were taken from the research presented at1, where more precise values can be found.
Game | Preview width | Preview height |
---|---|---|
Tiberian Sun | 1.975 * full width | 0.995 * full height |
FireStorm | 1.975 * full width | 0.995 * full height |
Red Alert 2 | 1.975 * full width | 0.995 * full height |
Yuri's Revenge | 1.975 * local width | 1.0 * local height |
See also
1 ↑ [C&C TS/RA2 - PreviewPack / LocalSize / Map Size proportions] - Spreadsheet containing the proportions between preview sizem LocalSize and full map size for the official TS, FS, RA2 and YR maps.