WIP: Fix #117408: only take speakers into account that are visible on evaluated objects #118800

Draft
Jacques Lucke wants to merge 3 commits from JacquesLucke/blender:invisible-speaker into blender-v4.1-release

When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.
Member

Iterating over all the duplis here is fairly expensive in some cases. Once we know the behavior we want, we could also implement a more optimized iteration mechanism that skips many unnecessary objects.

It's also the first time I'm touching anything related to the speaker objects, so not entirely sure what the expected behavior is.

This patch also allows outputting multiple instances of a speaker.

Iterating over all the duplis here is fairly expensive in some cases. Once we know the behavior we want, we could also implement a more optimized iteration mechanism that skips many unnecessary objects. It's also the first time I'm touching anything related to the speaker objects, so not entirely sure what the expected behavior is. This patch also allows outputting multiple instances of a speaker.
Jacques Lucke added 1 commit 2024-02-27 14:00:18 +01:00
Author
Member

Adding Sergey as an initial reviewer here, not sure who knows this stuff. Feel free to suggest someone else.

Adding Sergey as an initial reviewer here, not sure who knows this stuff. Feel free to suggest someone else.
Jacques Lucke requested review from Sergey Sharybin 2024-02-27 14:02:26 +01:00
Sergey Sharybin reviewed 2024-02-27 14:27:51 +01:00
@ -1193,2 +1191,3 @@
DEG_ITER_OBJECT_FLAG_LINKED_VIA_SET;
deg_iter_settings.flags = DEG_OBJECT_ITER_FOR_RENDER_ENGINE_FLAGS;
DEG_OBJECT_ITER_BEGIN (&deg_iter_settings, object) {
if (object->visibility_flag & OB_HIDE_VIEWPORT) {

Intuitively this check should only be done for viewport mode of the depsgraph, and the final render should ignore the viewport visibility.

Intuitively this check should only be done for viewport mode of the depsgraph, and the final render should ignore the viewport visibility.
JacquesLucke marked this conversation as resolved
Jacques Lucke added 2 commits 2024-02-28 10:58:38 +01:00
Author
Member

Unfortunately, this doesn't seem to work with the "Render Audio"/"Mixdown" operator yet. It ignores anything I do in geometry nodes.
I tried to dynamically enable/disable a speaker. It does work with normal playback in the viewport though.

image

Unfortunately, this doesn't seem to work with the "Render Audio"/"Mixdown" operator yet. It ignores anything I do in geometry nodes. I tried to dynamically enable/disable a speaker. It does work with normal playback in the viewport though. ![image](/attachments/d6be8733-69e6-40e9-a08b-0bcb34f88af6)
179 KiB

@JacquesLucke I don't think the Mixdown operator actually takes care of dependency graph updates. It just gets the state of audio at the invokation, and mixes that down. That'd probably be nice to address, but sounds like a bigger scope that this PR.

@JacquesLucke I don't think the Mixdown operator actually takes care of dependency graph updates. It just gets the state of audio at the invokation, and mixes that down. That'd probably be nice to address, but sounds like a bigger scope that this PR.
Author
Member

It does some to take the depsgraph into account a little bit in sound_bake_animation_exec but not sure how that relates to the rest exactly...

It does some to take the depsgraph into account a little bit in `sound_bake_animation_exec` but not sure how that relates to the rest exactly...

It is only done to access evaluated scene, and from there scene_eval->sound_scene. The rest happens in the Audaspace, which does not take care of the Blender's scene updates.

It is only done to access evaluated scene, and from there `scene_eval->sound_scene`. The rest happens in the Audaspace, which does not take care of the Blender's scene updates.
This pull request is marked as a work in progress.
This branch is out-of-date with the base branch

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u invisible-speaker:JacquesLucke-invisible-speaker
git checkout JacquesLucke-invisible-speaker
Sign in to join this conversation.
No reviewers
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
2 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#118800
No description provided.