2dFilter actuator is always pulsed #18070

Closed
opened 2008-12-10 10:11:26 +01:00 by Dalai Felinto · 9 comments

Group: current SVN version
Category: Game engine

%%%To test this bug you will need:

  1. EnableFilterBUG.blend (attached)
  2. a graphic card with GLSL support
  3. a building environment with debug enable
  4. recent svn and some minutes (not so much)

To test the bug add 2 breakpoints in the file RAS_2DFilterManager.cpp

  1. line 477: [need_tex_update=true;]
  2. line 419: [SetupTextures(need depth, need luminance);]

In my system, even though I'm not using a pulsed sensor, the function UpdateFilter() is being called every frame (more than once I think).
Then the function EnableFilter is been called as well.

In EnableFilter the first BP is called and consequently the second one (it's a code that runs if need_tex_updte == true).

According to my understanding of this part of the code, this is not supposed to be happen and can be causing some real performance decreasing for 2dfilters. I hope I'm wrong, but if the breakpoints never stop been called, then ... Houston we have a problem :)

Blender SVN (ie 17752) Windows Vista 64, cmake + MSVC, NVidia 9600%%%

**Group**: current SVN version **Category**: Game engine %%%To test this bug you will need: 1) EnableFilterBUG.blend (attached) 2) a graphic card with GLSL support 3) a building environment with debug enable 4) recent svn and some minutes (not so much) To test the bug add 2 breakpoints in the file RAS_2DFilterManager.cpp 1) line 477: [need_tex_update=true;] 2) line 419: [SetupTextures(need depth, need luminance);] In my system, even though I'm not using a pulsed sensor, the function UpdateFilter() is being called every frame (more than once I think). Then the function EnableFilter is been called as well. In EnableFilter the first BP is called and consequently the second one (it's a code that runs if need_tex_updte == true). According to my understanding of this part of the code, this is not supposed to be happen and can be causing some real performance decreasing for 2dfilters. I hope I'm wrong, but if the breakpoints never stop been called, then ... Houston we have a problem :) Blender SVN (ie 17752) Windows Vista 64, cmake + MSVC, NVidia 9600%%%
Author
Owner

Changed status to: 'Open'

Changed status to: 'Open'

This task was automatically closed as archived as part of migration, because the project or tracker this task belonged to is no longer active.

This task was automatically closed as archived as part of migration, because the project or tracker this task belonged to is no longer active.
Member

%%%Indeed there is an error with the 2D filter actuator: it stays enabled and runs on each frame, which results in the shader program to be recompiled each time... big performance waste.

Hopefully the fix is extremely simple.
Replace the "return true" at line 77 of SCA_2DFilterActuator.cpp by:

  // once the filter is in place, no need to update it
  return false;

That's it.
Can you test the fix will all the shader stuff that you have?
%%%

%%%Indeed there is an error with the 2D filter actuator: it stays enabled and runs on each frame, which results in the shader program to be recompiled each time... big performance waste. Hopefully the fix is extremely simple. Replace the "return true" at line 77 of SCA_2DFilterActuator.cpp by: ``` // once the filter is in place, no need to update it return false; ``` That's it. Can you test the fix will all the shader stuff that you have? %%%
Author
Owner

%%%Benoit so far I tested and this fix helps.
I want to run some more tests though.

And I asked Mike (Pan) to test with some of his shaders as well. As soon as we get a position I let you know.

Thanks a lot !%%%

%%%Benoit so far I tested and this fix helps. I want to run some more tests though. And I asked Mike (Pan) to test with some of his shaders as well. As soon as we get a position I let you know. Thanks a lot !%%%
Member

%%%I did not receive more feedback so I assume the fix is working.

Fix commited in trunk and ticket closed
%%%

%%%I did not receive more feedback so I assume the fix is working. Fix commited in trunk and ticket closed %%%
Member

Changed status from 'Open' to: 'Archived'

Changed status from 'Open' to: 'Archived'
Author
Owner

%%%Sorry about the lack of feedback. I was trying to talk with zaghaghi about that, but I couldnt find him online since then.

Your fix solves the problem of the 2dfilter been called every logic tic.
We are still re-creating the textures every frame though, instead of only copying. But this is something that was introduced in the last zaghaghi commit (17469) - http://lists.blender.org/pipermail/bf-blender-cvs/2008-November/016678.html

It was introduced as a bug fix, so the better would be to talk with zaghaghi directly.

Thanks Benoit %%%

%%%Sorry about the lack of feedback. I was trying to talk with zaghaghi about that, but I couldnt find him online since then. Your fix solves the problem of the 2dfilter been called every logic tic. We are still re-creating the textures every frame though, instead of only copying. But this is something that was introduced in the last zaghaghi commit (17469) - http://lists.blender.org/pipermail/bf-blender-cvs/2008-November/016678.html It was introduced as a bug fix, so the better would be to talk with zaghaghi directly. Thanks Benoit %%%
Member

%%%The commit that you refer to is not on the same file: I patched SCA_2DFilterActuator.cpp while the commit is about RAS_2DFilterManager.cpp.

I am pretty sure of my fix but I will pass the ticker to Zaghaghi to let him comment on that.
%%%

%%%The commit that you refer to is not on the same file: I patched SCA_2DFilterActuator.cpp while the commit is about RAS_2DFilterManager.cpp. I am pretty sure of my fix but I will pass the ticker to Zaghaghi to let him comment on that. %%%

%%%hi benoit,

thank you for fixing the bad bug ;), i should take care of these mistakes.

%%%

%%%hi benoit, thank you for fixing the bad bug ;), i should take care of these mistakes. %%%
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
4 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#18070
No description provided.