Possible bug in render depsgraph for object_instances #60771
Labels
No Label
Interest
Animation & Rigging
Interest
Blender Cloud
Interest
Collada
Interest
Core
Interest
Documentation
Interest
Eevee & Viewport
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
Import and Export
Interest
Modeling
Interest
Modifiers
Interest
Nodes & Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds, Tests & Devices
Interest
Python API
Interest
Rendering & Cycles
Interest
Sculpt, Paint & Texture
Interest
Translations
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Meta
Good First Issue
Meta
Papercut
Module
Add-ons (BF-Blender)
Module
Add-ons (Community)
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
3 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender-addons#60771
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Hi again.
Encountering some odd behavior and I'm not sure if it's a bug or not.
I'm pulling the matrix_world variable of all instances in the depsgraph 'object_instances' that are true instances, generated by either a particle system or a dupli object. Both have motion between frames (so all the instances are moving):
for reference self.bl_depsgraph is the render depsgraph.
I'm doing this at two frame locations, frame 8 and frame 8.5. I am advancing the frame using the Scene.frame_set(frame, subframe) method.
For one instance_object, here's what I get:
As you can see the matrix is identical at both frame positions despite the instance)object in question having movement.
If, however, I manually advance the frame number in the 3D view and then manually print out the matrix for the same instance using the Python console (and context.depsgraph), I get this:
Here there is a difference, as expected.
I'm not sure if this is a bug or if I'm not calling something correctly. During rendering does the depsgraph update automatically on a frame shift or do I need to trigger it manually?
Here's the full code block. All_times is a list of all the subframes that need to be called, in this case [0.0, 0.5]
Added subscriber: @jdent02
Additionally, this same thing happens if I iterate through depsgraph.objects. Based on the docs I was under the impression that these were references to objects residing in bpy.data.objects but in reality they appear to be a completely independent data blocks that also do not update their transforms when the frame is changed during rendering.
Transforms do export properly with objects that are retrieved through old fashioned bpy.data.objects or depsgraph.scene.objects.
Added subscriber: @lichtwerk
Just to make this a little simpler for everyone looking at this:
Could you just share a simple .blend file that has the animation, working script that show how you get your scene, depsgraph, etc?
(this is just to make sure we a re all on the same page...)
Will mark this as incomplete until we have that...
Thanks Philipp. I’ll get a scene and mock-up to you later today
test_render.zip
Here's a stripped down version of the render plugin. Instead of exporting items it just prints matrix_world
For the scene the cube is a 'real' object and the Suzanne's are duplis. When you run the render you'll see the cube shows different matrices for the two motion steps while the duplis all show the same for both steps.
Added subscriber: @brecht
For rendering, use
engine.frame_set()
instead ofscene.frame_set()
to change the frame.In 2.8 the renderer gets a dependency graph and copy of the scene data that is independent of the editable / viewport data.
Well that's good that it's not a bug. This should be mentioned in the Python API section of the release notes. For addon devs like me there is no mention that you need to use the engine to set the frame now instead of the scene. Then I waste you guys' time posting reports on bugs that aren't bugs.
Changed status from 'Open' to: 'Archived'
Brecht, your suggestion works. Thanks for the input!
I don't mean to sound like a broken record but I would strongly suggest this be mentioned in the release notes. I'm sure the Lux and Radeon guys are probably smart enough to figure it out, but more hobby/average devs like me really rely on those release notes to know what has changed.
Thanks.
I agree, we need better docs for this.
Note that even in 2.7 this function needed to handle some specific cases, but now in 2.8 things break entirely if you don't use it.