View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0024864 | Open CASCADE | OCCT:Visualization | public | 2014-04-21 17:47 | 2014-11-11 12:58 |
Reporter | Assigned To | apn | |||
Priority | normal | Severity | feature | ||
Status | closed | Resolution | fixed | ||
Target Version | 6.8.0 | Fixed in Version | 6.8.0 | ||
Summary | 0024864: Visualization - Implementing refractions in ray-tracing | ||||
Description | For transparent objects implemented ray refraction according to refraction index. Refraction index passed to raytrace shader. Transparent materials have been modified to look better with refractions. | ||||
Additional information and documentation updates | Optical refractions according to specified refraction index have been implemented for transparent objects (in OCCT ray-tracing core). Transparent materials have been modified to look better with refractions ('water', 'glass' and 'diamond'). | ||||
Tags | No tags attached. | ||||
Test case number | Not needed | ||||
related to | 0024855 | closed | apn | Open CASCADE | Revision of parameters of standard materials |
related to | 0023387 | closed | bugmaster | Community | Visualization - transparency of specified material is ignored within AIS_Shape::SetMaterial() |
related to | 0024887 | closed | apn | Open CASCADE | Visualization - revise and extend Raytracing controls |
|
Dear duv, please use this base fucntion: // ======================================================================= // function : Refract // purpose : // ======================================================================= vec3 Refract (in vec3 theInput, in vec3 theNormal) { float aNdotI = dot (theInput, theNormal); float anIndex = aNdotI < 0.0 ? 1.0 / 1.5 : 1.5 / 1.0; float aSquare = anIndex * anIndex * (1.0 - aNdotI * aNdotI); if (aSquare > 1.0) { return reflect (theInput, theNormal); } vec3 aOut = (aNdotI < 0.0) ? anIndex * theInput - (anIndex * aNdotI + sqrt (1.0 - aSquare)) * theNormal : anIndex * theInput - (anIndex * aNdotI - sqrt (1.0 - aSquare)) * theNormal; return normalize (aOut); } |
|
Dear kgv, please review the patch. |
|
Dear Danila,vec4 aSpecular = vec4 (texelFetch ( uRaytraceMaterialTexture, MATERIAL_SPEC (aTriIndex.w))); - vec2 aOpacity = vec2 (texelFetch ( + vec4 aOpacity = vec4 (texelFetch ( uRaytraceMaterialTexture, MATERIAL_TRAN (aTriIndex.w))); could you please specify what for all these "vec4(texelFetch("? I think vec4 constructor is redundant here. + theInverse.z = theRay.Direct.z < 0.0 ? -theInverse.z : theInverse.z; + + aPoint += aHit.Normal * (dot (aHit.Normal, theRay.Direct) >= 0.f ? uSceneEpsilon : -uSceneEpsilon); it would be better to use same style across the code (">= 0.0" instead of ">= 0.f")... |
|
Dear kgv, please review the patch. |
|
Please test the patch. |
|
Dear BugMaster, Branch CR24864 (and products from GIT master) was compiled on Linux and Windows platforms and tested. SHA-1: 6e734e8b572450ed07ae6eb4e838f647b54e877c Number of compiler warnings: Linux: 17 (17 on master) Windows: 0 (0 on master) products component : Linux: 11 (11 on master) Windows: 2 (2 on master) Regressions/Differences: Not detected Testing cases: Absent Testing on Linux: Total MEMORY difference: 355730320 / 357316044 Total CPU difference: 59822.65999999958 / 56363.22999999993 Testing on Windows: Total MEMORY difference: 379211864 / 379613888 Total CPU difference: 39919.71875 / 35503.203125 |
|
refraction.png (18,855 bytes) |
occt: master dc9ef964 2014-04-22 12:55:21
Committer: apn Details Diff |
0024864: Implementing refractions in ray-tracing Refraction index passed to raytrace shader. For transparent objects implemented ray refraction according to refraction index. Transparent materials modified to look better with refractions. |
Affected Issues 0024864 |
|
mod - src/Graphic3d/Graphic3d_Group.cxx | Diff File | ||
mod - src/OpenGl/OpenGl_Workspace_Raytrace.cxx | Diff File | ||
mod - src/Shaders/RaytraceBase.fs | Diff File | ||
add - tests/v3d/raytrace/refraction | Diff File |
Date Modified | Username | Field | Change |
---|---|---|---|
2014-04-21 17:47 |
|
New Issue | |
2014-04-21 17:47 |
|
Assigned To | => dbp |
2014-04-22 10:28 |
|
Assigned To | dbp => duv |
2014-04-22 10:29 |
|
Note Added: 0029004 | |
2014-04-22 17:07 |
|
Status | new => assigned |
2014-04-23 10:24 | kgv | Severity | minor => feature |
2014-04-23 10:24 | kgv | Product Version | 6.8.0 => |
2014-04-23 10:24 | kgv | Target Version | => 6.8.0 |
2014-04-23 10:24 | kgv | Summary | Implementing refractions in ray-tracing => Visualization - Implementing refractions in ray-tracing |
2014-04-25 15:04 |
|
Relationship added | related to 0024855 |
2014-04-25 15:04 |
|
Relationship added | related to 0023387 |
2014-05-13 16:13 |
|
Description Updated | |
2014-05-13 16:14 |
|
Note Added: 0029300 | |
2014-05-13 16:14 |
|
Assigned To | duv => kgv |
2014-05-13 16:14 |
|
Status | assigned => resolved |
2014-05-14 08:27 | kgv | Note Added: 0029311 | |
2014-05-14 08:27 | kgv | Assigned To | kgv => duv |
2014-05-14 08:27 | kgv | Status | resolved => assigned |
2014-05-14 08:27 | kgv | Note Edited: 0029311 | |
2014-05-14 10:45 |
|
Note Added: 0029312 | |
2014-05-14 10:45 |
|
Assigned To | duv => kgv |
2014-05-14 10:45 |
|
Status | assigned => resolved |
2014-05-16 14:01 | kgv | Note Added: 0029370 | |
2014-05-16 14:01 | kgv | Assigned To | kgv => bugmaster |
2014-05-16 14:01 | kgv | Status | resolved => reviewed |
2014-05-20 10:18 | kgv | Relationship added | related to 0024887 |
2014-05-21 16:52 | apn | Assigned To | bugmaster => apn |
2014-05-22 16:14 |
|
Note Added: 0029469 | |
2014-05-22 16:15 |
|
Assigned To | apn => bugmaster |
2014-05-22 16:15 |
|
Status | reviewed => tested |
2014-05-22 16:18 | apn | Note Edited: 0029469 | |
2014-05-22 16:19 | apn | Test case number | => Not needed |
2014-05-23 14:25 | apn | Changeset attached | => occt master dc9ef964 |
2014-05-23 14:25 | apn | Assigned To | bugmaster => apn |
2014-05-23 14:25 | apn | Status | tested => verified |
2014-05-23 14:25 | apn | Resolution | open => fixed |
2014-06-30 08:15 | kgv | File Added: refraction.png | |
2014-09-29 14:17 |
|
Description Updated | |
2014-09-29 14:17 |
|
Additional Information Updated | |
2014-11-11 12:45 |
|
Fixed in Version | => 6.8.0 |
2014-11-11 12:58 |
|
Status | verified => closed |