L3DT users' community
Large 3D terrain generator

AMF map vs climates

Any and all chit-chat regarding L3DT.

AMF map vs climates

Postby celludriel » Wed Mar 26, 2014 4:16 pm

I'm wondering about climate and land id's. The amf spec says that a pixel holds the following information Climate Id and LandType Id both one byte. However in the Climate file there is nowhere an ID to be found.

Code: Select all
   <varlist name="LandTypeList">
      <varlist name="Sand">
         <bool name="Enabled">true</bool>
         <colour name="DisplayCol">230, 230, 120</colour>
         <varlist name="Params">
            <float name="BaseProb">0.300000</float>
            <float name="Water">0.860000</float>
            <bool name="MinAltFlag">false</bool>
            <bool name="MaxAltFlag">false</bool>
         </varlist>
         <varlist name="Noise">
            <varlist name="Gen1">
               <float name="Amp">0.005000</float>
               <float name="Freq">1.000000</float>
               <int name="nOct">1</int>
            </varlist>
            <int name="RandKey">12253</int>
         </varlist>
         <int name="BlendRadius">-1</int>
         <string name="MaterialName">std_sand_yellow</string>
      </varlist>
      <varlist name="Pebbles">
         <bool name="Enabled">true</bool>
         <colour name="DisplayCol">175, 160, 131</colour>
         <varlist name="Params">
            <float name="BaseProb">0.270000</float>
            <float name="Grad">0.200000</float>
            <float name="Water">0.860000</float>
            <bool name="MinAltFlag">false</bool>
            <bool name="MaxAltFlag">false</bool>
         </varlist>
         <int name="BlendRadius">2</int>
         <string name="MaterialName">std_pebbles</string>
      </varlist>


So how can I parse the right climate id or landtype id to compare with in the AMF file ?
celludriel
Member
 
Posts: 17
Joined: Thu Mar 13, 2014 4:23 pm

Re: AMF map vs climates

Postby Aaron » Thu Mar 27, 2014 11:27 am

Hi Celludriel,

Good question. The land type ID is determined from the order in which the land types are listed in the climate. The first land type (in your example, "Sand") has a land type ID of 1. Note that a land type ID of 0 is reserved, and should never be found in files.

Best regards,
Aaron.
User avatar
Aaron
Site Admin
 
Posts: 3696
Joined: Sun Nov 20, 2005 2:41 pm
Location: Melbourne, Australia

Re: AMF map vs climates

Postby celludriel » Thu Mar 27, 2014 2:29 pm

Thanks Aaron,

This will get me going, maybe you could consider putting the id's in the xml as an attribute for further versions. This will give you a bit more flexibility suppose one day you want to mix climates together or something. I'm just thinking out of the palm of my hand here.
celludriel
Member
 
Posts: 17
Joined: Thu Mar 13, 2014 4:23 pm


Return to General discussion

Who is online

Users browsing this forum: No registered users and 9 guests

cron