Re: Tiff with signed samples
Tom Lechner <[email protected]> Tue, 18 Aug 2020 16:01:43 -0700
| Newsgroups | gmane.comp.video.graphicsmagick.help |
|---|---|
| Message-ID | <[email protected]> |
On 8/18/20 2:58 PM, Bob Friesenhahn wrote: > With signed values, there might be a 'nominal' measurement value > equivalent to 0 with values then appearing above and below that > 'nominal' value and scaled to not lose anything important. Another way > to do things is to ignore negative values and only use the positive > values. For Mars, elevation levels in meters are magically able to be stored comfortably in a 16 bit int without custom scaling, top to bottom it's about 31 km. In the nasa mars image, not quite sure what their 0 is physically, but the pixel values range -8200 to 21162. I'm not against flooding mars to ignore the negative values, but terraforming is a lot of work! > > Maybe they can't handle such a large image. I am not exactly sure > what you mean by "create normal maps from heightmaps". Are you able > to provide a direct reference to a description so I can see what you > are talking about? > Yeah, Gimp and Krita both freeze everything and fill up my swap memory. gm will at least resize it without doing that! About normal maps, in Krita, there's an option Filter->Edge Detection->Height map to normal map, but it crashes for any image of any size I try. Gimp has something similar, but it's only in a newer version for which I need to upgrade my system, and I'm too lazy to do that at the moment. I've kind of wanted a command line alternative anyway. I could program it myself I guess, but why program when I can spend twice the time exhausting other options! Basically, height map to normal map is this: http://cpetry.github.io/NormalMap-Online/ https://stackoverflow.com/questions/5281261/generating-a-normal-map-from-a-height-map From values of adjacent "height" pixels, compute a normal vector, and store as a unit vector XYZ in RGB channels. XY are tangent to the 3d surface and Z points away from the surface. 50% means 0. Default normal is sticking straight away from the surface, usually coded as (.5, .5, 1.0). -Tom _______________________________________________ Graphicsmagick-help mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/graphicsmagick-help