Wrong Motion Blur with Rigid Body Simulation / Point Cache #40017

Closed
opened 2014-05-04 03:01:25 +02:00 by Kai Kostack · 26 comments

System Information
Windows 7 x64 and Linux

Blender Version
Broken: Probably with introduction of deformation motion blur.

Short description of error
Motion blur together with rigid body simulation produces wrong and arbitrary blurred images.

Exact steps for others to reproduce the error

A .blend file is attached with a cube as test rigid body and motion blur enabled.

  1. Step a few frames forward to generate some simulation data and motion
  2. Click "Deformation" checkbox in motion blur panel
  3. Render image, again and again and again... see the differences. Some extreme renders are attached here.
  4. Notice also that the rigid body continues the simulation one frame at a time although you're rerendering the same frame

cube_bugtest.blend

sample1.png

sample3.png

sample4.png

sample2.png

**System Information** Windows 7 x64 and Linux **Blender Version** Broken: Probably with introduction of deformation motion blur. **Short description of error** Motion blur together with rigid body simulation produces wrong and arbitrary blurred images. **Exact steps for others to reproduce the error** A .blend file is attached with a cube as test rigid body and motion blur enabled. 1. Step a few frames forward to generate some simulation data and motion 2. Click "Deformation" checkbox in motion blur panel 3. Render image, again and again and again... see the differences. Some extreme renders are attached here. 4. Notice also that the rigid body continues the simulation one frame at a time although you're rerendering the same frame [cube_bugtest.blend](https://archive.blender.org/developer/F86841/cube_bugtest.blend) ![sample1.png](https://archive.blender.org/developer/F86842/sample1.png) ![sample3.png](https://archive.blender.org/developer/F86844/sample3.png) ![sample4.png](https://archive.blender.org/developer/F86843/sample4.png) ![sample2.png](https://archive.blender.org/developer/F86845/sample2.png)
Author

Changed status to: 'Open'

Changed status to: 'Open'
Author

Added subscriber: @KaiKostack-3

Added subscriber: @KaiKostack-3

#41654 was marked as duplicate of this issue

#41654 was marked as duplicate of this issue
Member

Added subscriber: @scorpion81

Added subscriber: @scorpion81
Member

Hi,

i have been drilling down to pointcache.c regarding to this bug.... seems to be an one-liner.

in

static void ptcache_rigidbody_interpolate(int index, void *rb_v, void **data, float cfra, float cfra1, float cfra2, float *old_data)

replace the call to

psys_interpolate_particle(-1, keys, (cfra - cfra1) / dfra, keys, 1);

by

interp_v3_v3v3(keys->co, keys[1].co, keys[2].co, (cfra - cfra1) / dfra);

That fixed it for me under linux and windows... in my fracture branch. Just a suggestion where to look at.

Hi, i have been drilling down to pointcache.c regarding to this bug.... seems to be an one-liner. in ``` static void ptcache_rigidbody_interpolate(int index, void *rb_v, void **data, float cfra, float cfra1, float cfra2, float *old_data) ``` replace the call to ``` psys_interpolate_particle(-1, keys, (cfra - cfra1) / dfra, keys, 1); ``` by ``` interp_v3_v3v3(keys->co, keys[1].co, keys[2].co, (cfra - cfra1) / dfra); ``` That fixed it for me under linux and windows... in my fracture branch. Just a suggestion where to look at.
Author

Tested on Windows. Works in part but the simulation still continues on rerendering and then produces still artifacts.

It's important that you check the motion blur checkbox in the object properties once beforehand, because this somehow triggers the effect.

Good start though.

Tested on Windows. Works in part but the simulation still continues on rerendering and then produces still artifacts. It's important that you check the motion blur checkbox in the object properties once beforehand, because this somehow triggers the effect. Good start though.
Sergej Reich was assigned by Brecht Van Lommel 2014-05-06 14:42:32 +02:00

Added subscriber: @brecht

Added subscriber: @brecht

Ok, this doesn't seem to be related to deformation motion blur, for example changing the Pass Index, or using Blender Internal has the same problem. What I guess happens is that changing any object property causes a dependency graph update, which then somehow causes problems with the rigid body cache.

The usage of psys_interpolate_particle is indeed a problem because the velocity in ParticleKey is used but not initialized for the old_data case.

Generally for rendering with motion blur, the simulation should be baked in advance.

