MantisBT
Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0029528Open CASCADE[OCCT] OCCT:Visualizationpublic2018-02-28 10:442019-09-19 23:35
Reporterkgv 
Assigned Tomnv 
PrioritynormalSeverityfeature 
StatusassignedResolutionopen 
PlatformOSOS Version
Product Version 
Target Version[OCCT] 7.5.0*Fixed in Version 
Summary0029528: Visualization, TKOpenGl - allow defining sRGB textures
DescriptionMost color textures are in sRGB color space, not in linear RGB color space which is used by OpenGL by default. The following changes should be done:
- Uploading color texture should be done with a flag indicating if original image is in linear RGB (GL_RGB8/GL_RGBA8) or non-linear sRGB color space (GL_SRGB8/GL_SRGB8_ALPHA8). Most 24/32-bit images are in sRGB in fact, but the choice should be done at application side. This will allow avoiding color distortion while using 24/32-bit textures.
- 24/32-bit RGB off-screen frame buffers should be creating with sRGB textures, when supported by platform. sRGB off-screen frame buffer would allow preserving more image quality (as perceived by human eye).
- GL_FRAMEBUFFER_SRGB should be enabled for proper color encoding (automatic RGB->sRGB conversion while writing values into sRGB FBO) and alpha blending operation (proper alpha blending should be done in linear RGB color space, not in sRGB).
TagsNo tags attached.
Test case number
Attached Files

- Relationships
related to 0024855closedapn Open CASCADE Revision of parameters of standard materials 
related to 0030700assignediko Open CASCADE Visualization, TKOpenGl - support PBR Metallic-Roughness shading model 
related to 0030930verifiedapn Open CASCADE Draw Harness, ViewerTest - add commands vlistcolors and vlistmaterials listing standard Colors and Materials 
related to 0030969newkgv Open CASCADE Coding Rules - refactor Quantity_Color.cxx color table definition 

-  Notes
(0086541)
git (administrator)
2019-08-29 22:42

Branch CR29528 has been created by kgv.

SHA-1: 0c6aed594fa53aff5a02dac7cb4294b846133ed3


Detailed log of new commits:

Author: kgv
Date: Thu Aug 29 11:04:56 2019 +0300

    0029528: Visualization, TKOpenGl - allow defining sRGB textures

Author: kgv
Date: Wed Aug 21 16:17:29 2019 +0300

    Introduced new attribute XCAFDoc_VisMaterial storing visualization material definition.

Author: kgv
Date: Wed Jul 3 11:28:26 2019 +0300

    0029902: Data Exchange, XCAF - provide extended Material definition for visualization purposes
(0086542)
git (administrator)
2019-08-30 01:20

Branch CR29528 has been updated forcibly by kgv.

SHA-1: c0b633b6b59c3a31203d9043323266888fe97d69
(0086559)
git (administrator)
2019-08-30 19:59

Branch CR29528 has been updated forcibly by kgv.

SHA-1: fb07e2e5cb271e173a30201e8ef0ef0d4f9e6155
(0086624)
git (administrator)
2019-09-02 17:26

Branch CR29528 has been updated forcibly by kgv.

SHA-1: 26d1a9cf4dc7e264c7bb4bf8d9f5508d6085dfb7
(0086674)
git (administrator)
2019-09-03 00:06

Branch CR29528_1 has been created by kgv.

SHA-1: 07a44c5fa792be51f30c1860e5cbf6bc7316a305


Detailed log of new commits:

Author: kgv
Date: Thu Aug 29 11:04:56 2019 +0300

    0029528: Visualization, TKOpenGl - allow defining sRGB textures
    
    Quantity_Color::Convert_sRGB_FromLinear(), Quantity_Color::Convert_sRGB_ToLinear()
    added auxiliary methods performing linearization / delinearization of sRGB values (gamma shift).
    
    Image_PixMap::PixelColor() and Image_PixMap::SetPixelColor() methods have been extended
    with an optional argument for performing linearization/delinearization of 8-bit sRGB pixel formats.
    
    OpenGl_TextureFormat class definition has been moved to dedicated files.
    New method OpenGl_TextureFormat::FindFormat() replaces OpenGl_Texture::GetDataFormat().
    New method OpenGl_TextureFormat::FindSizedFormat() replaces OpenGl_FrameBuffer::getColorDataFormat()
    and OpenGl_FrameBuffer::getDepthDataFormat().
    
    Graphic3d_TextureRoot::IsColorMap() - introduced new property defining
    if RGB(A)8 image formats should be loaded as sRGB(A) textures or as data RGB(A) textures.
    OpenGl_Texture initialization methods have been extended with new theIsColorMap argument.
(0086704)
git (administrator)
2019-09-03 18:14

Branch CR29528_2 has been created by kgv.

SHA-1: 3ef6c0f2fdcb92ce3850a31c4e419249598cbd3d


Detailed log of new commits:

Author: kgv
Date: Thu Aug 29 11:04:56 2019 +0300

    0029528: Visualization, TKOpenGl - allow defining sRGB textures
    
    Quantity_Color::Convert_sRGB_FromLinear(), Quantity_Color::Convert_sRGB_ToLinear()
    added auxiliary methods performing linearization / delinearization of sRGB values (gamma shift).
    
    Image_PixMap::PixelColor() and Image_PixMap::SetPixelColor() methods have been extended
    with an optional argument for performing linearization/delinearization of 8-bit sRGB pixel formats.
    
    OpenGl_TextureFormat class definition has been moved to dedicated files.
    New method OpenGl_TextureFormat::FindFormat() replaces OpenGl_Texture::GetDataFormat().
    New method OpenGl_TextureFormat::FindSizedFormat() replaces OpenGl_FrameBuffer::getColorDataFormat()
    and OpenGl_FrameBuffer::getDepthDataFormat().
    
    Graphic3d_TextureRoot::IsColorMap() - introduced new property defining
    if RGB(A)8 image formats should be loaded as sRGB(A) textures or as data RGB(A) textures.
    OpenGl_Texture initialization methods have been extended with new theIsColorMap argument.
(0087224)
git (administrator)
2019-09-17 20:46

Branch CR29528_nosrgb has been created by kgv.

SHA-1: 2b48f6c8e41b2da386392b5a0d16e4faa116b12c


Detailed log of new commits:

Author: kgv
Date: Tue Sep 17 20:43:15 2019 +0300

    Disable sRGB
(0087230)
git (administrator)
2019-09-18 01:48

Branch CR29528_nosrgb has been updated forcibly by kgv.

SHA-1: 5b0911c8445ebe96faa5a44b896ece9c6e7bd5fb

- Issue History
Date Modified Username Field Change
2018-02-28 10:44 kgv New Issue
2018-02-28 10:44 kgv Assigned To => kgv
2018-10-01 07:44 kgv Assigned To kgv => mnv
2018-10-01 07:44 kgv Status new => assigned
2018-10-01 07:57 kgv Relationship added related to 0030181
2019-05-07 14:24 kgv Relationship added related to 0030700
2019-08-13 12:04 kgv Target Version 7.4.0 => 7.5.0*
2019-08-29 22:24 kgv Relationship added related to 0024855
2019-08-29 22:42 git Note Added: 0086541
2019-08-30 01:20 git Note Added: 0086542
2019-08-30 19:53 kgv Relationship added related to 0030930
2019-08-30 19:59 git Note Added: 0086559
2019-09-02 17:26 git Note Added: 0086624
2019-09-03 00:06 git Note Added: 0086674
2019-09-03 18:14 git Note Added: 0086704
2019-09-16 18:33 kgv Relationship added related to 0030969
2019-09-17 20:46 git Note Added: 0087224
2019-09-18 01:48 git Note Added: 0087230


Copyright © 2000 - 2019 MantisBT Team
Powered by Mantis Bugtracker