Fix #120421: Animated "Burn metadata into image" ignored during render #120429

Merged
Philipp Oeser merged 2 commits from lichtwerk/blender:120421 into main 2024-04-10 11:19:12 +02:00
Member

Seems like scene RenderData only gets synched once from Scene to
BaseRender in RE_InitState .
Animation on it is only evaluating on the scene, so the the BaseRender
RenderData is not properly updated here.

However R_STAMP_DRAW is part of that and it is the BaseRender
RenderData that is checked in do_render_full_pipeline (not the
Scene one) to determine if we want to stamp.

Later calls to BKE_render_result_stamp_info / renderresult_stampinfo
/ stampdata always get passed the scene, so individual animation stamp
details (such as Render Time) work properly.

So to resolve, use the Scene RenderData (rather than the
BaseRender one) for proper animation update.

NOTE: I noticed a comment about thread safety in RE_InitState, not
sure if this is relevant here
NOTE: this (not updating animation of members of RenderData) might
actually be a problem elsewhere, too -- havent checked on this in detail
though

Seems like scene `RenderData` only gets synched once from `Scene` to `BaseRender` in `RE_InitState` . Animation on it is only evaluating on the scene, so the the `BaseRender` `RenderData` is not properly updated here. However `R_STAMP_DRAW` is part of that and it is the `BaseRender` `RenderData` that is checked in `do_render_full_pipeline` (not the `Scene` one) to determine if we want to stamp. Later calls to `BKE_render_result_stamp_info` / `renderresult_stampinfo` / `stampdata` always get passed the scene, so individual animation stamp details (such as Render Time) work properly. So to resolve, use the `Scene` `RenderData` (rather than the `BaseRender` one) for proper animation update. NOTE: I noticed a comment about thread safety in `RE_InitState`, not sure if this is relevant here NOTE: this (not updating animation of members of `RenderData`) might actually be a problem elsewhere, too -- havent checked on this in detail though
Philipp Oeser added 1 commit 2024-04-09 14:11:11 +02:00
b5aef5615c Fix #120421: Animated "Burn metadata into image" ignored during render
Seems like scene `RenderData` only gets synched once from `Scene` to
`BaseRender` in `RE_InitState` .
Animation on it is only evaluating on the scene, so the the `BaseRender`
`RenderData` is not properly updated here.

However `R_STAMP_DRAW` is part of that and it is the `BaseRender`
`RenderData` that is checked in `do_render_full_pipeline` (not the
`Scene` one) to determine if we want to stamp.

Later calls to `BKE_render_result_stamp_info` / `renderresult_stampinfo`
/ `stampdata` always get passed the scene, so individual animation stamp
details (such as Render Time) work properly.

So to resolve, use the `Scene` `RenderData` (rather than the
`BaseRender` one) for proper animation update.

NOTE: I noticed a comment about thread safety in `RE_InitState`, not
sure if this is relevant here
NOTE: this (not updating animation of members of `RenderData`) might
actually be a problem elsewhere, too -- havent checked on this in detail
though
Philipp Oeser added this to the Render & Cycles project 2024-04-09 14:11:38 +02:00
Philipp Oeser added the
Interest
Render Pipeline
label 2024-04-09 14:11:46 +02:00
Philipp Oeser requested review from Sergey Sharybin 2024-04-09 14:11:51 +02:00
Philipp Oeser requested review from Brecht Van Lommel 2024-04-09 14:11:57 +02:00
Sergey Sharybin requested changes 2024-04-09 16:29:15 +02:00
Dismissed
Sergey Sharybin left a comment
Owner

It should be fine to access re->scene->r for the stamp information. The stamping code itself access fields from scene, so it is unlikely your fix changes anything w.r.t thread safety.

The missing bits I think are the renderresult_stampinfo and do_render_sequencer, where they access re->r.stamp, and it needs to be come re->scene->r.stamp. I think both cases are safe from threading perspective as well, as they do access scene anyway.

It should be fine to access `re->scene->r` for the stamp information. The stamping code itself access fields from scene, so it is unlikely your fix changes anything w.r.t thread safety. The missing bits I think are the `renderresult_stampinfo` and `do_render_sequencer`, where they access `re->r.stamp`, and it needs to be come `re->scene->r.stamp`. I think both cases are safe from threading perspective as well, as they do access scene anyway.
Philipp Oeser added 1 commit 2024-04-10 09:29:34 +02:00
buildbot/vexp-code-patch-lint Build done. Details
buildbot/vexp-code-patch-linux-x86_64 Build done. Details
buildbot/vexp-code-patch-darwin-x86_64 Build done. Details
buildbot/vexp-code-patch-darwin-arm64 Build done. Details
buildbot/vexp-code-patch-windows-amd64 Build done. Details
buildbot/vexp-code-patch-coordinator Build done. Details
5861bbb833
use Scene RenderData in two more places

@blender-bot build

@blender-bot build
Sergey Sharybin approved these changes 2024-04-10 11:12:47 +02:00
Philipp Oeser merged commit 605de2f094 into main 2024-04-10 11:19:12 +02:00
Philipp Oeser deleted branch 120421 2024-04-10 11:19:15 +02:00
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 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#120429
No description provided.