MantisBT
Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Related Changesets ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0025833Open CASCADE[OCCT] OCCT:Visualizationpublic2015-02-14 15:172015-05-14 15:31
Reportersan 
Assigned Tobugmaster 
PrioritynormalSeverityminor 
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version 
Target Version[OCCT] 6.9.0Fixed in Version[OCCT] 6.9.0 
Summary0025833: Visualization, Ray Tracing - fix problems with the backside of triangles
DescriptionThe current implementation of reflections in ray tracing mode has some limitations or bugs, which become annoying when you are working with a CAD model (you have to flip orientation of some CAD parts manually in order to obtain correct visual result):

  1. The view background shows through the face if you look at it from its backside - this seems to be a general problem in ray tracing mode not related to reflections, compare the presentations of the faces visible from the backside and from the frontside (see raytrace_backface_transp.png attached)

  2. If you look to some object which is behind a completely opaque face from the backside of this face, you see the object as if the face were transparent (see bad_reflection.png attached).

  3. If the object is on the backside of a face, it is not reflected, even if you expect reflection to appear (see bad_reflection1.png).


It is necessary to analyze if correction of these problems might have significant negative impact on performance.

Then, correct calculation of reflections on the backside of triangles can become an option, similar e.g. to backface culling.

Is it possible to enable/disable this new option automatically using the same logic that controls automatic backface culling now?
Steps To Reproduce
pload ALL
box b1 100 100 100
explode b1 Fa
box b2 10 10 -20 10 10 10

vinit
vsetdispmode 1
vdisplay b1_5 b1_6 b2
vsetmaterial b1_5 steel
vsetmaterial b1_6 steel
vfit

# Problem 1: b1_5 (grey) becomes semi-transparent after the next line,
# compare it with b1_6 visible from the frontside
vrenderparams -rayTrace
# Problem 2: The small box shows through b1_5
vrenderparams -reflections

ttranslate b2 30 30 30
# Problem 3: The small box is not reflected from the backface of b1_5
vdisplay b2

TagsNo tags attached.
Test case numberv3d raytrace(014) bug25833
Attached Filespng file icon bad_reflection.png (3,588 bytes) 2015-02-14 15:56
png file icon bad_reflection1.png (3,566 bytes) 2015-02-14 15:56
png file icon raytrace_backface_transp.png (3,463 bytes) 2015-02-14 15:56

- Relationships

-  Notes
(0038414)
git (administrator)
2015-03-17 11:36

Branch CR25833 has been created by dbp.

SHA-1: 887b28176edd35fa33bf4cdeac03d087821fe747


Detailed log of new commits:

Author: dbp
Date: Tue Mar 17 11:34:49 2015 +0300

    0025833: Visualization, ray tracing - Problems with the backside of triangles
    
    Backside triangles are handled correctly by implementing two-sided lighting model. Ray-tracing shader was optimized (up to 25% performance increase).
(0038415)
dbp (developer)
2015-03-17 11:37

Dear duv,

please review the path in branch CR25833.
(0038779)
duv (developer)
2015-03-23 10:36

Dear bugmaster,

Please test the patch.
(0038794)
git (administrator)
2015-03-23 16:40

Branch CR25833 has been updated forcibly by mkv.

SHA-1: a7b3d339d6ab1b8f58dae20c397bd24e70a43990
(0038840)
mkv (tester)
2015-03-24 16:43

Dear BugMaster,
Branch CR25833 was rebased on current master of occt git-repository.
(0038841)
mkv (tester)
2015-03-24 16:43

Dear BugMaster,
Branch CR25833 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: a7b3d339d6ab1b8f58dae20c397bd24e70a43990

Number of compiler warnings:

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

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

Regressions/Differences:
No regressions/differences

Testing cases:
http://occt-tests/CR25833-master-occt-64/Debian60-64/v3d/raytrace/bug25833.html [^]
http://occt-tests/CR25833-master-occt-64/Windows-64-VC10/v3d/raytrace/bug25833.html [^]
v3d raytrace(014) bug25833: OK

Testing on Linux:
occt component :
Total MEMORY difference: 88566818 / 88565750 [+0.00%]
Total CPU difference: 53617.280000000144 / 53186.30000000024 [+0.81%]
products component :
Total MEMORY difference: 23082169 / 23198252 [-0.50%]
Total CPU difference: 15150.829999999985 / 16301.109999999973 [-7.06%]

Testing on Windows:
occt component :
Total MEMORY difference: 57427653 / 56676403 [+1.33%]
Total CPU difference: 45926.296875 / 15129.694584599707 [+203.55%]
products component :
Total MEMORY difference: 15078095 / 15023928 [+0.36%]
Total CPU difference: 15893.171875 / 5841.473045099963 [+172.07%]

