MantisBT - Open CASCADE
View Issue Details
0027943Open CASCADE[OCCT] OCCT:Visualizationpublic2016-10-09 16:132016-12-09 16:38
kgv 
apn 
normalminor 
closedfixed 
WindowsVC++ 201564 bit
[OCCT] 6.7.0 
[OCCT] 7.1.0[OCCT] 7.1.0 
v3d glsl gouraud_pos1, gouraud_spot1, phong_pos1, phong_spot1
0027943: Visualization - fix broken shading by positional light for object with local transformation
For some reason, the shape having local transformation applied is shaded by non-head lights in not the same way as shape with pre-applied transformation.
Test case 1:
set anX 0.001
pload MODELING VISUALIZATION
circle c 0 0 0 0.001
mkedge e c
wire   w e
plane  s
mkface f1 s w
mkface f2 s w
ttranslate f1 $anX -0.001 0
#ttranslate f2 $anX  0.001 0
vclear
vinit View1
vtop
vdisplay -dispMode 1 f1 f2
vsetlocation f2 $anX 0.001 0
vpoint vl $anX 0 0.001
vfit
vlight clear
vlight add positional pos $anX 0 0.001 color RED1
#vlight change 2 pos $anX 0 0.001 color RED1
#vrenderparams -shadingModel phong
vshaderprog phong


Test case 2:
pload MODELING VISUALIZATION
circle c 0 0 0 0.001
mkedge e c
wire   w e
plane  s
mkface f0  s w
mkface f10 s w
ttranslate f10 10 -0.001 0
vclear
vinit View1
vaxo
vdisplay -dispMode 1 f0 f10
vsetlocation f0 10 0.001 0
vfit
vrotate 1 0 0
vpoint v10 10 0 0.001
vlight add positional pos 10 0 0.001 color RED1
vlight change 2 pos 10 0 0.001 color RED1

# OK
vraytrace 1

# about OK
vcaps -ffp 1

# KO
vcaps -ffp 0

#vrenderparams -shadingModel phong
No tags attached.
related to 0027955new kgv Visualization - handle positional lights within transformation persistent objects 
child of 0024838closed bugmaster Visualization, TKOpenGl - make general rendering path compatible with OpenGL 3.1+ core profiles 
png poslight_ffp_OK.png (2,113) 2016-10-09 16:15
https://tracker.dev.opencascade.org/
png poslight_raytrace_OK.png (5,381) 2016-10-09 16:15
https://tracker.dev.opencascade.org/
png poslight_glsl_KO.png (2,427) 2016-10-09 16:15
https://tracker.dev.opencascade.org/
png poslight_phong_OK.png (13,732) 2016-10-09 19:20
https://tracker.dev.opencascade.org/
png poslight_phong_KO.png (13,416) 2016-10-09 19:20
https://tracker.dev.opencascade.org/
Issue History
2016-10-09 16:13kgvNew Issue
2016-10-09 16:13kgvAssigned To => kgv
2016-10-09 16:15kgvFile Added: poslight_ffp_OK.png
2016-10-09 16:15kgvFile Added: poslight_raytrace_OK.png
2016-10-09 16:15kgvFile Added: poslight_glsl_KO.png
2016-10-09 16:20kgvProduct Version7.0.0 => 6.7.0
2016-10-09 19:19kgvSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=14898#r14898
2016-10-09 19:20kgvFile Added: poslight_phong_OK.png
2016-10-09 19:20kgvFile Added: poslight_phong_KO.png
2016-10-09 20:45kgvSummaryVisualization - positional light is not the same for shape with local translation => Visualization - fix broken broken shading by positional light for object with local transformation
2016-10-09 20:45kgvDescription Updatedbug_revision_view_page.php?rev_id=14900#r14900
2016-10-09 20:48kgvSummaryVisualization - fix broken broken shading by positional light for object with local transformation => Visualization - fix broken shading by positional light for object with local transformation
2016-10-09 20:48gitNote Added: 0058507
2016-10-09 20:50kgvNote Added: 0058508
2016-10-09 20:50kgvAssigned Tokgv => apl
2016-10-09 20:50kgvStatusnew => resolved
2016-10-09 20:51kgvRelationship addedchild of 0024838
2016-10-10 14:11sanNote Added: 0058521
2016-10-10 14:11sanAssigned Toapl => bugmaster
2016-10-10 14:11sanStatusresolved => reviewed
2016-10-10 16:40mkvAssigned Tobugmaster => mkv
2016-10-11 13:44mkvNote Added: 0058570
2016-10-11 13:44mkvNote Added: 0058571
2016-10-11 13:44mkvAssigned Tomkv => bugmaster
2016-10-11 13:44mkvStatusreviewed => tested
2016-10-11 13:44mkvTest case number => v3d glsl gouraud_pos1, gouraud_spot1, phong_pos1, phong_spot1
2016-10-12 21:46kgvRelationship addedrelated to 0027955
2016-10-20 15:13apnChangeset attached => occt master 5f4bd4d4
2016-10-20 15:13apnAssigned Tobugmaster => apn
2016-10-20 15:13apnStatustested => verified
2016-10-20 15:13apnResolutionopen => fixed
2016-10-28 21:42gitNote Added: 0059467
2016-12-09 16:30aivStatusverified => closed
2016-12-09 16:38aivFixed in Version => 7.1.0