Ok, this doesn't seem to be related to deformation motion blur, for example changing the Pass Index, or using Blender Internal has the same problem. What I guess happens is that changing any object property causes a dependency graph update, which then somehow causes problems with the rigid body cache. The usage of `psys_interpolate_particle` is indeed a problem because the velocity in `ParticleKey` is used but not initialized for the `old_data` case. Generally for rendering with motion blur, the simulation should be baked in advance.

Added subscriber: @JonathanLampel-4

Added subscriber: @JonathanLampel-4

I am running into the same issue, and my simulation was baked in advance before using motion blur. Everything worked fine for a while, but it decided to act up today. Is there any way to workaround this?
Motion_Blur_Bug.jpg

I am running into the same issue, and my simulation was baked in advance before using motion blur. Everything worked fine for a while, but it decided to act up today. Is there any way to workaround this? ![Motion_Blur_Bug.jpg](https://archive.blender.org/developer/F105520/Motion_Blur_Bug.jpg)
Author

Looks like the bug is back. I can confirm that my test blend file doesn't work anymore, too. The cube disappears completely now despite a fully baked simulation.

Tested with Blender 2.71 for Win64, Hash: 9337574

Looks like the bug is back. I can confirm that my test blend file doesn't work anymore, too. The cube disappears completely now despite a fully baked simulation. Tested with Blender 2.71 for Win64, Hash: 9337574

Can't reproduce issues with baked sim with either 2.71 or master. Are there specific steps I can follow?

Can't reproduce issues with baked sim with either 2.71 or master. Are there specific steps I can follow?
Author

No specific steps, load the cube_bugtest.blend into Blender and render animation (baking is optional). After the first frame the result should look like one of the wrong examples above.

When in doubt if there's a bug, try on windows.

No specific steps, load the cube_bugtest.blend into Blender and render animation (baking is optional). After the first frame the result should look like one of the wrong examples above. When in doubt if there's a bug, try on windows.

Ok, can reproduce now.

Ok, can reproduce now.
Added subscribers: @gandalf3, @KevinMossey, @ThomasDinges, @Sergey

◀ Merged tasks: #41654.

◀ Merged tasks: #41654.
Member

I've managed to reproduce this too, with a simulation baked from the scene panel in 2.71 (It's inconsistent though, attempting to do it in a fresh file failed).
The exact same file/cache renders correctly in 2.69.

I've managed to reproduce this too, with a simulation baked from the scene panel in 2.71 (It's inconsistent though, attempting to do it in a fresh file failed). The exact same file/cache renders correctly in 2.69.
Member

This bug is still present in 2.72 RC1. The exact same file/cache appears fine in 2.70 as well as 2.69.

This bug is still present in 2.72 RC1. The exact same file/cache appears fine in 2.70 as well as 2.69.

Added subscriber: @SenHaerens

Added subscriber: @SenHaerens

Added subscriber: @dragostanasie

Added subscriber: @dragostanasie

Confirmed on 2.72 (0334be9)

The cube is either transparent or completely disappears.

Confirmed on 2.72 (0334be9) The cube is either transparent or completely disappears.
Member

This bug is still here in 95182d1, (2.72).
Enabling deformation motion blur doesn't seem necessary to reproduce the issue.

Not to complain or anything, but this makes it impossible to render rigid bodies with motion blur in 2.71+, which means that it's necessary to revert to 2.70 to render rigid body sims.
This makes it difficult and awkward to render anything with rigid bodies and newer features like volumetrics.

Any chance of this getting fixed by 2.73?

This bug is still here in 95182d1, (2.72). Enabling deformation motion blur doesn't seem necessary to reproduce the issue. Not to complain or anything, but this makes it impossible to render rigid bodies with motion blur in 2.71+, which means that it's necessary to revert to 2.70 to render rigid body sims. This makes it difficult and awkward to render anything with rigid bodies and newer features like volumetrics. Any chance of this getting fixed by 2.73?

I feel you brother !
..however Cycles no longer has a dedicated core developer and this is not an easy task to fix.
Dark days are coming.

I feel you brother ! ..however Cycles no longer has a dedicated core developer and this is not an easy task to fix. Dark days are coming.

This is not a Cycles bug as mentioned by Brecht and Sergey in this and the merged report. ;)

This is not a Cycles bug as mentioned by Brecht and Sergey in this and the merged report. ;)

Should be fixed by f7dedbc

Should be fixed by f7dedbc

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'
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
11 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#40017
No description provided.