It is currently Tue, 25-07-17, 2:35 GMT

All times are UTC




Post new topic Reply to topic  [ 29 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Specmap question
PostPosted: Sun, 03-08-08, 8:51 GMT 
Offline
Site Admin
User avatar

Joined: Thu, 30-08-07, 22:52 GMT
Posts: 2726
Location: France, South, not far from Montpellier
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?


Top
 Profile  
 
 Post subject:
PostPosted: Mon, 04-08-08, 1:57 GMT 
Offline
User avatar

Joined: Thu, 25-10-07, 15:20 GMT
Posts: 991
Location: NE PA, USA
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


Top
 Profile  
 
 Post subject:
PostPosted: Mon, 04-08-08, 7:52 GMT 
Offline
Site Admin
User avatar

Joined: Thu, 30-08-07, 22:52 GMT
Posts: 2726
Location: France, South, not far from Montpellier
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...)


Top
 Profile  
 
 Post subject:
PostPosted: Mon, 04-08-08, 9:34 GMT 
Offline
User avatar

Joined: Thu, 25-10-07, 15:20 GMT
Posts: 991
Location: NE PA, USA
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


Top
 Profile  
 
 Post subject:
PostPosted: Mon, 04-08-08, 10:16 GMT 
Offline
Site Admin
User avatar

Joined: Thu, 30-08-07, 22:52 GMT
Posts: 2726
Location: France, South, not far from Montpellier
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))


Top
 Profile  
 
 Post subject:
PostPosted: Mon, 04-08-08, 10:49 GMT 
Offline
User avatar

Joined: Thu, 25-10-07, 15:20 GMT
Posts: 991
Location: NE PA, USA
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


Top
 Profile  
 
 Post subject:
PostPosted: Mon, 04-08-08, 11:29 GMT 
Offline
Site Admin
User avatar

Joined: Thu, 30-08-07, 22:52 GMT
Posts: 2726
Location: France, South, not far from Montpellier
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...)


Top
 Profile  
 
 Post subject:
PostPosted: Mon, 04-08-08, 11:46 GMT 
Offline
User avatar

Joined: Thu, 25-10-07, 15:20 GMT
Posts: 991
Location: NE PA, USA
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


Top
 Profile  
 
 Post subject:
PostPosted: Mon, 04-08-08, 11:56 GMT 
Offline
Site Admin
User avatar

Joined: Thu, 30-08-07, 22:52 GMT
Posts: 2726
Location: France, South, not far from Montpellier
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)


Top
 Profile  
 
 Post subject:
PostPosted: Mon, 04-08-08, 12:09 GMT 
Offline
User avatar

Joined: Thu, 25-10-07, 15:20 GMT
Posts: 991
Location: NE PA, USA
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


Top
 Profile  
 
 Post subject:
PostPosted: Mon, 04-08-08, 12:43 GMT 
Offline
Site Admin
User avatar

Joined: Thu, 30-08-07, 22:52 GMT
Posts: 2726
Location: France, South, not far from Montpellier
I don't see anything odd:
Image


Top
 Profile  
 
 Post subject:
PostPosted: Mon, 04-08-08, 12:51 GMT 
Offline
User avatar

Joined: Thu, 25-10-07, 15:20 GMT
Posts: 991
Location: NE PA, USA
Do the blocks also appear at lower resolutions? Like level4 or level3? You are using png? Not dds?
cartrite


Top
 Profile  
 
 Post subject:
PostPosted: Mon, 04-08-08, 12:55 GMT 
Offline
Site Admin
User avatar

Joined: Thu, 30-08-07, 22:52 GMT
Posts: 2726
Location: France, South, not far from Montpellier
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!


Top
 Profile  
 
 Post subject:
PostPosted: Mon, 04-08-08, 12:56 GMT 
Offline
Site Admin
User avatar

Joined: Thu, 30-08-07, 22:52 GMT
Posts: 2726
Location: France, South, not far from Montpellier
I think I'll have to try a specmap alone to see how it goes...


Top
 Profile  
 
 Post subject:
PostPosted: Mon, 04-08-08, 13:00 GMT 
Offline
User avatar

Joined: Thu, 25-10-07, 15:20 GMT
Posts: 991
Location: NE PA, USA
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


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 29 posts ]  Go to page 1, 2  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group