SFML community forums

General => Feature requests => Topic started by: Strobe on September 17, 2011, 01:09:35 am

Title: Graphics: full 16-bit grayscale support
Post by: Strobe on September 17, 2011, 01:09:35 am
Hi!

I would eventually like to develop some height_field utilities with SFML, but as you may already know, height maps produce the best results when they are in a 16-bit format; 8-bit just really doesn't cut it.

My goal is to use the height maps in POV-Ray, though there are plenty of other programs supporting 16-bit grayscale images. I know how to produce 16-bit values using the red/green channels of an 8-bit image, but that format can be difficult to manipulate in POV. I'd like to avoid unnecessary conversions, especially if I make my utility publicly available.

sf::Image seems to be the only way to save images, and it appears to only accept 8-bit values.

16-bit grayscale support would include:


Since SFML is a multimedia library--and not only used for authoring games--this feature request doesn't seem entirely unreasonable :D

~Strobe
Title: Graphics: full 16-bit grayscale support
Post by: Laurent on September 17, 2011, 09:37:43 am
Quote
loading 16-bit data directly into images and textures

From which file format?

Quote
floating point textures (and, consequently, GLSL shaders)

This is out of scope for SFML. It's only supported by recent graphics card, so it's a bad candidate for integration in SFML.
Moreover, it would be used for very specific use cases.

Quote
Since SFML is a multimedia library--and not only used for authoring games--this feature request doesn't seem entirely unreasonable

Support for 16-bits pixel components requires support for different formats (I mean, from the public API point of view), which I'm still not sure about.
And before 16-bits floating-point formats, there are other formats that are more important to support : 8 bits luminance, YUV, ARGB, ... ;)
Title: Graphics: full 16-bit grayscale support
Post by: Silvah on September 17, 2011, 07:39:34 pm
Quote from: "Laurent"
And before 16-bits floating-point formats, there are other formats that are more important to support : 8 bits luminance, YUV, ARGB, ... ;)
Wait. Does it mean SFML doesn't support alpha channel? Or it's just the ARGB vs RGBA issue?
Title: Graphics: full 16-bit grayscale support
Post by: Laurent on September 17, 2011, 08:45:55 pm
No no, don't worry, it's just ARGB vs RGBA ;)
Title: Graphics: full 16-bit grayscale support
Post by: Strobe on September 18, 2011, 07:35:06 pm
Quote from: "Laurent"
Quote
loading 16-bit data directly into images and textures

From which file format?


From 16-bit grayscale PNGs, since they are generally the easiest format to work with.

Quote
Support for 16-bits pixel components requires support for different formats (I mean, from the public API point of view), which I'm still not sure about.
And before 16-bits floating-point formats, there are other formats that are more important to support : 8 bits luminance, YUV, ARGB, ... ;)


Ah, OK. That's all right  8) I'll probably check out the Visualization Library before I make an HF utility.

BTW Laurent, I'm very happy with SFML; it's a real joy to use! Thanks for all your hard work  :)