MantisBT
Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Related Changesets ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0025017Open CASCADE[OCCT] OCCT:Visualizationpublic2014-06-17 19:182014-11-11 12:59
Reporterkgv 
Assigned Tobugmaster 
PrioritynormalSeveritymajor 
StatusclosedResolutionfixed 
PlatformWindowsOSVC++ 2013OS Version64 bit
Product Version 
Target Version[OCCT] 6.8.0Fixed in Version[OCCT] 6.8.0 
Summary0025017: Visualization - materials in Raytracing are messed up
DescriptionCustom colors are not worked correctly in Raytracing mode - them randomly messed up.
Steps To Reproduce
pload MODELING VISUALIZATION
box b  0 0 0 1 2 3
box bb 3 0 0 2 3 1

vinit View1
vclear
vrenderparams -raster
vsetdispmode 1
vaxo
vdisplay b bb
vfit

explode b V
vaspects b -subshapes b_1      -setcolor GREEN
explode b E
vaspects b -subshapes b_6 b_12 -setcolor RED     -setwidth 6
explode b W
vaspects b -subshapes b_2      -setcolor HOTPINK -setwidth 4
explode b F
vaspects b -subshapes b_3      -setcolor GRAY

explode bb F
vaspects bb -setcolor GREEN -subshapes bb_6 -setcolor RED
vdump dump1.png
vrenderparams -raytrace
vdump dump2.png
vrenderparams -raster
vdump dump3.png
vrenderparams -raytrace
vdump dump4.png
vrenderparams -raster
vdump dump5.png
vrenderparams -raytrace
vdump dump6.png
Additional information
and documentation updates
This patch fixes incorrect ray-tracing behaviour for connected OpenGL structures. The error resulted in wrong representation of the geometry in ray-tracing mode (some structures can be hidden, and materials can be messed up).
TagsNo tags attached.
Test case numberNot needed
Attached Filespng file icon colors_rast.png (10,237 bytes) 2014-06-17 19:22
png file icon colors_rt1.png (8,997 bytes) 2014-06-17 19:23
png file icon colors_rt2.png (8,037 bytes) 2014-06-17 19:23

- Relationships

-  Notes
(0029977)
dbp (developer)
2014-07-07 10:46

Dear duv,

please check scene update procedure implemented in your patch on selective BVH updates.
(0030039)
duv (developer)
2014-07-09 17:27

Dear kgv,

Problem should be fixed, please look at the patch.
(0030048)
kgv (developer)
2014-07-10 10:12

Dear Danila,

in general, patch looks like a workaround, not a complete solution.
Please consider revising it.

