Post #5by wcomer » 14.10.2003, 18:24
Hi Jens,
I had success with building true norm VT for level[0-5]. This weigh is at 41MB. Pehaps Mario will be willing to host it.
The level6 of the same had a major problem - contouring. I did not follow Fridger's advice to normalize before scaling. Here is what I had done,
pnmscale -xysize 65536 32768 globe43k.pgm>globe64k.pgm
nm16 [....] globe64k.pgm [...] normal64k.ppm
After a bit of sleuthing I discovered the source of the contouring. Netpbm's upscaling is terrible. It repeats rows for 16-bit greyscale and interpolates columns. Even worse, 24-bit rgb gets repeated rows and columns. Which explains why Don Edwards could see artifacts in my original 43k/64k texturemap. Netpbm has another tool, pamstretch, which will 'interpolate' for upscaling (though not very well.) This tool only works for rgb images. So the best way to go from 43k to 64k with Netpbm is:
nm16 [....] rnglobe43k.pgm [....] normal43k.ppm
pamstretch -xscale=2 -yscale=2 normal43k.ppm>normal86k.ppm
pnmscale -xysize 65536 32768 normal86k.ppm>normal64k.ppm
normrg [....] normal64k.ppm
'normrgb' is a tool I wrote to renormalize the rgb vectors in the scaled normal map, which I would be happy to share. This solution removes the visible artifacts but is far from ideal. I also need to use a similar process to recreate my 43k/64k texturemap.
It seems like Fridger had a similar problem with the interpolation of ImageMagick's 16-bit greyscaling. Looking at your 43k/64k normal map I believe I see the same contouring problem. Check your .dds files and look for horizontal and/or vertical striations/contours.
A nice thing about working with these higher resolutions is that the natural normal map generated from earth's topography is sufficient to generate significant shading effects. Unfortunately the BlueMarble texture already has many natural shadows. So the normal map creates shadows of the same magnitude which can cause unnatural double shadow effects for some lighting conditions. For now, it is probably better to use an exagerated normal map, maybe 10x. In the future I will take a crack at making a tool to automatically detect and remove the shadows using the GLOBE data and maximum likelihood methods.
cheers,
Walton