DXEngine Material flickering after changing IsVisible property on scene node
#1
I have this strange flickering effect appearing after setting the IsVisible property on multiple scene nodes...
I'm running short of ideas on this :/ any help would be appreciated.


Attached Files Thumbnail(s)
   
#2
From the video I see that some parts of the scene change visibility on new frame.

But it is hard to say what could be causing this.

Do you set IsVisible on ContentVisual3D objects or directly on SceneNode objects - which type?

Anyway, you can get some additional information with checking the status of SceneNodes and Renderable objects (in RenderingQueues).

The easiest way to get that data is to use DXEngineSnoop tool (installed into Tools folder).  Start the tool and connect to you application. Then go to menu and click on "Dump SceneNodes" and then "Dump RenderingQueues".
(more about using DXEngineSnoop - https://www.ab4d.com/DirectX/3D/Diagnostics.aspx).

You can also get those two diagnostics texts programmatically from your application with calling:
MainDXViewportView.DXScene.GetSceneNodesDumpString()
MainDXViewportView.DXScene.GetRenderingQueuesDumpString()

or if you are using VisualStudio immediate window:
MainDXViewportView.DXScene.DumpSceneNodes()
MainDXViewportView.DXScene.DumpRenderingQueues()

In both cases the SceneNodes and Renderable objects that have IsVisible set to false should have "(IsVisible == false)" displayed in the line with the object details.

Please observe if the "(IsVisible == false)" appears or disappears between frames without you changing IsVisible property - in this case please provide more information on the types and hierarchy of objects that you are using so I will try to reproduce the problem (I can give you an answer to the problem even faster if can provide a simple sample that can reproduce this).
Andrej Benedik
#3
(10-09-2019, 02:36 PM)abenedik Wrote: From the video I see that some parts of the scene change visibility on new frame.

But it is hard to say what could be causing this.

Do you set IsVisible on ContentVisual3D objects or directly on SceneNode objects - which type?

Anyway, you can get some additional information with checking the status of SceneNodes and Renderable objects (in RenderingQueues).

The easiest way to get that data is to use DXEngineSnoop tool (installed into Tools folder).  Start the tool and connect to you application. Then go to menu and click on "Dump SceneNodes" and then "Dump RenderingQueues".
(more about using DXEngineSnoop - https://www.ab4d.com/DirectX/3D/Diagnostics.aspx).

You can also get those two diagnostics texts programmatically from your application with calling:
MainDXViewportView.DXScene.GetSceneNodesDumpString()
MainDXViewportView.DXScene.GetRenderingQueuesDumpString()

or if you are using VisualStudio immediate window:
MainDXViewportView.DXScene.DumpSceneNodes()
MainDXViewportView.DXScene.DumpRenderingQueues()

In both cases the SceneNodes and Renderable objects that have IsVisible set to false should have "(IsVisible == false)" displayed in the line with the object details.

Please observe if the "(IsVisible == false)" appears or disappears between frames without you changing IsVisible property - in this case please provide more information on the types and hierarchy of objects that you are using so I will try to reproduce the problem (I can give you an answer to the problem even faster if can provide a simple sample that can reproduce this).

Hi and sorry for the late reply, i got caught in some other work.

I have a root scene node on which i set the transform. This root scene node has multiple MeshObjectNode children (the layers) on which i set the IsVisible property.

I seem to have this problem only bigger objects (more MeshObjectNode children) and when i start changing the IsVisible property.

I attatch the layers with the two dumps, if they are not meaningful i will provide an example project.

Thank you


Attached Files
.zip   Dumps.zip (Size: 26.73 KB / Downloads: 2)
#4
When checking your SceneNode dumps I found something unusual:

Code:
       SceneNode (192)   (IsVisible == false)  WorldBounds: (-340282300000000000000000000000000000000 -340282300000000000000000000000000000000 -340282300000000000000000000000000000000)->(340282300000000000000000000000000000000 340282300000000000000000000000000000000 340282300000000000000000000000000000000) [Infinity x Infinity x Infinity]    LocalBounds: (340282300000000000000000000000000000000 340282300000000000000000000000000000000 340282300000000000000000000000000000000)->(-340282300000000000000000000000000000000 -340282300000000000000000000000000000000 -340282300000000000000000000000000000000) [-Infinity x -Infinity x -Infinity]  Flags: Unchanged

           MeshObjectNode (194)   (IsVisible == false)  WorldBounds: (-340282300000000000000000000000000000000 -340282300000000000000000000000000000000 -340282300000000000000000000000000000000)->(340282300000000000000000000000000000000 340282300000000000000000000000000000000 340282300000000000000000000000000000000) [Infinity x Infinity x Infinity]    LocalBounds: (340282300000000000000000000000000000000 340282300000000000000000000000000000000 340282300000000000000000000000000000000)->(-340282300000000000000000000000000000000 -340282300000000000000000000000000000000 -340282300000000000000000000000000000000) [-Infinity x -Infinity x -Infinity]   IsCastingShadow: false  IsReceivingShadow: false Flags: Unchanged


Those two SceneNodes have very big bounds. If such object becomes part of the scene, then this can destroy depth-resolution - puts camera's far plane to almost infinity and this means that almost all objects would have almost the same depth (distance) to the camera (depth is calculated as a fraction of the far plane distance - using 32 bit float value).

Can you try to set the size of that object to a normal object's size and then check if your problem is fixed.
Andrej Benedik
#5
(10-29-2019, 03:25 PM)abenedik Wrote: When checking your SceneNode dumps I found something unusual:

Code:
       SceneNode (192)   (IsVisible == false)  WorldBounds: (-340282300000000000000000000000000000000 -340282300000000000000000000000000000000 -340282300000000000000000000000000000000)->(340282300000000000000000000000000000000 340282300000000000000000000000000000000 340282300000000000000000000000000000000) [Infinity x Infinity x Infinity]    LocalBounds: (340282300000000000000000000000000000000 340282300000000000000000000000000000000 340282300000000000000000000000000000000)->(-340282300000000000000000000000000000000 -340282300000000000000000000000000000000 -340282300000000000000000000000000000000) [-Infinity x -Infinity x -Infinity]  Flags: Unchanged

           MeshObjectNode (194)   (IsVisible == false)  WorldBounds: (-340282300000000000000000000000000000000 -340282300000000000000000000000000000000 -340282300000000000000000000000000000000)->(340282300000000000000000000000000000000 340282300000000000000000000000000000000 340282300000000000000000000000000000000) [Infinity x Infinity x Infinity]    LocalBounds: (340282300000000000000000000000000000000 340282300000000000000000000000000000000 340282300000000000000000000000000000000)->(-340282300000000000000000000000000000000 -340282300000000000000000000000000000000 -340282300000000000000000000000000000000) [-Infinity x -Infinity x -Infinity]   IsCastingShadow: false  IsReceivingShadow: false Flags: Unchanged


Those two SceneNodes have very big bounds. If such object becomes part of the scene, then this can destroy depth-resolution - puts camera's far plane to almost infinity and this means that almost all objects would have almost the same depth (distance) to the camera (depth is calculated as a fraction of the far plane distance - using 32 bit float value).

Can you try to set the size of that object to a normal object's size and then check if your problem is fixed.

I fixed that error (i needed to filter some invalid data) and checked the dump, no more strange SceneNode bounds but the error keeps occurring, I'm working on an example project
#6
This problem was caused by a problem in Ab3d.DXEngine that could occur sometimes in multi-threaded rendering when many objects have the same material and when a lot of the objects are hidden (IsVisible is set to false).

The fix for this problem will be available in the next version of Ab3d.DXEngine that is going to be released in the following days.
Andrej Benedik
  


Forum Jump:


Users browsing this thread:
1 Guest(s)