View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0025017 | Open CASCADE | OCCT:Visualization | public | 2014-06-17 19:18 | 2014-11-11 12:59 |
Reporter | kgv | Assigned To | bugmaster | ||
Priority | normal | Severity | major | ||
Status | closed | Resolution | fixed | ||
Platform | Windows | OS | VC++ 2013 | ||
Target Version | 6.8.0 | Fixed in Version | 6.8.0 | ||
Summary | 0025017: Visualization - materials in Raytracing are messed up | ||||
Description | Custom 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). | ||||
Tags | No tags attached. | ||||
Test case number | Not needed | ||||
|
colors_rast.png (10,237 bytes) |
|
colors_rt1.png (8,997 bytes) |
|
colors_rt2.png (8,037 bytes) |
|
Dear duv, please check scene update procedure implemented in your patch on selective BVH updates. |
|
Dear kgv, Problem should be fixed, please look at the patch. |
|
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. |
|
Dear kgv, Please look at current implementation. |
|
Please test the patch. |
|
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. |
|
Branch CR25017 has been deleted by inv. SHA-1: 1f2de2f12b6bb4ea9dac5baf5944fa12abece93f |
occt: master 8d3f219f 2014-07-11 12:39:29
Committer: bugmaster Details Diff |
0025017: Visualization - materials in Raytracing are messed up |
Affected Issues 0025017 |
|
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 |
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 |
|
Note Added: 0029977 | |
2014-07-07 10:46 |
|
Assigned To | dbp => duv |
2014-07-07 10:46 |
|
Status | new => assigned |
2014-07-09 17:27 |
|
Note Added: 0030039 | |
2014-07-09 17:27 |
|
Assigned To | duv => kgv |
2014-07-09 17:27 |
|
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 |
|
Note Added: 0030069 | |
2014-07-11 12:00 |
|
Assigned To | duv => kgv |
2014-07-11 12:00 |
|
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 |
|
Assigned To | bugmaster => mkv |
2014-07-15 11:57 |
|
Note Added: 0030153 | |
2014-07-15 11:58 |
|
Test case number | => Not needed |
2014-07-15 11:58 |
|
Assigned To | mkv => bugmaster |
2014-07-15 11:58 |
|
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 |
|
Additional Information Updated | |
2014-11-11 12:44 |
|
Fixed in Version | => 6.8.0 |
2014-11-11 12:59 |
|
Status | verified => closed |