View Issue Details

IDProjectCategoryView StatusLast Update
0031225Open CASCADEOCCT:Visualizationpublic2020-12-02 17:12
Reporterkgv Assigned Tobugmaster  
PrioritynormalSeverityminor 
Status closedResolutionfixed 
Target Version7.5.0Fixed in Version7.5.0 
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

Relationships

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

Activities

git

2019-12-13 12:01

administrator   ~0089488

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

git

2019-12-13 13:37

administrator   ~0089496

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

git

2019-12-13 13:37

administrator   ~0089497

Branch CR31225 has been updated forcibly by mzernova.

SHA-1: 3e01549c66bf9aaf831d4e9241754371de206dd4

mzernova

2019-12-13 13:38

developer   ~0089498

The patch CR31225 is ready to review

kgv

2019-12-13 14:09

developer   ~0089499

Last edited: 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.

git

2019-12-16 13:21

administrator   ~0089565

Branch CR31225_1 has been updated forcibly by mzernova.

SHA-1: bd792cfd78f9c08e5b9daadc09f0356528c1d096

git

2019-12-16 13:21

administrator   ~0089566

Branch CR31225 has been updated forcibly by mzernova.

SHA-1: 293d77682c6ca9bcf3b092191c363958dc4508d5

mzernova

2019-12-16 15:16

developer   ~0089570

http://vm-jenkins-test-12.nnov.opencascade.com:8080/view/CR31225-master-mzernova

mzernova

2019-12-16 15:16

developer   ~0089571

The patch CR31225 is ready to review

git

2019-12-16 16:19

administrator   ~0089577

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

kgv

2019-12-16 16:25

developer   ~0089578

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;
> }

git

2019-12-24 14:11

administrator   ~0089734

Branch CR31225 has been updated forcibly by mzernova.

SHA-1: c6d52110850b007fbaeb5262771d09d97beafdcd

git

2019-12-24 14:11

administrator   ~0089735

Branch CR31225_1 has been updated forcibly by mzernova.

SHA-1: ba3d9237a3a207295cf11063357ed4214a529def

git

2019-12-24 14:11

administrator   ~0089737

Branch CR31225_2 has been updated forcibly by mzernova.

SHA-1: 7de342bd7addb2fa0461dd2007fd333903c40236

mzernova

2019-12-24 14:13

developer   ~0089738

The patch CR31225 is ready to review

git

2019-12-24 15:46

administrator   ~0089741

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()

git

2019-12-24 15:47

administrator   ~0089742

Branch CR31225 has been updated forcibly by mzernova.

SHA-1: 849754f400ec7d254363f30fb0962abce0bf5b06

git

2019-12-24 15:47

administrator   ~0089743

Branch CR31225_2 has been updated forcibly by mzernova.

SHA-1: 08ef1f0f19835d769620c203a0bdeba192758012

git

2019-12-26 13:45

administrator   ~0089777

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.

kgv

2019-12-26 14:28

developer   ~0089778

Remarks have been pushed to CR31225_3.

git

2019-12-26 16:11

administrator   ~0089780

Branch CR31225_3 has been updated forcibly by kgv.

SHA-1: 0fa4979ee6a6b99ad8db645d55033b7f010de50a

git

2019-12-26 16:13

administrator   ~0089781

Branch CR31225_3 has been updated forcibly by kgv.

SHA-1: 07d3c8b40885810458f3a3f04a4b9b9b2b64ee25

git

2019-12-26 17:50

administrator   ~0089782

Branch CR31225_3 has been updated forcibly by kgv.

SHA-1: 59e418b0ceca2860f4c4ce7caa1994f52074c952

git

2019-12-26 20:05

administrator   ~0089783

Branch CR31225_3 has been updated forcibly by kgv.

SHA-1: 71c879af7315b8b5f2ad170da8d3ce485dd75eca

kgv

2019-12-26 20:15

developer   ~0089784

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.

kgv

2019-12-26 21:26

developer   ~0089785

Please raise the patch.

http://jenkins-test-12.nnov.opencascade.com:8080/view/CR31225_3-master-KGV/

git

2019-12-28 15:23

administrator   ~0089797

Branch CR31225_3 has been deleted by inv.

SHA-1: 71c879af7315b8b5f2ad170da8d3ce485dd75eca

git

2019-12-28 15:23

administrator   ~0089799

Branch CR31225_1 has been deleted by inv.

SHA-1: 05d76336c8bc7eaebe61f6d4e047661735212d77

git

2019-12-28 15:23

administrator   ~0089800

Branch CR31225_2 has been deleted by inv.

SHA-1: 08ef1f0f19835d769620c203a0bdeba192758012

git

2019-12-28 15:24

administrator   ~0089801

Branch CR31225 has been deleted by inv.

SHA-1: 849754f400ec7d254363f30fb0962abce0bf5b06

Related Changesets

occt: master 89d855ba

2019-12-13 08:55:50

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.
Affected Issues
0031225
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
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
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
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
2020-12-02 16:41 emo Fixed in Version => 7.5.0
2020-12-02 17:12 emo Status verified => closed
The file specified in $g_log_destination "/var/log/mantis/bugs/LDAP.log" is not writable.