<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.planetside.co.uk/wiki/index.php?action=history&amp;feed=atom&amp;title=Terragen_.TER_Format</id>
	<title>Terragen .TER Format - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://www.planetside.co.uk/wiki/index.php?action=history&amp;feed=atom&amp;title=Terragen_.TER_Format"/>
	<link rel="alternate" type="text/html" href="https://www.planetside.co.uk/wiki/index.php?title=Terragen_.TER_Format&amp;action=history"/>
	<updated>2026-04-15T13:25:03Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.31.0</generator>
	<entry>
		<id>https://www.planetside.co.uk/wiki/index.php?title=Terragen_.TER_Format&amp;diff=13545&amp;oldid=prev</id>
		<title>Matt: Added link to tgter on Github</title>
		<link rel="alternate" type="text/html" href="https://www.planetside.co.uk/wiki/index.php?title=Terragen_.TER_Format&amp;diff=13545&amp;oldid=prev"/>
		<updated>2020-10-23T20:12:11Z</updated>

		<summary type="html">&lt;p&gt;Added link to tgter on Github&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 20:12, 23 October 2020&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l53&quot; &gt;Line 53:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 53:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;blockquote&amp;gt; ALTW stands for 'Altitude in 16-bit Words'. After The &amp;quot;ALTW&amp;quot; marker, the following appear in order: &amp;lt;blockquote&amp;gt;''HeightScale'', a 2-byte signed integer value. &amp;lt;br /&amp;gt;''BaseHeight'', a 2-byte signed integer value. &amp;lt;br /&amp;gt;''Elevations'', a sequence of 2-byte signed integers. &amp;lt;/blockquote&amp;gt; There are (''xpts'' * ''ypts'') elevation integers, where ''xpts'' and ''ypts'' will have been set earlier in the &amp;quot;SIZE&amp;quot; chunk or the &amp;quot;XPTS&amp;quot; and &amp;quot;YPTS&amp;quot; chunks. The elevations are ordered such that the first row (''y'' = 0) is read first from left to right, then the second (''y'' = 1), and so on. The values in ''Elevations'' are not absolute altitudes. The absolute altitude of a particular point (in the same scale as ''x'' and ''y'') is equal to ''BaseHeight'' + (''Elevation'' * ''HeightScale'' / 65536) &amp;lt;/blockquote&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;blockquote&amp;gt; ALTW stands for 'Altitude in 16-bit Words'. After The &amp;quot;ALTW&amp;quot; marker, the following appear in order: &amp;lt;blockquote&amp;gt;''HeightScale'', a 2-byte signed integer value. &amp;lt;br /&amp;gt;''BaseHeight'', a 2-byte signed integer value. &amp;lt;br /&amp;gt;''Elevations'', a sequence of 2-byte signed integers. &amp;lt;/blockquote&amp;gt; There are (''xpts'' * ''ypts'') elevation integers, where ''xpts'' and ''ypts'' will have been set earlier in the &amp;quot;SIZE&amp;quot; chunk or the &amp;quot;XPTS&amp;quot; and &amp;quot;YPTS&amp;quot; chunks. The elevations are ordered such that the first row (''y'' = 0) is read first from left to right, then the second (''y'' = 1), and so on. The values in ''Elevations'' are not absolute altitudes. The absolute altitude of a particular point (in the same scale as ''x'' and ''y'') is equal to ''BaseHeight'' + (''Elevation'' * ''HeightScale'' / 65536) &amp;lt;/blockquote&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; 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;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; 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;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;== C++ Code ==&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; 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;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; 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;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;A reference implementation and header-only C++ library can be found here:&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; 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;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; 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;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;https://github.com/mfairclough/tgter&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Matt</name></author>
		
	</entry>
	<entry>
		<id>https://www.planetside.co.uk/wiki/index.php?title=Terragen_.TER_Format&amp;diff=13544&amp;oldid=prev</id>
		<title>Matt: Parentheses in equation in last paragraph</title>
		<link rel="alternate" type="text/html" href="https://www.planetside.co.uk/wiki/index.php?title=Terragen_.TER_Format&amp;diff=13544&amp;oldid=prev"/>
		<updated>2020-10-23T20:09:15Z</updated>

		<summary type="html">&lt;p&gt;Parentheses in equation in last paragraph&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 20:09, 23 October 2020&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l52&quot; &gt;Line 52:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 52:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;'''&amp;quot;ALTW&amp;quot;''' 4-byte marker. Must appear after the &amp;quot;SIZE&amp;quot; marker. Must appear after the &amp;quot;XPTS&amp;quot; and &amp;quot;YPTS&amp;quot; markers (if they exist).&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;'''&amp;quot;ALTW&amp;quot;''' 4-byte marker. Must appear after the &amp;quot;SIZE&amp;quot; marker. Must appear after the &amp;quot;XPTS&amp;quot; and &amp;quot;YPTS&amp;quot; markers (if they exist).&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; 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;&quot;&gt;&lt;div&gt;&amp;lt;blockquote&amp;gt; ALTW stands for 'Altitude in 16-bit Words'. After The &amp;quot;ALTW&amp;quot; marker, the following appear in order: &amp;lt;blockquote&amp;gt;''HeightScale'', a 2-byte signed integer value. &amp;lt;br /&amp;gt;''BaseHeight'', a 2-byte signed integer value. &amp;lt;br /&amp;gt;''Elevations'', a sequence of 2-byte signed integers. &amp;lt;/blockquote&amp;gt; There are (''xpts'' * ''ypts'') elevation integers, where ''xpts'' and ''ypts'' will have been set earlier in the &amp;quot;SIZE&amp;quot; chunk or the &amp;quot;XPTS&amp;quot; and &amp;quot;YPTS&amp;quot; chunks. The elevations are ordered such that the first row (''y'' = 0) is read first from left to right, then the second (''y'' = 1), and so on. The values in ''Elevations'' are not absolute altitudes. The absolute altitude of a particular point (in the same scale as ''x'' and ''y'') is equal to ''BaseHeight'' + ''Elevation'' * ''HeightScale'' / 65536&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;. &lt;/del&gt;&amp;lt;/blockquote&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; 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;&quot;&gt;&lt;div&gt;&amp;lt;blockquote&amp;gt; ALTW stands for 'Altitude in 16-bit Words'. After The &amp;quot;ALTW&amp;quot; marker, the following appear in order: &amp;lt;blockquote&amp;gt;''HeightScale'', a 2-byte signed integer value. &amp;lt;br /&amp;gt;''BaseHeight'', a 2-byte signed integer value. &amp;lt;br /&amp;gt;''Elevations'', a sequence of 2-byte signed integers. &amp;lt;/blockquote&amp;gt; There are (''xpts'' * ''ypts'') elevation integers, where ''xpts'' and ''ypts'' will have been set earlier in the &amp;quot;SIZE&amp;quot; chunk or the &amp;quot;XPTS&amp;quot; and &amp;quot;YPTS&amp;quot; chunks. The elevations are ordered such that the first row (''y'' = 0) is read first from left to right, then the second (''y'' = 1), and so on. The values in ''Elevations'' are not absolute altitudes. The absolute altitude of a particular point (in the same scale as ''x'' and ''y'') is equal to ''BaseHeight'' + &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;(&lt;/ins&gt;''Elevation'' * ''HeightScale'' / 65536&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;) &lt;/ins&gt;&amp;lt;/blockquote&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Matt</name></author>
		
	</entry>
	<entry>
		<id>https://www.planetside.co.uk/wiki/index.php?title=Terragen_.TER_Format&amp;diff=13543&amp;oldid=prev</id>
		<title>Matt: Correction to altitude equation in the last paragraph</title>
		<link rel="alternate" type="text/html" href="https://www.planetside.co.uk/wiki/index.php?title=Terragen_.TER_Format&amp;diff=13543&amp;oldid=prev"/>
		<updated>2020-10-23T20:08:02Z</updated>

		<summary type="html">&lt;p&gt;Correction to altitude equation in the last paragraph&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 20:08, 23 October 2020&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l52&quot; &gt;Line 52:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 52:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;'''&amp;quot;ALTW&amp;quot;''' 4-byte marker. Must appear after the &amp;quot;SIZE&amp;quot; marker. Must appear after the &amp;quot;XPTS&amp;quot; and &amp;quot;YPTS&amp;quot; markers (if they exist).&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;'''&amp;quot;ALTW&amp;quot;''' 4-byte marker. Must appear after the &amp;quot;SIZE&amp;quot; marker. Must appear after the &amp;quot;XPTS&amp;quot; and &amp;quot;YPTS&amp;quot; markers (if they exist).&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; 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;&quot;&gt;&lt;div&gt;&amp;lt;blockquote&amp;gt; ALTW stands for 'Altitude in 16-bit Words'. After The &amp;quot;ALTW&amp;quot; marker, the following appear in order: &amp;lt;blockquote&amp;gt;''HeightScale'', a 2-byte signed integer value. &amp;lt;br /&amp;gt;''BaseHeight'', a 2-byte signed integer value. &amp;lt;br /&amp;gt;''Elevations'', a sequence of 2-byte signed integers. &amp;lt;/blockquote&amp;gt; There are (''xpts'' * ''ypts'') elevation integers, where ''xpts'' and ''ypts'' will have been set earlier in the &amp;quot;SIZE&amp;quot; chunk or the &amp;quot;XPTS&amp;quot; and &amp;quot;YPTS&amp;quot; chunks. The elevations are ordered such that the first row (''y'' = 0) is read first from left to right, then the second (''y'' = 1), and so on. The values in ''Elevations'' are not absolute altitudes. The absolute altitude of a particular point (in the same scale as ''x'' and ''y'') is equal to ''BaseHeight'' ''Elevation'' * ''HeightScale'' / 65536. &amp;lt;/blockquote&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; 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;&quot;&gt;&lt;div&gt;&amp;lt;blockquote&amp;gt; ALTW stands for 'Altitude in 16-bit Words'. After The &amp;quot;ALTW&amp;quot; marker, the following appear in order: &amp;lt;blockquote&amp;gt;''HeightScale'', a 2-byte signed integer value. &amp;lt;br /&amp;gt;''BaseHeight'', a 2-byte signed integer value. &amp;lt;br /&amp;gt;''Elevations'', a sequence of 2-byte signed integers. &amp;lt;/blockquote&amp;gt; There are (''xpts'' * ''ypts'') elevation integers, where ''xpts'' and ''ypts'' will have been set earlier in the &amp;quot;SIZE&amp;quot; chunk or the &amp;quot;XPTS&amp;quot; and &amp;quot;YPTS&amp;quot; chunks. The elevations are ordered such that the first row (''y'' = 0) is read first from left to right, then the second (''y'' = 1), and so on. The values in ''Elevations'' are not absolute altitudes. The absolute altitude of a particular point (in the same scale as ''x'' and ''y'') is equal to ''BaseHeight'' &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;+ &lt;/ins&gt;''Elevation'' * ''HeightScale'' / 65536. &amp;lt;/blockquote&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Matt</name></author>
		
	</entry>
	<entry>
		<id>https://www.planetside.co.uk/wiki/index.php?title=Terragen_.TER_Format&amp;diff=5987&amp;oldid=prev</id>
		<title>JavaJones: Created page with &quot;= Terragen™ Terrain file specification =  == File Structure ==  A terrain file contains a 16-byte identifier followed by a number of chunks. The positions of the various chunks...&quot;</title>
		<link rel="alternate" type="text/html" href="https://www.planetside.co.uk/wiki/index.php?title=Terragen_.TER_Format&amp;diff=5987&amp;oldid=prev"/>
		<updated>2012-11-09T16:49:12Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;= Terragen™ Terrain file specification =  == File Structure ==  A terrain file contains a 16-byte identifier followed by a number of chunks. The positions of the various chunks...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;= Terragen™ Terrain file specification =&lt;br /&gt;
