Particles cache ignores animated lifetime #80592

Open
opened 2020-09-08 13:48:06 +02:00 by Juan Gea · 7 comments

System Information
Operating system: Windows-10-10.0.18362-SP0 64 Bits
Graphics card: GeForce RTX 2080 Ti/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 451.67

Blender Version
Broken: version: 2.90.0, branch: master, commit date: 2020-08-31 11:26, hash: 0330d1af29
Worked: not sure if it worked after 2.80, maybe it worked in 2.79, but I'm not sure.

Short description of error
If you animate the lifetime and bake the particles everything in the same blender session everything works correctly, no matter if you bake them to disk or to memory.
When you save the file, and open the file again the particle cache is broken and it's loading all the animation with the lifetime present in the first frame, no matter if it's a disk cache or a memory cache.

Exact steps for others to reproduce the error

Blende file: test.blend

Steps to reproduce:

You can watch the video I did or follow this steps:

Video:particle_lifetime_an_bug.mp4

1.- Open the attached blend file with Blender 2.90 release
2.- Clean the cache if there is one, change some parameter like particle count (don't touch particle lifetime, it's animated)
3.- Bake the animation, and you will see the correct result
4.- create a new file
5.- reload our test file
6.- you will see how the cache is not behaving correctly and it's ignoring the animated lifetime

It's impossible to trustworthy bake particles without this working, because not even the disk cache is working

**System Information** Operating system: Windows-10-10.0.18362-SP0 64 Bits Graphics card: GeForce RTX 2080 Ti/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 451.67 **Blender Version** Broken: version: 2.90.0, branch: master, commit date: 2020-08-31 11:26, hash: `0330d1af29` Worked: not sure if it worked after 2.80, maybe it worked in 2.79, but I'm not sure. **Short description of error** If you animate the lifetime and bake the particles everything in the same blender session everything works correctly, no matter if you bake them to disk or to memory. When you save the file, and open the file again the particle cache is broken and it's loading all the animation with the lifetime present in the first frame, no matter if it's a disk cache or a memory cache. **Exact steps for others to reproduce the error** Blende file: [test.blend](https://archive.blender.org/developer/F8854036/test.blend) Steps to reproduce: You can watch the video I did or follow this steps: Video:[particle_lifetime_an_bug.mp4](https://archive.blender.org/developer/F8854053/particle_lifetime_an_bug.mp4) 1.- Open the attached blend file with Blender 2.90 release 2.- Clean the cache if there is one, change some parameter like particle count (don't touch particle lifetime, it's animated) 3.- Bake the animation, and you will see the correct result 4.- create a new file 5.- reload our test file 6.- you will see how the cache is not behaving correctly and it's ignoring the animated lifetime It's impossible to trustworthy bake particles without this working, because not even the disk cache is working
Author

Added subscriber: @juang3d

Added subscriber: @juang3d
Author

I suspect the problem is in the file:

Particle_System.c

In the line 1325:

void psys_get_pointcache_start_end(Scene *scene, ParticleSystem *psys, int *sfra, int *efra)
{
  ParticleSettings *part = psys->part;

  *sfra = max_ii(1, (int)part->sta);
  *efra = min_ii((int)(part->end + part->lifetime + 1.0f), max_ii(scene->r.pefra, scene->r.efra));
}

Because it takes a static value of the part->lifetime variable, but it's just a suspicion, I'm not sure.

I suspect the problem is in the file: > Particle_System.c In the line 1325: ``` void psys_get_pointcache_start_end(Scene *scene, ParticleSystem *psys, int *sfra, int *efra) { ParticleSettings *part = psys->part; *sfra = max_ii(1, (int)part->sta); *efra = min_ii((int)(part->end + part->lifetime + 1.0f), max_ii(scene->r.pefra, scene->r.efra)); } ``` Because it takes a static value of the part->lifetime variable, but it's just a suspicion, I'm not sure.

Added subscriber: @mano-wii

Added subscriber: @mano-wii

I can confirm the problem.
I tested it in 2.79 and it used to work.
Here the file for 2.79:
particle_cache_bug_279.blend

I can confirm the problem. I tested it in 2.79 and it used to work. Here the file for 2.79: [particle_cache_bug_279.blend](https://archive.blender.org/developer/F8863318/particle_cache_bug_279.blend)

Changed status from 'Needs Triage' to: 'Confirmed'

Changed status from 'Needs Triage' to: 'Confirmed'

Added subscriber: @ichlubna

Added subscriber: @ichlubna

Is there any progress? The lifetime of particles still can't be animated - tested in 3.5.0 Alpha. I tried to simply animate the particles lifetime. It works fine in the 3D viewport, even after baking, even when rendering still image anywhere in the timeline, but when I try to render animation, the lifetime doesn't change and is stuck at the value of the first frame of the animation.
If you open the attached file, bake and render as animation, you can see that it doesn't change while playing it in the viewport looks OK.
particles.blend

Is there any progress? The lifetime of particles still can't be animated - tested in 3.5.0 Alpha. I tried to simply animate the particles lifetime. It works fine in the 3D viewport, even after baking, even when rendering still image anywhere in the timeline, but when I try to render animation, the lifetime doesn't change and is stuck at the value of the first frame of the animation. If you open the attached file, bake and render as animation, you can see that it doesn't change while playing it in the viewport looks OK. [particles.blend](https://archive.blender.org/developer/F13946021/particles.blend)
Philipp Oeser removed the
Interest
Nodes & Physics
label 2023-02-10 08:46:33 +01: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 project
No Assignees
3 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#80592
No description provided.