View Issue Details

IDProjectCategoryView StatusLast Update
0024855Open CASCADEOCCT:Visualizationpublic2019-08-29 22:24
ReportersanAssigned Toapn  
PrioritynormalSeverityminor 
Status closedResolutionfixed 
Product Version6.7.0 
Target Version6.8.0Fixed in Version6.8.0 
Summary0024855: Revision of parameters of standard materials
DescriptionIt is necessary to revise the parameters of all standard OCCT materials (Graphic3d_MaterialAspect class) corresponding to Graphic3d_NameOfMaterial enumeration items, making them closer to those of corresponding physical material if necessary.

Additionally, the following aspects of behavior of materials should be checked and corrected:

  • Effect of calling AIS_Shape::SetColor(), Prs3d_ShadingAspect::SetColor(), Graphic3d_AspectFillArea3d::SetInteriorColor() and Graphic3d_MaterialAspect::SetColor() for the standard and user-defined materials.

  • Combining textures (using AIS_TexturedShape) with standard materials (see issue 0023804).

Additional information
and documentation updates
The main goal of the patch is the 'normalization' of OCCT material parameters to improve consistency and visual appearance in various rendering modes (including ray-tracing).

1) For metallic surfaces (brass, bronze, copper, gold, pewter, silver, steel, chrome, aluminum) the specular exponents (shininesses) were significantly increased. For some metals (copper, gold, aluminum, silver) specular colors were reviewed according to [“Real-Time Rendering, 3rd Edition”, AK Peters 2008] – see http://interplayoflight.files.wordpress.com/2013/12/fresnelcolours.png. Also the diffuse reflection of some metals (silver, aluminum, chrome) was increased to make them brighter (in OpenGL mode they looked too dark).

2) Material was supplemented by a new parameter – refraction index. Thus, advanced rendering methods based on shaders or ray-tracing can utilize it to produce refraction effects. Three new transparent materials were added: ‘Water’, ‘Glass’, and ‘Diamond’. Also ‘Charcoal’ material was implemented for modeling dark diffuse surfaces.

3) New TCL-based sample (‘materials.tcl’) and test case (‘tests/v3d/materials/bug24855’) were implemented.
TagsNo tags attached.
Test case numberv3d materials(015) bug24855

Attached Files

  • PreviousMaterials.zip (696,390 bytes)
  • NewMaterials.zip (689,585 bytes)
  • mat671.png (93,886 bytes)
  • mat680.png (86,305 bytes)
  • mat671phong.png (89,829 bytes)
  • mat680phong.png (80,712 bytes)
  • mat671rt.png (100,300 bytes)

Relationships

related to 0023804 closedbugmaster Open CASCADE Unexpected color modulation during texture mapping 
related to 0003038 closeddbp Open CASCADE Blue component of RGB ambient light seems to be ignored. 
related to 0002883 closedapn Open CASCADE It is impossible to set material, color and transparency to compound 
related to 0023387 closedbugmaster Community Visualization - transparency of specified material is ignored within AIS_Shape::SetMaterial() 
related to 0024864 closedapn Open CASCADE Visualization - Implementing refractions in ray-tracing 
related to 0024872 closedbugmaster Open CASCADE Support of emission color in Phong shader and ray-tracing 
related to 0025349 closedbugmaster Open CASCADE Graphic3d_MaterialAspect::Color() returns a value different from that set by the method Graphic3d_MaterialAspect::SetColor 
related to 0029528 closedapn Open CASCADE Visualization, TKOpenGl - allow defining sRGB textures 

Activities

dbp

2014-04-22 10:27

developer   ~0029003

Dear kgv,

please check updated material properties in branch CR24855_1.

Some specular colors were corrected according to table: http://interplayoflight.files.wordpress.com/2013/12/fresnelcolours.png.

Also diffuse colors for some metals (aluminium, silver, chrome) were increased.

kgv

2014-04-22 10:34

developer   ~0029006

Dear dbp,

