Page 1 of 1

is the xxx_WBL.xml format described somewhere?

PostPosted: Sun Nov 26, 2006 12:43 am
by hunterkiller
Code: Select all
<WaterBody>
   <int name="WaterID">16</int>
   <int name="Type">30</int>
   <float name="WaterLevel">-50.728455</float>
   <int64 name="nPixels">7638</int64>
   <int name="xCoord">991</int>
      <int name="yCoord">398</int>
</WaterBody>


I am not clear what the above describes. The type seems to be related to an enum somewhere... is that described?

Also what does nPixels mean? can that be changed into a width/height or some such?

So I've got 2 renders: one that renders a plane of water at a certain elevation and another that renders a water sphere at a certain radius for my sphere terrain. Both seem ready to use WaterLevel, but there is also culling involved, so I'd like to be able to use xCoord, yCoord, and something that describes the area of the water.

Anyway any advise how I can turn this data into a texture-space area would be much appreciated!

PostPosted: Sun Nov 26, 2006 10:48 am
by Aaron
Hi HunterKiller,

No, the water body list file is not described anywhere, yet.

1) the type is indeed an enum. Valid entries include 10 (sea) and 30 (lake).

2) nPixels is simply the number of pixels in that water body ( = area/(horiz scale)^2), and no, that can't be converted into a width/height, because the water bodies are irregularly shaped.

I guess what's needed is a plugin to calculate a bounding rectangle for water bodies, or possibly better still, one that can export a vertex list of the shoreline. Does that sound OK?

Cheers,
Aaron.