View Issue Details

IDProjectCategoryView StatusLast Update
0003038Open CASCADEOCCT:Visualizationpublic2014-09-29 17:45
ReporterrlnAssigned Todbp 
PrioritynormalSeveritytrivial 
Status closedResolutionno change required 
OSAll 
Target Version6.8.0 
Summary0003038: Blue component of RGB ambient light seems to be ignored.
DescriptionIf 3D view has an active ambient light, its blue component seems to be ignored
(i.e. setting it to any value from 0 to 1 with the same R & G components makes
no difference). This is especially obvious when 3D view has only ambient and no
other lights.

To reproduce the bug use the following:
1. Take Texture samples (MFC on Windows)
2. Replace view initialization as follows:
COCCDemoDoc::COCCDemoDoc()
{
    // TODO: add one-time construction code here
    Handle(Graphic3d_WNTGraphicDevice) theGraphicDevice =
        ((COCCDemoApp*)AfxGetApp())->GetGraphicDevice();

    myViewer = new V3d_Viewer(theGraphicDevice,(short *) "Visu3D");
        //This sets WHITE ambient and WHITE directional along Zneg
    //myViewer->SetDefaultLights();
        //we will set just ambient
        Standard_Real aBlue = 1.;//or any other 0-1
        myViewer->SetLightOn ( new V3d_AmbientLight(myViewer,
Quanity_Color::Name (1, 1, aBlue)));
    myViewer->SetLightOn();
3. Variating aBlue makes no difference - the light is always yellow ({1, 1, 0})


Note: Today when using myViewer->SetDefaultLights() this bug is also obvious
when rotating textured (and maybe shaded ?) shapes. For instance, compare
original image used for wallpapers (wallpaper.gif) with its mapping on wall when
looking at different angles (See attachment).
TagsNo tags attached.
Test case number

Attached Files

  • snapshoots.zip (222,970 bytes)

Relationships

related to 0024930 closedbugmaster Visualization - SetMaterial/UnsetMaterial/UnsetColor are not implemented for AIS_TexturedShape 
related to 0023804 closedbugmaster Unexpected color modulation during texture mapping 
related to 0024855 closedapn Revision of parameters of standard materials 

Activities

2003-06-24 08:27

 

snapshoots.zip (222,970 bytes)

dbp

2014-09-29 15:41

developer   ~0032306

Dear bugmaster,

please close this issus. It is not a bug. The solution was added as the note to this issue.

dbp

2014-09-29 15:49

developer   ~0032307

Actually this behavior is not a bug. By default OCCT assigns 'brass' material to displayed object which have no blue color component, and thus changing blue channel of light color has no effect.

The problem was caused by the inability of changing the material of AIS_TexturedShape. Issue 0024930 solves this problem. It allows to assing another material/color to such shapes. For example, 'silver' material changes visual appearence after changing light source color.

Issue History

Date Modified Username Field Change
2003-06-25 08:37 bugmaster Assigned To bugmaster => vtn
2003-06-25 08:37 bugmaster Status new => assigned
2003-09-18 17:12 bugmaster Assigned To vtn => enk
2005-01-13 09:14 bugmaster Assigned To enk => san
2011-08-02 11:24 bugmaster Category OCCT:VIZ => OCCT:Visualization
2013-02-27 20:35 san Relationship added related to 0023804
2013-02-27 20:36 san Fixed in Version EMPTY =>
2013-02-27 20:36 san Target Version => 6.7.0
2013-02-27 20:36 san Description Updated
2013-02-28 18:04 bugmaster Status assigned => closed
2013-02-28 18:04 bugmaster Resolution open => no change required
2013-02-28 18:27 bugmaster Status closed => assigned
2013-12-12 11:00 san Target Version 6.7.0 => 6.7.1
2014-04-04 18:16 abv Target Version 6.7.1 => 6.8.0
2014-04-17 14:45 san Relationship added related to 0024855
2014-04-22 18:56 san Assigned To san => dbp
2014-09-29 15:39 dbp Relationship added related to 0024930
2014-09-29 15:41 dbp Note Added: 0032306
2014-09-29 15:41 dbp Assigned To dbp => bugmaster
2014-09-29 15:41 dbp Status assigned => resolved
2014-09-29 15:49 dbp Note Added: 0032307
2014-09-29 17:45 bugmaster Status resolved => closed
2014-09-29 17:45 bugmaster Assigned To bugmaster => dbp