please create test cases to make snapshots of every material in illustrative situations (model + lights).

abv

2014-04-22 10:50

manager   ~0029007

I deem it is worth adding a sample, say samples/tcl/materials.tcl, displaying a set of objects (e.g. box + sphere) with different materials assigned. Perhaps also setting different colors can be demonstrated.

dbp

2014-04-22 13:07

developer   ~0029010

Last edited: 2014-04-22 13:10

Dear kgv,

new test was implemented. Please review in branch CR24855_2.

Check PreviousMaterials.zip and NewMaterials.zip for comparison.

dbp

2014-04-22 13:09

developer  

PreviousMaterials.zip (696,390 bytes)

dbp

2014-04-22 13:10

developer  

NewMaterials.zip (689,585 bytes)

kgv

2014-04-25 11:55

developer  

mat671.png (93,886 bytes)

kgv

2014-04-25 11:55

developer  

mat680.png (86,305 bytes)

kgv

2014-04-25 11:56

developer  

mat671phong.png (89,829 bytes)

kgv

2014-04-25 11:56

developer  

mat680phong.png (80,712 bytes)

kgv

2014-04-25 11:56

developer  

mat671rt.png (100,300 bytes)

kgv

2014-04-25 15:20

developer   ~0029078

Remarks have been pushed into branch.

Please consider adding one more material "charcoal" (remark from abv).

Please also provide more complete description to the bug - changed materials and new materials. Squash patch into single commit (in dedicated branch) with updated description before resolving.

dbp

2014-04-30 12:36

developer   ~0029161

Dear kgv,

please check squashed version of the patch in branch CR24855_3.

kgv

2014-04-30 13:08

developer   ~0029162

>> Please also provide more complete description to the bug
>> - changed materials and new materials.
>> Squash patch into single commit (in dedicated branch)
>> with updated description before resolving.
the description of the patch in branch CR24855_3 is still incomplete.

-  {"Diamond",          Graphic3d_MATERIAL_PHYSIC}
+  {"Diamond",          Graphic3d_MATERIAL_PHYSIC},
+  {"Charcoal",         Graphic3d_MATERIAL_PHYSIC}

Though not important, it looks more natural to move Charcoal before translucent materials.

dbp

2014-04-30 14:30

developer   ~0029166

Dear kgv,
please check the patch in branch CR24855_3.

kgv

2014-04-30 15:15

developer   ~0029167

Patch is ready for testing in branch CR24855_4 (with corrected commit description).

mkv

2014-05-07 16:31

tester   ~0029231

Dear BugMaster,

Branch CR24855_4 (and products from GIT master) was compiled on Linux and Windows platforms and tested.
SHA-1: eb0d5e84695c3929db5f26702a92bfedcce3819f

Number of compiler warnings:

occt component :
Linux: 18 (18 on master)
Windows: 0 (0 on master)

products component :
Linux: 12 (12 on master)
Windows: 2 (2 on master)

Regressions/Differences:
http://occt-tests/CR24855-4-master-occt/Debian60-64/summary.html
http://occt-tests/CR24855-4-master-occt/Windows-32-VC9/summary.html
bugs demo(001) bug23410
bugs vis(004) bug5990, bug22879, bug22912, bug24762_coloredshape

Testing cases:
http://occt-tests/CR24855-4-master-occt/Debian60-64/v3d/materials/bug24855.html
v3d materials(015) bug24855: OK

Testing on Linux:
Total MEMORY difference: 355427872 / 355325980
Total CPU difference: 49749.300000000105 / 53335.479999999814

Testing on Windows:
Total MEMORY difference: 379335332 / 379633952
Total CPU difference: 33247.3125 / 36613.65625

There are no differences in images found by testdiff.

kgv

2014-05-08 09:31

developer   ~0029245

Dear dbp,

please update changed test cases.

dbp

2014-05-12 14:35

developer   ~0029275

Dear kgv,

please review updated test cases in branch CR24855_4.