&lt;br /&gt;
== File Structure ==&lt;br /&gt;
&lt;br /&gt;
A terrain file contains a 16-byte identifier followed by a number of chunks. The positions of the various chunks are not rigidly defined, so if you are writing a terrain file reader it should allow for the flexibility of chunk positioning. However, if you are writing out terrain files, beware that some chunks must appear before others.&lt;br /&gt;
&lt;br /&gt;
All chunks are aligned to the nearest 4 bytes. Each chunk contains a 4-byte marker (eg. &amp;quot;ALTW&amp;quot;), then some data.&lt;br /&gt;
&lt;br /&gt;
Note: The structure of a chunk in a terrain file is different from that of the chunks found in some other Terragen files. Terrain file chunks do not include a &amp;quot;length of data&amp;quot; value.&lt;br /&gt;
&lt;br /&gt;
A terrain file must contain the following:&lt;br /&gt;
&lt;br /&gt;
# An 8-byte &amp;quot;TERRAGEN&amp;quot; string at the beginning of the file. &lt;br /&gt;
# An 8-byte &amp;quot;TERRAIN &amp;quot; string located 8 bytes from the beginning of the file. (Note the last space character.) &lt;br /&gt;
# A &amp;quot;SIZE&amp;quot; chunk. &lt;br /&gt;
# If the terrain is not square, &amp;quot;XPTS&amp;quot; and &amp;quot;YPTS&amp;quot; chunks are required. &lt;br /&gt;
# A 4-byte &amp;quot;EOF &amp;quot; string at the end of the file (necessary for old versions of Terragen).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Following these, the actual elevation data may be described. Future versions of Terragen may support compression of the data, or a more efficient storage method, but until then the elevation data is stored in an &amp;quot;ALTW&amp;quot; chunk.&lt;br /&gt;
&lt;br /&gt;
Please note that all distance units (X, Y and Z) are in Terrain units, and not metres. If you need to convert from metres, the default scale is 30 metres to one terrain unit.&lt;br /&gt;
&lt;br /&gt;
The actual scale value for a particular terrain is stored in its &amp;quot;SCAL&amp;quot; chunk.&lt;br /&gt;
&lt;br /&gt;
== The Chunks ==&lt;br /&gt;
&lt;br /&gt;
'''&amp;quot;XPTS&amp;quot;''' 4-byte marker. Must appear after the &amp;quot;SIZE&amp;quot; marker. Must appear before any altitude data.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt; The &amp;quot;XPTS&amp;quot; marker is followed by a 2-byte integer value ''xpts'', followed by 2 bytes of padding. ''xpts'' is equal to the number of data points in the ''x''-direction in the elevation image. &amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''&amp;quot;YPTS&amp;quot;''' 4-byte marker. Must appear after the &amp;quot;SIZE&amp;quot; marker. Must appear before any altitude data.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt; The &amp;quot;YPTS&amp;quot; marker is followed by a 2-byte integer value ''ypts'', followed by 2 bytes of padding. ''ypts'' is equal to the number of data points in the ''y''-direction in the elevation image. &amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''&amp;quot;SIZE&amp;quot;''' 4-byte marker, necessary. Must appear before any altitude data.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt; The &amp;quot;SIZE&amp;quot; marker is followed by a 2-byte integer value equal to '''''n'' - 1''', followed by 2 bytes of padding. In square terrains, ''n'' is the number of data points on a side of the elevation image. In non-square terrains, ''n'' is equal to the number of data points along the shortest side. &amp;lt;br /&amp;gt;Example: a terrain with a heightfield 300 points in the ''x''-direction and 400 points in the ''y''-direction would have a size value of 299. &amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''&amp;quot;SCAL&amp;quot;''' 4-byte marker, optional. Must appear before any altitude data.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt; The &amp;quot;SCAL&amp;quot; marker is followed by three intel-ordered 4-byte floating point values (x,y,z). It represents the scale of the terrain in metres per terrain unit. Default scale is currently (30,30,30). At present, Terragen can not use non-uniform scaling, so x, y and z must be equal. &amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''&amp;quot;CRAD&amp;quot;''' 4-byte marker, optional. Must appear before any altitude data.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt; The &amp;quot;CRAD&amp;quot; marker is followed by one intel-ordered 4-byte floating point value. It represents the radius of the planet being rendered and is measured in kilometres. The default value is 6370, which is the approximate radius of the Earth. &amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''&amp;quot;CRVM&amp;quot;''' 4-byte marker, optional. Must appear before any altitude data.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt; The &amp;quot;CRVM&amp;quot; marker is followed by one unsigned integer. Mode 0 means the terrain is rendered flat (default). Mode 1 means the terrain is draped (and stretched) over a sphere of radius CRAD*1000/zscale, centred at (midx, midy, -CRAD*1000/zscale), where midx=XSIZE/2 and midy=YSIZE/2. (Terrain sizes are one less than the number of points on the side.) &amp;lt;br /&amp;gt;The x and y values are undistorted, therefore the map will still look normal when viewed from above, but geographic distances will be stretched towards the edge of the map if there is a lot of curvature. There is also an implicit limit on the size/curvature radius of a landscape before the landscape becomes unacceptably distorted. &amp;lt;br /&amp;gt;Other curve modes are currently undefined, and reserved for the future. &amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''&amp;quot;ALTW&amp;quot;''' 4-byte marker. Must appear after the &amp;quot;SIZE&amp;quot; marker. Must appear after the &amp;quot;XPTS&amp;quot; and &amp;quot;YPTS&amp;quot; markers (if they exist).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt; ALTW stands for 'Altitude in 16-bit Words'. After The &amp;quot;ALTW&amp;quot; marker, the following appear in order: &amp;lt;blockquote&amp;gt;''HeightScale'', a 2-byte signed integer value. &amp;lt;br /&amp;gt;''BaseHeight'', a 2-byte signed integer value. &amp;lt;br /&amp;gt;''Elevations'', a sequence of 2-byte signed integers. &amp;lt;/blockquote&amp;gt; There are (''xpts'' * ''ypts'') elevation integers, where ''xpts'' and ''ypts'' will have been set earlier in the &amp;quot;SIZE&amp;quot; chunk or the &amp;quot;XPTS&amp;quot; and &amp;quot;YPTS&amp;quot; chunks. The elevations are ordered such that the first row (''y'' = 0) is read first from left to right, then the second (''y'' = 1), and so on. The values in ''Elevations'' are not absolute altitudes. The absolute altitude of a particular point (in the same scale as ''x'' and ''y'') is equal to ''BaseHeight'' ''Elevation'' * ''HeightScale'' / 65536. &amp;lt;/blockquote&amp;gt;&lt;/div&gt;</summary>
		<author><name>JavaJones</name></author>
		
	</entry>
</feed>