There are following differences in images found by testdiff.
http://occt-tests/CR25833-master-occt-64/Debian60-64/diff-Debian60-64.html [^]
http://occt-tests/CR25833-master-occt-64/Windows-64-VC10/diff-Windows-64-VC10.html [^]
IMAGE v3d raytrace bug24819: bug24819.png differs
IMAGE v3d raytrace bug24819: bug24819_1.png differs
IMAGE v3d raytrace bug24819: bug24819_4.png differs
IMAGE v3d raytrace bug24819: bug24819_3.png differs
IMAGE v3d raytrace bug24819: bug24819_7.png differs
IMAGE v3d raytrace bug24819: bug24819_6.png differs
IMAGE v3d raytrace bug24819: bug24819_2.png differs
IMAGE v3d raytrace bug24819: bug24819_0.png differs
IMAGE v3d raytrace bug24819: bug24819_5.png differs
IMAGE v3d raytrace refraction: refraction.png differs
IMAGE v3d raytrace bug24130: bug24130.png differs
IMAGE v3d raytrace bug24130: bug24130_18.png differs
IMAGE v3d raytrace bug24130: bug24130_12.png differs
IMAGE v3d raytrace bug24130: bug24130_17.png differs
IMAGE v3d raytrace bug24130: bug24130_14.png differs
IMAGE v3d raytrace bug24130: bug24130_19.png differs
IMAGE v3d raytrace bug24130: bug24130_13.png differs
IMAGE v3d raytrace bug24130: bug24130_16.png differs
IMAGE v3d raytrace bug24130: bug24130_15.png differs
IMAGE demo samples raytrace: raytrace.png differs
(0038842)
git (administrator)
2015-03-24 16:44

Branch CR25833 has been updated by mkv.

SHA-1: 2802ac831114adf6e26cbe35fdfd5776ec7b2f87


Detailed log of new commits:

Author: mkv
Date: Tue Mar 24 16:42:56 2015 +0300

    Test case for CR25833

(0038843)
mkv (tester)
2015-03-24 16:45

Dear dbp,
could you please review test case
v3d raytrace(014) bug25833: OK
(0038849)
dbp (developer)
2015-03-24 17:25

Dear mkv,

All the following changes are OK:

IMAGE v3d raytrace bug24819: bug24819.png differs
IMAGE v3d raytrace bug24819: bug24819_1.png differs
IMAGE v3d raytrace bug24819: bug24819_4.png differs
IMAGE v3d raytrace bug24819: bug24819_3.png differs
IMAGE v3d raytrace bug24819: bug24819_7.png differs
IMAGE v3d raytrace bug24819: bug24819_6.png differs
IMAGE v3d raytrace bug24819: bug24819_2.png differs
IMAGE v3d raytrace bug24819: bug24819_0.png differs
IMAGE v3d raytrace bug24819: bug24819_5.png differs
IMAGE v3d raytrace refraction: refraction.png differs
IMAGE v3d raytrace bug24130: bug24130.png differs
IMAGE v3d raytrace bug24130: bug24130_18.png differs
IMAGE v3d raytrace bug24130: bug24130_12.png differs
IMAGE v3d raytrace bug24130: bug24130_17.png differs
IMAGE v3d raytrace bug24130: bug24130_14.png differs
IMAGE v3d raytrace bug24130: bug24130_19.png differs
IMAGE v3d raytrace bug24130: bug24130_13.png differs
IMAGE v3d raytrace bug24130: bug24130_16.png differs
IMAGE v3d raytrace bug24130: bug24130_15.png differs

Test case v3d raytrace bug25833 is OK.
(0038876)
dbp (developer)
2015-03-25 12:10

Dear bugmaster,

All the following changes are OK:

IMAGE v3d raytrace bug24819: bug24819.png differs
IMAGE v3d raytrace bug24819: bug24819_1.png differs
IMAGE v3d raytrace bug24819: bug24819_4.png differs
IMAGE v3d raytrace bug24819: bug24819_3.png differs
IMAGE v3d raytrace bug24819: bug24819_7.png differs
IMAGE v3d raytrace bug24819: bug24819_6.png differs
IMAGE v3d raytrace bug24819: bug24819_2.png differs
IMAGE v3d raytrace bug24819: bug24819_0.png differs
IMAGE v3d raytrace bug24819: bug24819_5.png differs
IMAGE v3d raytrace refraction: refraction.png differs
IMAGE v3d raytrace bug24130: bug24130.png differs
IMAGE v3d raytrace bug24130: bug24130_18.png differs
IMAGE v3d raytrace bug24130: bug24130_12.png differs
IMAGE v3d raytrace bug24130: bug24130_17.png differs
IMAGE v3d raytrace bug24130: bug24130_14.png differs
IMAGE v3d raytrace bug24130: bug24130_19.png differs
IMAGE v3d raytrace bug24130: bug24130_13.png differs
IMAGE v3d raytrace bug24130: bug24130_16.png differs
IMAGE v3d raytrace bug24130: bug24130_15.png differs