Notes
(0058507)
git   
2016-10-09 20:48   
Branch CR27943 has been created by kgv.

SHA-1: 0852d1c61bca8ba59727b7e74232a52adfe881cb


Detailed log of new commits:

Author: kgv
Date: Sun Oct 9 20:48:16 2016 +0300

    0027943: Visualization - fix broken shading by positional light for object with local transformation
    
    OpenGl_ShaderManager, per-vertex shading and per-fragment shading
    - do not apply model-world matrix on the light sources
    which are expected to be defined in world-space.
(0058508)
kgv   
2016-10-09 20:50   
Patch is ready for review.
(0058521)
san   
2016-10-10 14:11   
Branch CR27943 reviewed without remarks, ready for testing.
(0058570)
mkv   
2016-10-11 13:44   
Dear BugMaster,
Branch CR27943 from occt git-repository (and master from products git-repository) was compiled on Linux, MacOS and Windows platforms and tested on Release mode.
SHA-1: 0852d1c61bca8ba59727b7e74232a52adfe881cb

Number of compiler warnings:

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

products component :
Linux: 64 (64 on master)
Windows: 0 (0 on master)
MacOS : 1128

Regressions/Differences/Improvements:
No regressions/differences

Testing cases:
http://occt-tests/CR27943-master-OCCT/Debian70-64/v3d/glsl/gouraud_pos1.html [^]
http://occt-tests/CR27943-master-OCCT/Windows-64-VC10/v3d/glsl/gouraud_pos1.html [^]
v3d glsl gouraud_pos1: OK
http://occt-tests/CR27943-master-OCCT/Debian70-64/v3d/glsl/gouraud_spot1.html [^]
http://occt-tests/CR27943-master-OCCT/Windows-64-VC10/v3d/glsl/gouraud_spot1.html [^]
v3d glsl gouraud_spot1: OK
http://occt-tests/CR27943-master-OCCT/Debian70-64/v3d/glsl/phong_pos1.html [^]
http://occt-tests/CR27943-master-OCCT/Windows-64-VC10/v3d/glsl/phong_pos1.html [^]
v3d glsl phong_pos1: OK
http://occt-tests/CR27943-master-OCCT/Debian70-64/v3d/glsl/phong_spot1.html [^]
http://occt-tests/CR27943-master-OCCT/Windows-64-VC10/v3d/glsl/phong_spot1.html [^]
v3d glsl phong_spot1: OK

Testing on Linux:
occt component :
Total MEMORY difference: 91077388 / 91109095 [-0.03%]
Total CPU difference: 19419.31999999986 / 19439.81000000002 [-0.11%]
products component :
Total MEMORY difference: 30054908 / 30012726 [+0.14%]
Total CPU difference: 5222.599999999969 / 5239.289999999958 [-0.32%]

Testing on Windows:
occt component :
Total MEMORY difference: 57231102 / 57241724 [-0.02%]
Total CPU difference: 19150.495558798677 / 18173.586096598698 [+5.38%]
products component :
Total MEMORY difference: 21277716 / 21240754 [+0.17%]
Total CPU difference: 5000.2688527999435 / 5008.287304199943 [-0.16%]

There are no differences in images found by testdiff.
(0058571)
mkv   
2016-10-11 13:44   
Dear BugMaster,
Branch CR27943 is TESTED.
(0059467)
git   
2016-10-28 21:42   
Branch CR27943 has been deleted by kgv.

SHA-1: 0852d1c61bca8ba59727b7e74232a52adfe881cb