-        std::map<const OpenGl_PrimitiveArray*, OpenGl_TriangleSet*>::iterator aSetIter = myArrayToTrianglesMap.find 
(aPrimArray);
+        std::map<Standard_Integer, OpenGl_TriangleSet*>::iterator aSetIter = myArrayToTrianglesMap.find 
(aPrimArray->GetUID());
 
         if (aPrimArray != NULL)
         {

NULL check is now make no sense - due to earlier pointer dereference.

+  const Standard_Integer GetUID() const { return myUID; }
+
 private:
 
+  static Standard_Integer NextUID();
+

methods have no description.

+Standard_Integer OpenGl_PrimitiveArray::NextUID()
+{
+  static Standard_Integer Counter = 0;
+
+  return Counter++;
+}

this method is not thread-safe and has no overflow protection (since signed integer is in use).

+  myUID       (NextUID())

why UID is global-wise? It seems it should belong to OpenGl_GraphicDriver instance.

+  Standard_Integer                      myUID;
+

why this field is a property of OpenGl_PrimitiveArray?
This ray-tracer limitation and design issue should be removed in future.
(0030069)
duv (developer)
2014-07-11 12:00

Dear kgv,

Please look at current implementation.
(0030085)
kgv (developer)
2014-07-11 16:42

Please test the patch.
(0030153)
mkv (tester)
2014-07-15 11:57

Dear BugMaster,

Branch CR25017 from occt git-repository (and master from products git-repository) was compiled on Linux and Windows platforms and tested.
SHA-1: 1f2de2f12b6bb4ea9dac5baf5944fa12abece93f

Number of compiler warnings:

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

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

Regressions/Differences:
No regressions/differences

Testing cases:
Not needed

Testing on Linux:
Total MEMORY difference: 352873880 / 352298144
Total CPU difference: 53578.56999999989 / 54524.60999999987

Testing on Windows:
Total MEMORY difference: 377849712 / 378606660
Total CPU difference: 41446.5625 / 46820.203125

There are no differences in images found by testdiff.
(0030319)
git (administrator)
2014-07-22 16:02

Branch CR25017 has been deleted by inv.

SHA-1: 1f2de2f12b6bb4ea9dac5baf5944fa12abece93f

- Related Changesets
occt: master 8d3f219f
Timestamp: 2014-07-11 12:39:29
Author: duv
Committer: bugmaster
Details ] Diff ]
0025017: Visualization - materials in Raytracing are messed up
mod - src/OpenGl/OpenGl_GraphicDriver.hxx Diff ] File ]
mod - src/OpenGl/OpenGl_Group.cxx Diff ] File ]
mod - src/OpenGl/OpenGl_PrimitiveArray.cxx Diff ] File ]
mod - src/OpenGl/OpenGl_PrimitiveArray.hxx Diff ] File ]
mod - src/OpenGl/OpenGl_SceneGeometry.hxx Diff ] File ]
mod - src/OpenGl/OpenGl_Workspace.hxx Diff ] File ]
mod - src/OpenGl/OpenGl_Workspace_Raytrace.cxx Diff ] File ]

- Issue History
Date Modified Username Field Change
2014-06-17 19:18 kgv New Issue
2014-06-17 19:18 kgv Assigned To => san
2014-06-17 19:22 kgv File Added: colors_rast.png
2014-06-17 19:23 kgv File Added: colors_rt1.png
2014-06-17 19:23 kgv File Added: colors_rt2.png
2014-06-17 19:24 kgv Assigned To san => duv
2014-06-17 19:24 kgv Assigned To duv => dbp
2014-06-17 19:24 kgv Severity minor => major
2014-06-17 19:24 kgv Target Version => 6.8.0
2014-07-07 10:46 dbp Note Added: 0029977
2014-07-07 10:46 dbp Assigned To dbp => duv
2014-07-07 10:46 dbp Status new => assigned
2014-07-09 17:27 duv Note Added: 0030039
2014-07-09 17:27 duv Assigned To duv => kgv
2014-07-09 17:27 duv Status assigned => resolved
2014-07-10 10:12 kgv Note Added: 0030048
2014-07-10 10:12 kgv Assigned To kgv => duv
2014-07-10 10:12 kgv Status resolved => assigned
2014-07-11 12:00 duv Note Added: 0030069
2014-07-11 12:00 duv Assigned To duv => kgv
2014-07-11 12:00 duv Status assigned => resolved
2014-07-11 16:42 kgv Note Added: 0030085
2014-07-11 16:42 kgv Assigned To kgv => bugmaster
2014-07-11 16:42 kgv Status resolved => reviewed
2014-07-11 17:48 mkv Assigned To bugmaster => mkv
2014-07-15 11:57 mkv Note Added: 0030153
2014-07-15 11:58 mkv Test case number => Not needed
2014-07-15 11:58 mkv Assigned To mkv => bugmaster
2014-07-15 11:58 mkv Status reviewed => tested
2014-07-22 15:13 bugmaster Changeset attached => occt master 8d3f219f
2014-07-22 15:13 bugmaster Status tested => verified
2014-07-22 15:13 bugmaster Resolution open => fixed
2014-07-22 16:02 git Note Added: 0030319
2014-10-03 11:56 dbp Additional Information Updated View Revisions
2014-11-11 12:44 aiv Fixed in Version => 6.8.0
2014-11-11 12:59 aiv Status verified => closed


Copyright © 2000 - 2020 MantisBT Team
Powered by Mantis Bugtracker