MantisBT
Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Related Changesets ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0031225Open CASCADE[OCCT] OCCT:Visualizationpublic2019-12-06 10:332020-05-27 23:25
Reporterkgv 
Assigned Tobugmaster 
PrioritynormalSeverityminor 
StatusverifiedResolutionfixed 
PlatformOSOS Version
Product Version 
Target Version[OCCT] 7.5.0Fixed in Version 
Summary0031225: Visualization, TKOpenGl - support cubemap for environment texture within Ray-Tracing
DescriptionCurrently environment Cubemaps are supported only by PBR renderer.
It is desired supporting Cubemaps within Ray-Tracing engine as well (for IBL and as background).
Steps To Reproducev3d/raytrace/pbr_spheres
TagsNo tags attached.
Test case numberv3d/raytrace/pbr_spheres
Attached Files

- Relationships
related to 0031279verifiedbugmaster Visualization, TKOpenGl - environment background is misplaced within Ray-Tracing 
related to 0031584newkgv Visualization, TKOpenGl - support cubemap Ambient lighting within Graphic3d_TOSM_FRAGMENT shading 
child of 0031129newkgv Visualization - revise background / environment API 

-  Notes
(0089488)
git (administrator)
2019-12-13 12:01

Branch CR31225 has been created by mzernova.

SHA-1: 885e56ead2c9b423e7e00fae4f862db6b709c0ca


Detailed log of new commits:

Author: mzernova
Date: Fri Dec 13 11:55:50 2019 +0300

    0031225: Visualization, TKOpenGl - support cubemap for environment texture within Ray-Tracing
    
    Added supporting environment Cubemaps within Ray-Tracing engine for IBL and as background
(0089496)
git (administrator)
2019-12-13 13:37

Branch CR31225_1 has been created by mzernova.

SHA-1: 5e9f4a3b728c0029b270f691cfd86344f9283069


Detailed log of new commits:

Author: mzernova
Date: Fri Dec 13 11:55:50 2019 +0300

    0031225: Visualization, TKOpenGl - support cubemap for environment texture within Ray-Tracing
    
    Added supporting environment Cubemaps within Ray-Tracing engine for IBL and as background

Author: mzernova
Date: Fri Dec 13 13:30:36 2019 +0300

    remarks from kgv
(0089497)
git (administrator)
2019-12-13 13:37

Branch CR31225 has been updated forcibly by mzernova.

SHA-1: 3e01549c66bf9aaf831d4e9241754371de206dd4
(0089498)
mzernova (developer)
2019-12-13 13:38

The patch CR31225 is ready to review
(0089499)
kgv (developer)
2019-12-13 14:09
edited on: 2019-12-13 14:11

-    if (theDepth + uSphereMapForBack == 0) // view ray and map is hidden
+    if (bool(uCubemapForBack))
+    {
+      aTotalRadiance = textureCube (uRaytraceCubemapTexture, cubemapVectorTransform (theRay.Direct, 
uYCoeff, uZCoeff)).rgb;
+    }
+    else if (theDepth + uSphereMapForBack == 0) // view ray and map is hidden

It is expected that FetchEnvironment() function will be updated instead.

+//! Environment cubemap texture.
+uniform samplerCube uRaytraceCubemapTexture;
...
//! Environment map texture.
uniform sampler2D uEnvironmentMapTexture;

Please use #ifdef for switching between CubeMap and Spherical panorama images instead of defining both of them at once.
Please use the same variable name with different sampler type (samplerCube / sampler2D) basing on macros.

(0089565)
git (administrator)
2019-12-16 13:21

Branch CR31225_1 has been updated forcibly by mzernova.

SHA-1: bd792cfd78f9c08e5b9daadc09f0356528c1d096
(0089566)
git (administrator)
2019-12-16 13:21

Branch CR31225 has been updated forcibly by mzernova.

