http://forum.celestialmatters.org/

Specmap question
http://forum.celestialmatters.org/viewtopic.php?f=6&t=238
Page 1 of 2

Author:  ElChristou [ Sun, 03-08-08, 8:51 GMT ]
Post subject:  Specmap question

Guys, I'm a bit lost. As I just begun to dig (at last!) the question of the making of a set of high quality VTs, please be patient. For now I have my normal VT and it's just great. Now I go for the spec map.

The tool say:

Usage: specmap <width> <watermask name> [<light> [<byteswap>]]

------------------------------------------------------------------------
The program reads an elevation map in signed 16 bit integer raw format
from STDIN and the BMNG watermask of same width in 8 bit unsigned
integer raw format via the command line. In the heightmap, oceans are
found from 'elevation == 0'. The result is bitwise OR-ed with (the
complement of) the watermask to improve the precision of the ocean
boundaries of the latter. The resulting specmap is output at STDOUT
as a graymap in 8 bit unsigned integer raw format.
------------------------------------------------------------------------

Now, as I understand the above description, we need to process and elevation map AND a watermask to get the specmap. Now the stupid question is, where in the above usage is define the elevation map?

Author:  cartrite [ Mon, 04-08-08, 1:57 GMT ]
Post subject: 

When the specmap tool first came out, the only specmap around was the one from NASA. The watermask. This did not do to well aligning itself to the coastlines and inland waterways. So what specmap tool is doing in rewriting the coast lines with data from the srtm topographic file.

If you use the specmap from my site called landmask, you can skip this step. All you do is run tx2rgba using the decompressed landmask file. Like this for example.
Code:
gzip -dc < world.200403.3x86400x43200.bin.gz | tx2rgba 86400 swbd-landmask-ver3.1x86400x43200.bin | tx2pow2 4 86400 > level5/world.200403.4x65536x32768.RGBA.bin


Just in case you wish to use specmap tool, Here is a command I had in my bash history.
Code:
gzip -dc < srtm_ramp2.world.86400x43200.bin.gz | specmap 86400 swbd-watermask-ver2-t00fri.1x86400x43200.bin 0.12 1 > specmap.bin
Notice that gzip decompresses the topo file and the "|" pipe provides that as input to specmap tool.
cartrite

Author:  ElChristou [ Mon, 04-08-08, 7:52 GMT ]
Post subject: 

Tx Stephen.

To be sure about my question, let's say I have a file A for elevation, B for watermask and C would be the resulting file, the command should be:

Code:
 A | specmap width B light byteswap > C


Is that right?

(Anyway I think I will use your landmask but I was really trilled by the usage and def in Fridger's tool...)

Author:  cartrite [ Mon, 04-08-08, 9:34 GMT ]
Post subject: 

ElChristou wrote:
Code:
 A | specmap width B light byteswap > C


Is that right?


Not really. It would be more like,
Code:
gzip A | specmap widith B light byteswap > C
The "|" is a symbol that represents the output from gzip is the input to specmap. Since specmap uses 2 files as input, I'm not sure how it would be written if gzip were not used.
cartrite

Author:  ElChristou [ Mon, 04-08-08, 10:16 GMT ]
Post subject: 

cartrite wrote:
... Since specmap uses 2 files as input, I'm not sure how it would be written if gzip were not used...


That's what I was wondering... Well let's wait our Swiss chocolate Guru for more info...

Question, I have successfully build a 64 png VT set, now how to convert in dds? (I tried DW's Squish but I get a right spec but the lands are almost black...(-> while the pngs are just fine))

Author:  cartrite [ Mon, 04-08-08, 10:49 GMT ]
Post subject: 

ElChristou wrote:
Question, I have successfully build a 64 png VT set, now how to convert in dds? (I tried DW's Squish but I get a right spec but the lands are almost black...(-> while the pngs are just fine))

Not sure what could be wrong. I haven't done many dds conversions. I have done it though without any problems. I used the "nvidia-texture-tools-2.0.1.tar.gz" from the Nvidia site.
cartrite

Author:  ElChristou [ Mon, 04-08-08, 11:29 GMT ]
Post subject: 

cartrite wrote:
ElChristou wrote:
Question, I have successfully build a 64 png VT set, now how to convert in dds? (I tried DW's Squish but I get a right spec but the lands are almost black...(-> while the pngs are just fine))

Not sure what could be wrong. I haven't done many dds conversions. I have done it though without any problems. I used the "nvidia-texture-tools-2.0.1.tar.gz" from the Nvidia site.
cartrite


Mmhh.. will have to dig this, those tools are for PC, right?

My 64 png set is not that good. Got a problem with the spec...

Image

I have used your landmask with one of the BMNG color map. Any idea of what's going on? (Seems the two maps were not at the same scale, but as far as I know both are 86k...)

Author:  cartrite [ Mon, 04-08-08, 11:46 GMT ]
Post subject: 

ElChristou wrote:

Mmhh.. will have to dig this, those tools are for PC, right?
The "nvidia-texture-tools-2.0.1.tar.gz" is now available in 2.0.3 and it is source code. So they could be built for MAC with the proper development packages.
Quote:

My 64 png set is not that good. Got a problem with the spec...


I have used your landmask with one of the BMNG color map. Any idea of what's going on? (Seems the two maps were not at the same scale, but as far as I know both are 86k...)
This looks like a problem with the normalmap. If you are using one, then try to disable it and see if that clears up the blocks. If that doesn't work, then do you have the specmap in the alpha channel or are you using it in a separate file? Could you post the command that was used to process the specmap to a VT?
cartrite

Author:  ElChristou [ Mon, 04-08-08, 11:56 GMT ]
Post subject: 

cartrite wrote:
This looks like a problem with the normalmap. If you are using one, then try to disable it and see if that clears up the blocks. If that doesn't work, then do you have the specmap in the alpha channel or are you using it in a separate file? Could you post the command that was used to process the specmap to a VT?


I disable the normalmap, same artifacts. The spec is in the alpha and I use something like

tx2tiles 4 65536 5 < color64k.bin

(color64.bin was the result of tx2rgba followed by a tx2pow2 just like your example above)

Author:  cartrite [ Mon, 04-08-08, 12:09 GMT ]
Post subject: 

Can you open a level5 VT file with an image editor and extract the alpha spec and see what it looks like? Like so. This is file tx_11_10.png

Image

This may be a card issue. Your card may not be rendering the alpha channel properly.
cartrite

Author:  ElChristou [ Mon, 04-08-08, 12:43 GMT ]
Post subject: 

I don't see anything odd:
Image

Author:  cartrite [ Mon, 04-08-08, 12:51 GMT ]
Post subject: 

Do the blocks also appear at lower resolutions? Like level4 or level3? You are using png? Not dds?
cartrite

Author:  ElChristou [ Mon, 04-08-08, 12:55 GMT ]
Post subject: 

Yep I'm still using png, and indeed whatever the distance, the coast do have some problems... The rivers are worst, seems one is using a 2k specmap!

Author:  ElChristou [ Mon, 04-08-08, 12:56 GMT ]
Post subject: 

I think I'll have to try a specmap alone to see how it goes...

Author:  cartrite [ Mon, 04-08-08, 13:00 GMT ]
Post subject: 

In your ssc file for the VT, Do you have a line for specmap. If so comment it out.

Code:
      #SpecularTexture "BlueMarble.ctx"

The above line is not even needed. But if it is active it may be causing you problems.
cartrite

Page 1 of 2 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/