Test case v3d raytrace bug25833 is OK.
(0039011)
mkv (tester)
2015-03-31 11:37

Branch CR25833 is TESTED.
(0039444)
git (administrator)
2015-04-09 09:48

Branch CR25833 has been deleted by kgv.

SHA-1: 2802ac831114adf6e26cbe35fdfd5776ec7b2f87

- Related Changesets
occt: master 1804bb99
Timestamp: 2015-04-02 11:27:16
Author: dbp
Committer: bugmaster
Details ] Diff ]
0025833: Visualization, ray tracing - Problems with the backside of triangles

Backside triangles are handled correctly by implementing two-sided lighting model. Ray-tracing shader was optimized (up to 25% performance increase).

Test case for CR25833
mod - src/Shaders/RaytraceBase.fs Diff ] File ]
add - tests/v3d/raytrace/bug25833 Diff ] File ]

- Issue History
Date Modified Username Field Change
2015-02-14 15:17 san New Issue
2015-02-14 15:17 san Assigned To => dbp
2015-02-14 15:17 san File Added: bad_reflection.png
2015-02-14 15:18 san File Added: bad_reflection1.png
2015-02-14 15:19 san Steps to Reproduce Updated View Revisions
2015-02-14 15:20 san Relationship added related to 0025752
2015-02-14 15:28 san File Deleted: bad_reflection.png
2015-02-14 15:28 san File Added: bad_reflection.png
2015-02-14 15:33 san Summary Visualization, ray tracing - Problems with reflections on the backside of triangles => Visualization, ray tracing - Problems with the backside of triangles
2015-02-14 15:33 san Description Updated View Revisions
2015-02-14 15:33 san Steps to Reproduce Updated View Revisions
2015-02-14 15:33 san File Added: raster_correct.png
2015-02-14 15:35 san File Added: raytrace_backface_transp.png
2015-02-14 15:37 san Description Updated View Revisions
2015-02-14 15:54 san File Deleted: raster_correct.png
2015-02-14 15:56 san File Deleted: bad_reflection1.png
2015-02-14 15:56 san File Deleted: bad_reflection.png
2015-02-14 15:56 san File Deleted: raytrace_backface_transp.png
2015-02-14 15:56 san File Added: bad_reflection.png
2015-02-14 15:56 san File Added: bad_reflection1.png
2015-02-14 15:56 san File Added: raytrace_backface_transp.png
2015-02-14 15:58 san Description Updated View Revisions
2015-02-14 15:58 san Steps to Reproduce Updated View Revisions
2015-03-17 11:36 git Note Added: 0038414
2015-03-17 11:37 dbp Note Added: 0038415
2015-03-17 11:37 dbp Assigned To dbp => duv
2015-03-17 11:37 dbp Status new => resolved
2015-03-23 10:36 duv Note Added: 0038779
2015-03-23 10:36 duv Assigned To duv => bugmaster
2015-03-23 10:36 duv Status resolved => reviewed
2015-03-23 15:59 mkv Assigned To bugmaster => mkv
2015-03-23 16:40 git Note Added: 0038794
2015-03-23 18:17 kgv Summary Visualization, ray tracing - Problems with the backside of triangles => Visualization, Ray Tracing - fix problems with the backside of triangles
2015-03-24 16:43 mkv Note Added: 0038840
2015-03-24 16:43 mkv Note Added: 0038841
2015-03-24 16:44 git Note Added: 0038842
2015-03-24 16:45 mkv Note Added: 0038843
2015-03-24 16:45 mkv Assigned To mkv => dbp
2015-03-24 16:45 mkv Status reviewed => feedback
2015-03-24 17:25 dbp Note Added: 0038849
2015-03-25 12:10 dbp Note Added: 0038876
2015-03-25 12:10 dbp Assigned To dbp => bugmaster
2015-03-25 12:10 dbp Status feedback => resolved
2015-03-26 09:01 bugmaster Assigned To bugmaster => mkv
2015-03-26 15:38 kgv Status resolved => reviewed
2015-03-31 11:37 mkv Note Added: 0039011
2015-03-31 11:37 mkv Assigned To mkv => bugmaster
2015-03-31 11:37 mkv Status reviewed => tested
2015-03-31 11:37 mkv Test case number => v3d raytrace(014) bug25833
2015-04-07 16:08 bugmaster Changeset attached => occt master 1804bb99
2015-04-07 16:08 bugmaster Status tested => verified
2015-04-07 16:08 bugmaster Resolution open => fixed
2015-04-09 09:48 git Note Added: 0039444
2015-05-14 15:28 aiv Status verified => closed
2015-05-14 15:31 aiv Fixed in Version => 6.9.0


Copyright © 2000 - 2020 MantisBT Team
Powered by Mantis Bugtracker