MantisBT
Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Related Changesets ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0027943Open CASCADE[OCCT] OCCT:Visualizationpublic2016-10-09 16:132016-12-09 16:38
Reporterkgv 
Assigned Toapn 
PrioritynormalSeverityminor 
StatusclosedResolutionfixed 
PlatformWindowsOSVC++ 2015OS Version64 bit
Product Version[OCCT] 6.7.0 
Target Version[OCCT] 7.1.0Fixed in Version[OCCT] 7.1.0 
Summary0027943: Visualization - fix broken shading by positional light for object with local transformation
DescriptionFor 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.
Steps To ReproduceTest 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
TagsNo tags attached.
Test case numberv3d glsl gouraud_pos1, gouraud_spot1, phong_pos1, phong_spot1
Attached Filespng file icon poslight_ffp_OK.png (2,113 bytes) 2016-10-09 16:15
png file icon poslight_raytrace_OK.png (5,381 bytes) 2016-10-09 16:15
png file icon poslight_glsl_KO.png (2,427 bytes) 2016-10-09 16:15
png file icon poslight_phong_OK.png (13,732 bytes) 2016-10-09 19:20
png file icon poslight_phong_KO.png (13,416 bytes) 2016-10-09 19:20

- Relationships
related to 0027955newkgv Visualization - handle positional lights within transformation persistent objects 
child of 0024838newkgv Visualization, TKOpenGl - make general rendering path compatible with OpenGL 3.1+ core profiles 

-  Notes
(0058507)
git (administrator)
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 (developer)
2016-10-09 20:50

Patch is ready for review.
(0058521)
san (developer)
2016-10-10 14:11

Branch CR27943 reviewed without remarks, ready for testing.
(0058570)
mkv (tester)
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 (tester)
2016-10-11 13:44

Dear BugMaster,
Branch CR27943 is TESTED.
(0059467)
git (administrator)
2016-10-28 21:42

Branch CR27943 has been deleted by kgv.

SHA-1: 0852d1c61bca8ba59727b7e74232a52adfe881cb

- Related Changesets
occt: master 5f4bd4d4
Timestamp: 2016-10-09 17:48:16
Author: kgv
Committer: apn
Details ] Diff ]
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.
mod - src/OpenGl/OpenGl_ShaderManager.cxx Diff ] File ]
mod - src/Shaders/PhongShading.fs Diff ] File ]
add - tests/v3d/glsl/gouraud_pos1 Diff ] File ]
add - tests/v3d/glsl/gouraud_spot1 Diff ] File ]
add - tests/v3d/glsl/phong_pos1 Diff ] File ]
add - tests/v3d/glsl/phong_spot1 Diff ] File ]

- Issue History
Date Modified Username Field Change
2016-10-09 16:13 kgv New Issue
2016-10-09 16:13 kgv Assigned To => kgv
2016-10-09 16:15 kgv File Added: poslight_ffp_OK.png
2016-10-09 16:15 kgv File Added: poslight_raytrace_OK.png
2016-10-09 16:15 kgv File Added: poslight_glsl_KO.png
2016-10-09 16:20 kgv Product Version 7.0.0 => 6.7.0
2016-10-09 19:19 kgv Steps to Reproduce Updated View Revisions
2016-10-09 19:20 kgv File Added: poslight_phong_OK.png
2016-10-09 19:20 kgv File Added: poslight_phong_KO.png
2016-10-09 20:45 kgv Summary Visualization - 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:45 kgv Description Updated View Revisions
2016-10-09 20:48 kgv Summary Visualization - 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:48 git Note Added: 0058507
2016-10-09 20:50 kgv Note Added: 0058508
2016-10-09 20:50 kgv Assigned To kgv => apl
2016-10-09 20:50 kgv Status new => resolved
2016-10-09 20:51 kgv Relationship added child of 0024838
2016-10-10 14:11 san Note Added: 0058521
2016-10-10 14:11 san Assigned To apl => bugmaster
2016-10-10 14:11 san Status resolved => reviewed
2016-10-10 16:40 mkv Assigned To bugmaster => mkv
2016-10-11 13:44 mkv Note Added: 0058570
2016-10-11 13:44 mkv Note Added: 0058571
2016-10-11 13:44 mkv Assigned To mkv => bugmaster
2016-10-11 13:44 mkv Status reviewed => tested
2016-10-11 13:44 mkv Test case number => v3d glsl gouraud_pos1, gouraud_spot1, phong_pos1, phong_spot1
2016-10-12 21:46 kgv Relationship added related to 0027955
2016-10-20 15:13 apn Changeset attached => occt master 5f4bd4d4
2016-10-20 15:13 apn Assigned To bugmaster => apn
2016-10-20 15:13 apn Status tested => verified
2016-10-20 15:13 apn Resolution open => fixed
2016-10-28 21:42 git Note Added: 0059467
2016-12-09 16:30 user533 Status verified => closed
2016-12-09 16:38 user533 Fixed in Version => 7.1.0


Copyright © 2000 - 2018 MantisBT Team
Powered by Mantis Bugtracker