kgv

2014-05-12 14:40

developer   ~0029277

Please test updated patch.

duv

2014-05-14 11:47

developer   ~0029313

Dear bugmaster,

please test branch CR24855_5 instead of CR24855_4. It has additional changes.

apn

2014-05-15 19:56

administrator   ~0029359

Dear BugMaster,

Branch CR24855_5 (and products from GIT master) was compiled on Linux, Windows and MacOS platforms and tested.
SHA-1: e8f0bca4c92a56d2187656e943ae0e3949a14318

Number of compiler warnings:

occt component :
Linux: 17 (17 on master)
Windows: 0 (0 on master)
MacOS: 205 (212 on master)

products component :
Linux: 11 (11 on master)
Windows: 2 (2 on master)

Regressions/Differences:
No regressions

Testing cases:
v3d materials bug24855 - OK
http://occt-tests/CR24855-5-master-occt/Debian60-64/v3d/materials/bug24855.html
http://occt-tests/CR24855-5-master-occt/Windows-32-VC9/v3d/materials/bug24855.html

Testing on Linux:
Total MEMORY difference: 354348028 / 355091124
Total CPU difference: 68009.84999999971 / 51217.75999999977

Testing on Windows:
Total MEMORY difference: 379156372 / 379559452
Total CPU difference: 45878.6875 / 35549.9375

There are no differences in images found by testdiff.

Related Changesets

occt: master 44c7c33e

2014-04-30 11:14:17

dbp


Committer: apn Details Diff
0024855: Revision of parameters of standard materials

Improve consistency and visual appearance of predefined OCCT materials in various rendering modes, including ray-tracing:
- Increase the specular exponents (shininesses) for metallic surfaces: Brass, Bronze, Copper, Gold, Pewter, Silver, Steel, Chrome, Aluminum.
- Revise specular colors for metals: Copper, Gold, Aluminum, Silver (according to "Real-Time Rendering, 3rd Edition", AK Peters 2008).
- Increase diffuse reflection of metals: Silver, Aluminum, Chrome (to make them brighter in OpenGL mode).
- Extend Material definition by Refraction Index.
Advanced rendering methods based on shaders or ray-tracing can utilize it to produce refraction effects.

In addition:
- Introduce three translucent materials: Water, Glass, and Diamond.
- Add Charcoal for modeling dark diffuse surfaces.

Add new TCL-based sample (materials.tcl) and test case (tests/v3d/materials/bug24855).
Affected Issues
0024855
add - samples/tcl/materials.tcl Diff File
mod - src/Graphic3d/Graphic3d.cdl Diff File
mod - src/Graphic3d/Graphic3d_MaterialAspect.cdl Diff File
mod - src/Graphic3d/Graphic3d_MaterialAspect.cxx Diff File
mod - src/Graphic3d/Graphic3d_Structure.cxx Diff File
mod - src/InterfaceGraphic/InterfaceGraphic_Graphic3d.hxx Diff File
mod - src/OpenGl/OpenGl_AspectFace.cxx Diff File
mod - src/OpenGl/OpenGl_AspectFace.hxx Diff File
mod - tests/bugs/demo/bug23410 Diff File
mod - tests/bugs/vis/bug22879 Diff File
mod - tests/bugs/vis/bug22912 Diff File
mod - tests/bugs/vis/bug24762_coloredshape Diff File
mod - tests/bugs/vis/bug5990 Diff File
mod - tests/v3d/grids.list Diff File
add - tests/v3d/materials/bug24855 Diff File

Issue History

