[x3d-public] Need for colorspaceConversion field in ImageTexture, glTF compatibility

Brutzman, Donald (Don) (CIV) brutzman at nps.edu
Thu Sep 21 03:54:51 PDT 2023


Thanks for an interesting candidate capability.  Some references:

 

*	Wikipedia: Color space
*	https://en.wikipedia.org/wiki/Color_space

 

*	Wikipedia: List of color spaces and their uses
*	https://en.wikipedia.org/wiki/List_of_color_spaces_and_their_uses

 

>From glTF 2.0

 

*	3.9.3. Additional Textures
*	emissive : The emissive texture and factor control the color and intensity of the light being emitted by the material. The texture MUST contain 8-bit values encoded with the sRGB opto-electronic transfer function so RGB values MUST be decoded to real linear values before they are used for any computations. To achieve correct filtering, the transfer function SHOULD be decoded before performing linear interpolation.
*	https://registry.khronos.org/glTF/specs/2.0/glTF-2.0.html#additional-textures
*	References
*	IEC 61966-2-1 Default RGB colour space - sRGB  <https://webstore.iec.ch/publication/6169> https://webstore.iec.ch/publication/6169

	
Note

The encoding characteristics of sRGB are freely available from ICC:  <https://www.color.org/chardata/rgb/srgb.xalter> https://www.color.org/chardata/rgb/srgb.xalter

*	(which is at International Color Consortium)

 

Additional references welcome

 

Each mention of color profile that I found in glTF indicated that SRGB profile usage was required.  Didn’t see any other options.  Wondering if there is further work in glTF extensions on this topic.

 

Prior attempts to permit gamma definition in X3D did not converge on an acceptable solution.

 

I did not find relevant mention of “color space” or “SRGB” in X3D 4.0 specification.

 

If we can align with other standards, particularly glTF evolution, then this field certainly seems like a candidate to become a Web3D Consortium Recommended Practice in anticipation of future X3D 4.1 Architecture.  No doubt we would want to look carefully across the specification to ensure that color was handled consistently and interoperably.

 

Continued scrutiny and development welcome.  Have fun with X3D color control!  8)

 

all the best, Don

-- 

Don Brutzman  Naval Postgraduate School, Code USW/Br        brutzman at nps.edu

Watkins 270,  MOVES Institute, Monterey CA 93943-5000 USA    +1.831.656.2149

X3D graphics, virtual worlds, navy robotics https://faculty.nps.edu/brutzman

 

From: x3d-public <x3d-public-bounces at web3d.org> On Behalf Of Holger Seelig
Sent: Thursday, September 21, 2023 3:06 AM
To: Andreas Plesch <andreasplesch at gmail.com>
Cc: X3D <x3d-public at web3d.org>
Subject: Re: [x3d-public] Need for colorspaceConversion field in ImageTexture, glTF compatibility

 

I have now also added the field `colorSpaceConversion` in X_ITE to the ImageTexture node, also in the same notation. Everything was already prepared for it.

 

I can't show an example yet, because everything is still in the dev branch.

 

The signature of the new field looks like this:





SFBool [] colorSpaceConversion TRUE

 

Best regards,

Holger

 

--

Holger Seelig

Leipzig, Germany

 

holger.seelig at yahoo.de <mailto:holger.seelig at yahoo.de> 

https://create3000.github.io/x_ite/





Am 21.09.2023 um 08:26 schrieb Andreas Plesch <andreasplesch at gmail.com <mailto:andreasplesch at gmail.com> >:

 

Coming back to color profiles potentially embedded in some important
image formats, I added a colorSpaceConversion field to ImageTexture in
x3dom:

https://andreasplesch.github.io/x3dom/dist/doc/author/Texturing/ImageTexture.html

It is by default true for normal X3D use and can be false for loading
glTF textures correctly:

https://andreasplesch.github.io/Library/Viewer/index.html?url=https://gist.githubusercontent.com/andreasplesch/817bc44089a7b7545149cf12acdd7c86/raw/75242ebfea03048d0f4939e1656c5063c9544d11/TextureEncodingTest.x3d

It is trivial to change the field name if there are other suggestions.

-Andreas

On Tue, Aug 29, 2023 at 1:53 PM Andreas Plesch <andreasplesch at gmail.com <mailto:andreasplesch at gmail.com> > wrote:




Following up after some work:

On Thu, Aug 24, 2023 at 11:15 PM Andreas Plesch <andreasplesch at gmail.com <mailto:andreasplesch at gmail.com> > wrote:




On Thu, Aug 24, 2023 at 9:14 AM Michalis Kamburelis
<michalis.kambi at gmail.com <mailto:michalis.kambi at gmail.com> > wrote:




1. As for colorspaceConversion:

I don't think we want to avoid adding X3D field for this :)


Well, it is worth thinking through options if it means smarter
solutions can be discovered.




I'm all after adding X3D field to account for this -- that is, say
explicitly whether ICC profile should be honored or not, so that all
cases are satisfied. I'm cool with colorspaceConversion name.

 

...snip

After some thought I do think that a new field is needed for
ImageTexture (and MovieTexture, and Background ?).
"colorspaceConversion" or "colorSpaceConversion" or perhaps something
shorter like "colorProfile"  ?

x3dom will probably use the webgl texture unpacking parameter.

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20230921/f94ec7f2/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5464 bytes
Desc: not available
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20230921/f94ec7f2/attachment-0001.p7s>


More information about the x3d-public mailing list