SHA-1: 293d77682c6ca9bcf3b092191c363958dc4508d5
(0089570)
mzernova (developer)
2019-12-16 15:16

http://vm-jenkins-test-12.nnov.opencascade.com:8080/view/CR31225-master-mzernova [^]
(0089571)
mzernova (developer)
2019-12-16 15:16

The patch CR31225 is ready to review
(0089577)
git (administrator)
2019-12-16 16:19

Branch CR31225_2 has been created by mzernova.

SHA-1: ac2a253c2198ae3e52c88f4a46a86e0545d8e385


Detailed log of new commits:

Author: mzernova
Date: Fri Dec 13 11:55:50 2019 +0300

    0031225: Visualization, TKOpenGl - support cubemap for environment texture within Ray-Tracing
    
    Added supporting environment Cubemaps within Ray-Tracing engine for IBL and as background
(0089578)
kgv (developer)
2019-12-16 16:25

Test case is missing for the new feature.
New test can be based on v3d/glsl/pbr_spheres using vrenderparams -gi mode for the same scene (to be put into v3d/raytrace/pbr_spheres).

+//! Enables/disables cubemap background.
+uniform int uCubemapForBack;

New variable just duplicates existing uSphereMapEnabled.
Please use single variable.

+  if (myBackgroundType == Graphic3d_TOB_CUBEMAP)
+  {
+    aPrefixString += TCollection_AsciiString("\n#define BACKGROUND_CUBEMAP");
+  }

As this parameter requires GLSL program re-compilation, it should be tracked within OpenGl_View::initRaytraceResources() to set aToRebuildShaders on change:
> if (myRenderParams.ToneMappingMethod != myRaytraceParameters.ToneMappingMethod)
> {
> myRaytraceParameters.ToneMappingMethod = myRenderParams.ToneMappingMethod;
> aToRebuildShaders = true;
> }
(0089734)
git (administrator)
2019-12-24 14:11

Branch CR31225 has been updated forcibly by mzernova.

SHA-1: c6d52110850b007fbaeb5262771d09d97beafdcd
(0089735)
git (administrator)
2019-12-24 14:11

Branch CR31225_1 has been updated forcibly by mzernova.

SHA-1: ba3d9237a3a207295cf11063357ed4214a529def
(0089737)
git (administrator)
2019-12-24 14:11

Branch CR31225_2 has been updated forcibly by mzernova.

SHA-1: 7de342bd7addb2fa0461dd2007fd333903c40236
(0089738)
mzernova (developer)
2019-12-24 14:13

The patch CR31225 is ready to review
(0089741)
git (administrator)
2019-12-24 15:46

Branch CR31225_1 has been updated by mzernova.

SHA-1: 05d76336c8bc7eaebe61f6d4e047661735212d77


Detailed log of new commits:

Author: mzernova
Date: Tue Dec 24 15:39:55 2019 +0300

    replaced textureCube() with texture()

(0089742)
git (administrator)
2019-12-24 15:47

Branch CR31225 has been updated forcibly by mzernova.

SHA-1: 849754f400ec7d254363f30fb0962abce0bf5b06
(0089743)
git (administrator)
2019-12-24 15:47

Branch CR31225_2 has been updated forcibly by mzernova.

SHA-1: 08ef1f0f19835d769620c203a0bdeba192758012
(0089777)
git (administrator)
2019-12-26 13:45

Branch CR31225_3 has been created by kgv.

SHA-1: d216f5f1e50eea11bfed8913580e33181ddaa687


Detailed log of new commits:

Author: mzernova
Date: Fri Dec 13 11:55:50 2019 +0300

    0031225: Visualization, TKOpenGl - support cubemap for environment texture within Ray-Tracing
    
    Ray-Tracing now handles IBL and background cubemaps in similar way as PBR.
    Ambient light source is handled by Ray-Tracing in similar way as PBR,
    e.g. as coefficient for environment map (IBL) or as constant light source.
    
    Test script generating PBR spheres has been moved to Samples
    and now shared by PBR and Path-Tracing tests.