Date Modified Username Field Change
2014-04-17 14:43 san New Issue
2014-04-17 14:43 san Assigned To => dbp
2014-04-17 14:44 san Relationship added related to 0023804
2014-04-17 14:45 san Relationship added related to 0003038
2014-04-17 14:45 san Relationship added related to 0002883
2014-04-22 10:27 dbp Note Added: 0029003
2014-04-22 10:27 dbp Assigned To dbp => kgv
2014-04-22 10:27 dbp Status new => feedback
2014-04-22 10:34 kgv Note Added: 0029006
2014-04-22 10:34 kgv Assigned To kgv => dbp
2014-04-22 10:34 kgv Status feedback => assigned
2014-04-22 10:50 abv Note Added: 0029007
2014-04-22 13:07 dbp Note Added: 0029010
2014-04-22 13:07 dbp Assigned To dbp => kgv
2014-04-22 13:07 dbp Status assigned => feedback
2014-04-22 13:09 dbp File Added: PreviousMaterials.zip
2014-04-22 13:10 dbp File Added: NewMaterials.zip
2014-04-22 13:10 dbp Note Edited: 0029010
2014-04-25 11:55 kgv File Added: mat671.png
2014-04-25 11:55 kgv File Added: mat680.png
2014-04-25 11:56 kgv File Added: mat671phong.png
2014-04-25 11:56 kgv File Added: mat680phong.png
2014-04-25 11:56 kgv File Added: mat671rt.png
2014-04-25 14:23 kgv Relationship added related to 0023387
2014-04-25 15:04 san Relationship added related to 0024864
2014-04-25 15:20 kgv Note Added: 0029078
2014-04-25 15:20 kgv Assigned To kgv => dbp
2014-04-25 15:20 kgv Status feedback => assigned
2014-04-30 12:36 dbp Note Added: 0029161
2014-04-30 12:36 dbp Assigned To dbp => kgv
2014-04-30 12:36 dbp Status assigned => resolved
2014-04-30 13:04 dbp Additional Information Updated
2014-04-30 13:08 kgv Note Added: 0029162
2014-04-30 13:08 kgv Assigned To kgv => dbp
2014-04-30 13:08 kgv Status resolved => assigned
2014-04-30 14:30 dbp Note Added: 0029166
2014-04-30 14:30 dbp Assigned To dbp => kgv
2014-04-30 14:30 dbp Status assigned => resolved
2014-04-30 15:15 kgv Note Added: 0029167
2014-04-30 15:15 kgv Assigned To kgv => bugmaster
2014-04-30 15:15 kgv Status resolved => reviewed
2014-04-30 16:41 mkv Assigned To bugmaster => mkv
2014-05-07 16:31 mkv Note Added: 0029231
2014-05-07 16:31 mkv Test case number => v3d materials(015) bug24855
2014-05-07 16:31 mkv Assigned To mkv => kgv
2014-05-07 16:31 mkv Status reviewed => assigned
2014-05-08 09:31 kgv Note Added: 0029245
2014-05-08 09:31 kgv Assigned To kgv => dbp
2014-05-12 14:35 dbp Note Added: 0029275
2014-05-12 14:35 dbp Assigned To dbp => kgv
2014-05-12 14:35 dbp Status assigned => resolved
2014-05-12 14:40 kgv Note Added: 0029277
2014-05-12 14:40 kgv Assigned To kgv => bugmaster
2014-05-12 14:40 kgv Status resolved => reviewed
2014-05-14 11:01 apn Assigned To bugmaster => apn
2014-05-14 11:47 duv Note Added: 0029313
2014-05-15 19:56 apn Note Added: 0029359
2014-05-15 19:56 apn Assigned To apn => bugmaster
2014-05-15 19:56 apn Status reviewed => tested
2014-05-16 14:44 apn Changeset attached => occt master 44c7c33e
2014-05-16 14:44 apn Assigned To bugmaster => apn
2014-05-16 14:44 apn Status tested => verified
2014-05-16 14:44 apn Resolution open => fixed
2014-07-15 12:14 kgv Relationship added related to 0024872
2014-10-10 12:14 dbv Relationship added related to 0025349
2014-11-11 12:44 aiv Fixed in Version => 6.8.0
2014-11-11 12:59 aiv Status verified => closed
2019-08-29 22:24 kgv Relationship added related to 0029528