https://wiki.beyondunreal.com/w/index.php?action=history&feed=atomUE2:Exporting heightmaps - Revision history2017-11-18T07:53:13ZRevision history for this page on the wikiMediaWiki 1.25.1https://wiki.beyondunreal.com/UE2:Exporting_heightmaps?diff=34593&oldid=prevWormbo: /* Export via UTPT and G16ed */ added image captions and mentioned why format=102009-07-28T10:23:17Z<p><span dir="auto"><span class="autocomment">Export via UTPT and G16ed: </span> added image captions and mentioned why format=10</span></p>
<table class='diff diff-contentalign-left'>
<col class='diff-marker' />
<col class='diff-content' />
<col class='diff-marker' />
<col class='diff-content' />
<tr style='vertical-align: top;'>
<td colspan='2' style="background-color: white; color:black; text-align: center;">← Older revision</td>
<td colspan='2' style="background-color: white; color:black; text-align: center;">Revision as of 10:23, 28 July 2009</td>
</tr><tr><td colspan="2" class="diff-lineno" id="L6" >Line 6:</td>
<td colspan="2" class="diff-lineno">Line 6:</td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>==Export via UTPT and G16ed==</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>==Export via UTPT and G16ed==</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>[[Image:UTPT-ExportTree-ContextMenu.png|right|thumb]]</div></td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>[[Image:UTPT-ExportTree-ContextMenu.png|right|thumb<ins class="diffchange diffchange-inline">|Pop-up menu of the Texture object with the "Analize Raw Object" entry.</ins>]]</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>If the game doesn't support texture export, you can try using [[UTPT]] and [[G16ed]] to extract the raw texture data of the height map. Unfortunately UTPT does not support G16 texture export, but it will help finding the parameters for G16ed's RAW import:</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>If the game doesn't support texture export, you can try using [[UTPT]] and [[G16ed]] to extract the raw texture data of the height map. Unfortunately UTPT does not support G16 texture export, but it will help finding the parameters for G16ed's RAW import:</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>#Open the package containing the height map (usually the map file itself) in UTPT.</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>#Open the package containing the height map (usually the map file itself) in UTPT.</div></td></tr>
<tr><td colspan="2" class="diff-lineno" id="L12" >Line 12:</td>
<td colspan="2" class="diff-lineno">Line 12:</td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>#Right-click on its entry in the list and select "Analize Raw Object". [sic] A hexeditor-like view should open.</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>#Right-click on its entry in the list and select "Analize Raw Object". [sic] A hexeditor-like view should open.</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>#In that view's menu select Format -> Auto format. UTPT now auto-formats the raw texture data by interpreting the data and adding background colors to th various fields. You don't need to worry what most of the field actually mean.</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>#In that view's menu select Format -> Auto format. UTPT now auto-formats the raw texture data by interpreting the data and adding background colors to th various fields. You don't need to worry what most of the field actually mean.</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>#[[Image:UTPT-Raw-Property.png|right|thumb]]Hover your mouse over the various fields marked with gray background to find the property '''Format''' and check its value. It should be '10', meaning 16 bit grayscale. If it's a different value, you can skip the remaining steps and just export the height map directly with UTPT.</div></td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>#[[Image:UTPT-Raw-Property.png|right|thumb<ins class="diffchange diffchange-inline">|The "Format" property with a byte value of 10<sub>dec</sub>.</ins>]]Hover your mouse over the various fields marked with gray background to find the property '''Format''' and check its value. It should be '10'<ins class="diffchange diffchange-inline">, which stands for [[UE2:BitmapMaterial (UT2004)#ETextureFormat|ETextureFormat.TEXF_G16]]</ins>, meaning 16 bit grayscale. If it's a different value, you can skip the remaining steps and just export the height map directly with UTPT.</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>#Next find the fields '''USize''' and '''VSize''' (not UBits and VBits) and note their values as the height map's X and Y dimension respectively.</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>#Next find the fields '''USize''' and '''VSize''' (not UBits and VBits) and note their values as the height map's X and Y dimension respectively.</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>#Select the first byte of the large yellow data block labeled '''MipMapData'''.</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>#Select the first byte of the large yellow data block labeled '''MipMapData'''.</div></td></tr>
</table>Wormbohttps://wiki.beyondunreal.com/UE2:Exporting_heightmaps?diff=34081&oldid=prevWormbo: how to export height maps using UTPT, G16ed and Windows Calculator ;-)2009-03-01T11:28:57Z<p>how to export height maps using UTPT, G16ed and Windows Calculator ;-)</p>
<p><b>New page</b></p><div>[[Unreal Engine 2]] games store [[terrain]] height maps as grayscale images with 16 bits per pixel. To port terrain to a different game or to edit the height map in an external application, you need to export the terrain height map first. The result will be a 16 bit [[wp:Windows Bitmap|Windows Bitmap]] file that needs to be edited in special applications, such as [[G16ed]]. Almost no regular image manipulation tool supports 16 bit grayscale images, some interpret it as 16 bit color image, some reduce the color range to 8 bit.<br />
<br />
==Export via UnrealEd==<br />
{{sectstub|Link to general texture export page}}<br />
If the game supports it, you can use the [[UnrealEd 3]] or [[BatchExportCommandlet]] that comes with the game to export the height map texture as BMP.<br />
<br />
==Export via UTPT and G16ed==<br />
[[Image:UTPT-ExportTree-ContextMenu.png|right|thumb]]<br />
If the game doesn't support texture export, you can try using [[UTPT]] and [[G16ed]] to extract the raw texture data of the height map. Unfortunately UTPT does not support G16 texture export, but it will help finding the parameters for G16ed's RAW import:<br />
#Open the package containing the height map (usually the map file itself) in UTPT.<br />
#Browse the Export Tree or Export Table to find the height map texture.<br />
#Right-click on its entry in the list and select "Analize Raw Object". [sic] A hexeditor-like view should open.<br />
#In that view's menu select Format -> Auto format. UTPT now auto-formats the raw texture data by interpreting the data and adding background colors to th various fields. You don't need to worry what most of the field actually mean.<br />
#[[Image:UTPT-Raw-Property.png|right|thumb]]Hover your mouse over the various fields marked with gray background to find the property '''Format''' and check its value. It should be '10', meaning 16 bit grayscale. If it's a different value, you can skip the remaining steps and just export the height map directly with UTPT.<br />
#Next find the fields '''USize''' and '''VSize''' (not UBits and VBits) and note their values as the height map's X and Y dimension respectively.<br />
#Select the first byte of the large yellow data block labeled '''MipMapData'''.<br />
#At the bottom of the raw analysis view there should be a label reading "Offset in Package: 0x...", the value after "0x" is the height map data's start offset in the package file in [[wp:hexadecimal|hexadecimal]] notation.<br />
Now you're ready to extract the height map with G16ed:<br />
#Select File -> Import -> RAW data... from G16ed's menu.<br />
#Enter path and file name (with extension) of the package file in the '''File''' field or select it through the "..." button.<br/>Note that the open file dialog assumes the file extension "raw" by default. Just enter "*.*" in the file name field there and press enter to see all files.<br />
#Leave '''Bits per pixel''' at 16 and '''Byte ordering''' at "Little-endian (Intel)"<br />
#Enter the height map dimensions you found with UTPT as the '''Width''' (USize) and '''Height''' (VSize)<br />
#Enter the '''Data start offset''' in [[wp:decimal|decimal]] notation. You can use e.g. the Windows Calculator to convert the value:<br />
##Switch to scientific mode (menu View -> Scientific)<br />
##Switch to hexadecimal mode (press F5 or click on ''Hex'')<br />
##Enter the hexadecimal value<br />
##Switch to decimal mode (press F6 or click on ''Dec'')<br />
##Copy/paste or manually enter the displayed decimal value in G16ed<br />
<br />
[[Category:Mapping tutorials|{{PAGENAME}}]]</div>Wormbo