(0089778)
kgv (developer)
2019-12-26 14:28

Remarks have been pushed to CR31225_3.
(0089780)
git (administrator)
2019-12-26 16:11

Branch CR31225_3 has been updated forcibly by kgv.

SHA-1: 0fa4979ee6a6b99ad8db645d55033b7f010de50a
(0089781)
git (administrator)
2019-12-26 16:13

Branch CR31225_3 has been updated forcibly by kgv.

SHA-1: 07d3c8b40885810458f3a3f04a4b9b9b2b64ee25
(0089782)
git (administrator)
2019-12-26 17:50

Branch CR31225_3 has been updated forcibly by kgv.

SHA-1: 59e418b0ceca2860f4c4ce7caa1994f52074c952
(0089783)
git (administrator)
2019-12-26 20:05

Branch CR31225_3 has been updated forcibly by kgv.

SHA-1: 71c879af7315b8b5f2ad170da8d3ce485dd75eca
(0089784)
kgv (developer)
2019-12-26 20:15

texture() from cubemap within FetchEnvironment() produced visual artifacts (visible boundaries of cube), so that it was replaced by textureLod(), which was already used for texture lookup from sphere.
(0089785)
kgv (developer)
2019-12-26 21:26

Please raise the patch.

http://jenkins-test-12.nnov.opencascade.com:8080/view/CR31225_3-master-KGV/ [^]
(0089797)
git (administrator)
2019-12-28 15:23

Branch CR31225_3 has been deleted by inv.

SHA-1: 71c879af7315b8b5f2ad170da8d3ce485dd75eca
(0089799)
git (administrator)
2019-12-28 15:23

Branch CR31225_1 has been deleted by inv.

SHA-1: 05d76336c8bc7eaebe61f6d4e047661735212d77
(0089800)
git (administrator)
2019-12-28 15:23

Branch CR31225_2 has been deleted by inv.

SHA-1: 08ef1f0f19835d769620c203a0bdeba192758012
(0089801)
git (administrator)
2019-12-28 15:24

Branch CR31225 has been deleted by inv.

SHA-1: 849754f400ec7d254363f30fb0962abce0bf5b06

- Related Changesets
occt: master 89d855ba
Timestamp: 2019-12-13 08:55:50
Author: mzernova
Committer: bugmaster
Details ] Diff ]
0031225: Visualization, TKOpenGl - support cubemap for environment texture within Ray-Tracing

Ray-Tracing now handles IBL and background cubemaps in similar way as PBR.
Ambient light source is handled by Ray-Tracing in similar way as PBR,
e.g. as coefficient for environment map (IBL) or as constant light source.

Test script generating PBR spheres has been moved to Samples
and now shared by PBR and Path-Tracing tests.
mod - samples/tcl/pathtrace_ball.tcl Diff ] File ]
mod - samples/tcl/pathtrace_cube.tcl Diff ] File ]
mod - samples/tcl/pathtrace_materials.tcl Diff ] File ]
add - samples/tcl/vis_pbr_spheres.tcl Diff ] File ]
mod - src/OpenGl/OpenGl_View.hxx Diff ] File ]
mod - src/OpenGl/OpenGl_View_Raytrace.cxx Diff ] File ]
mod - src/Shaders/PathtraceBase.fs Diff ] File ]
mod - src/Shaders/RaytraceBase.fs Diff ] File ]
mod - src/Shaders/Shaders_PathtraceBase_fs.pxx Diff ] File ]
mod - src/Shaders/Shaders_RaytraceBase_fs.pxx Diff ] File ]
mod - tests/v3d/glsl/pbr_spheres Diff ] File ]
mod - tests/v3d/raytrace/dof_mono Diff ] File ]
mod - tests/v3d/raytrace/dof_stereo Diff ] File ]
add - tests/v3d/raytrace/pbr_spheres Diff ] File ]
mod - tests/v3d/raytrace/textures Diff ] File ]
mod - tests/v3d/raytrace/tone_mapping Diff ] File ]

- Issue History
Date Modified Username Field Change
2019-12-06 10:33 kgv New Issue
2019-12-06 10:33 kgv Assigned To => mzernova
2019-12-06 10:33 kgv Relationship added child of 0031129
2019-12-06 10:34 kgv Summary Visualization, TKOpenGl - support cubemap for environment texture with Ray-Tracing => Visualization, TKOpenGl - support cubemap for environment texture within Ray-Tracing
2019-12-13 12:01 git Note Added: 0089488
2019-12-13 13:37 git Note Added: 0089496
2019-12-13 13:37 git Note Added: 0089497
2019-12-13 13:38 mzernova Note Added: 0089498
2019-12-13 13:38 mzernova Assigned To mzernova => kgv
2019-12-13 13:38 mzernova Status new => resolved
2019-12-13 13:38 mzernova Steps to Reproduce Updated View Revisions
2019-12-13 14:09 kgv Note Added: 0089499
2019-12-13 14:10 kgv Assigned To kgv => mzernova
2019-12-13 14:10 kgv Status resolved => assigned
2019-12-13 14:11 kgv Note Edited: 0089499 View Revisions
2019-12-16 13:21 git Note Added: 0089565
2019-12-16 13:21 git Note Added: 0089566
2019-12-16 15:16 mzernova Note Added: 0089570
2019-12-16 15:16 mzernova Note Added: 0089571
2019-12-16 15:16 mzernova Assigned To mzernova => kgv
2019-12-16 15:16 mzernova Status assigned => resolved
2019-12-16 16:19 git Note Added: 0089577
2019-12-16 16:25 kgv Note Added: 0089578
2019-12-16 16:25 kgv Assigned To kgv => mzernova
2019-12-16 16:25 kgv Status resolved => assigned
2019-12-24 14:11 git Note Added: 0089734
2019-12-24 14:11 git Note Added: 0089735
2019-12-24 14:11 git Note Added: 0089737
2019-12-24 14:13 mzernova Note Added: 0089738
2019-12-24 14:13 mzernova Assigned To mzernova => kgv
2019-12-24 14:13 mzernova Status assigned => resolved
2019-12-24 14:13 mzernova Steps to Reproduce Updated View Revisions
2019-12-24 15:46 git Note Added: 0089741
2019-12-24 15:47 git Note Added: 0089742
2019-12-24 15:47 git Note Added: 0089743
2019-12-26 13:45 git Note Added: 0089777
2019-12-26 13:53 kgv Relationship added related to 0031279
2019-12-26 14:28 kgv Note Added: 0089778
2019-12-26 16:11 git Note Added: 0089780
2019-12-26 16:13 git Note Added: 0089781
2019-12-26 17:50 git Note Added: 0089782
2019-12-26 20:05 git Note Added: 0089783
2019-12-26 20:15 kgv Note Added: 0089784
2019-12-26 21:26 kgv Note Added: 0089785
2019-12-26 21:26 kgv Assigned To kgv => bugmaster
2019-12-26 21:26 kgv Status resolved => reviewed
2019-12-27 16:17 bugmaster Test case number => v3d/raytrace/pbr_spheres
2019-12-28 13:37 bugmaster Changeset attached => occt master 89d855ba
2019-12-28 13:37 bugmaster Status reviewed => verified
2019-12-28 13:37 bugmaster Resolution open => fixed
2019-12-28 15:23 git Note Added: 0089797
2019-12-28 15:23 git Note Added: 0089799
2019-12-28 15:23 git Note Added: 0089800
2019-12-28 15:24 git Note Added: 0089801
2020-05-27 23:25 kgv Relationship added related to 0031584


Copyright © 2000 - 2020 MantisBT Team
Powered by Mantis Bugtracker