Can't read existsing Smoke cache #35541

Closed
opened 2013-05-27 21:03:29 +02:00 by Atomic · 11 comments

%%%--- Operating System, Graphics card ---
Window 7 x64 8Gb
nVidia gtx460 1Gb

- Blender version with error, and version that worked ---

2.67

- Short description of error ---

I have two scenes. One is called smoke_domain_writer and the other is called smoke_domain_reader.
I want to generate a smoke cache in one BLEND file and then read that data and use it in another.
I assumed that is what the External checkbox is for in the Smoke Cache panel for the Domain.

- Steps for others to reproduce the error (preferably based on attached .blend file) ---

Open up the attached BLEND smoke_domain_writer and click the Bake button. Wait for the cache to be generate then close that file.
Open up the attached BLEND smoke_domain_reader and browse to the folder where the smoke cache was just generated.
Click Play and nothing happens.

It would be nice if the smoke cache worked like the fluid cache and you could browse to existing data to display it in other files or scenes.

Is Blender supposed to be able to read it's own Smoke cache?

%%%

%%%--- Operating System, Graphics card --- Window 7 x64 8Gb nVidia gtx460 1Gb - Blender version with error, and version that worked --- 2.67 - Short description of error --- I have two scenes. One is called smoke_domain_writer and the other is called smoke_domain_reader. I want to generate a smoke cache in one BLEND file and then read that data and use it in another. I assumed that is what the External checkbox is for in the Smoke Cache panel for the Domain. - Steps for others to reproduce the error (preferably based on attached .blend file) --- Open up the attached BLEND smoke_domain_writer and click the Bake button. Wait for the cache to be generate then close that file. Open up the attached BLEND smoke_domain_reader and browse to the folder where the smoke cache was just generated. Click Play and nothing happens. It would be nice if the smoke cache worked like the fluid cache and you could browse to existing data to display it in other files or scenes. Is Blender supposed to be able to read it's own Smoke cache? %%%
Author

Changed status to: 'Open'

Changed status to: 'Open'

%%%Miika, could you please check on this?%%%

%%%Miika, could you please check on this?%%%

%%%if your cache files have a name like 536D6F6B6520446F6D61696E_000001_00.bphys , the _000001 is the frame number... and the name is 536D6F6B6520446F6D61696E, so enter 536D6F6B6520446F6D61696E into the file name part once the file path is set up and it should recognize it.

bit fiddly but it works%%%

%%%if your cache files have a name like 536D6F6B6520446F6D61696E_000001_00.bphys , the _000001 is the frame number... and the name is 536D6F6B6520446F6D61696E, so enter 536D6F6B6520446F6D61696E into the file name part once the file path is set up and it should recognize it. bit fiddly but it works%%%

%%%Hey,

I just started debugging this and immediately noticed that you have two slashes in front of the cache filename ("//smoke_test"). Naturally slashes are not allowed in file names so it fails there. When I changed cache name to "smoke_test" without slashes, it started to work.

Can you verify if this "fixes" it for you too?%%%

%%%Hey, I just started debugging this and immediately noticed that you have two slashes in front of the cache filename ("//smoke_test"). Naturally slashes are not allowed in file names so it fails there. When I changed cache name to "smoke_test" without slashes, it started to work. Can you verify if this "fixes" it for you too?%%%
Author

%%%You suggested solution does not seem to work for me on Windows 7 64bit.

I pulled down the two attached files to my desktop and opened up the smoke domain writer and removed the two slashes as you suggest. I clicked the bake button and I did get a smoke cache created on my desktop. It plays back fine in the writer.

The problem is in the reader. Even if I remove the slashes from the reader filename I still get "No valid data to read."

Can you post your working version of the reader for us to verify?

Thanks for looking into this.%%%

%%%You suggested solution does not seem to work for me on Windows 7 64bit. I pulled down the two attached files to my desktop and opened up the smoke domain writer and removed the two slashes as you suggest. I clicked the bake button and I did get a smoke cache created on my desktop. It plays back fine in the writer. The problem is in the reader. Even if I remove the slashes from the reader filename I still get "No valid data to read." Can you post your working version of the reader for us to verify? Thanks for looking into this.%%%

%%%Writer.blend seems to have two domains, so the one you need to change is that external one (domain_reuse). Then I saved both files with "correct" cache file names, baked the writer and reader seemed to work fine.%%%

%%%Writer.blend seems to have two domains, so the one you need to change is that external one (domain_reuse). Then I saved both files with "correct" cache file names, baked the writer and reader seemed to work fine.%%%

%%%Or wait... Actually it does indeed use the "domain_bake" object cache. :)

What seems to be the key here, is to reload the reader file after changing the file name. If I just change it I get "no valid data to read". But after save + reload it loads fine.%%%

%%%Or wait... Actually it does indeed use the "domain_bake" object cache. :) What seems to be the key here, is to reload the reader file after changing the file name. If I just change it I get "no valid data to read". But after save + reload it loads fine.%%%
Author

%%%Confirmed success!
You are correct, if I remove the // from the file name it does not work.
If I remove the // from the file name, save and reload, it does work.

My guess there is still a bug in there, however. It seems to me what is happening is that when the smoke cache read tries to open a file and fails (file not exist), it fails to close that file and thus all subsequent attempts to read from a new file name are moot because of a hung file handle.

It would be nice if you could change the file name without having to close and re-open blender. This way scripts could, in theory, change the cache to point to a new file on a frame_change event.%%%

%%%Confirmed success! You are correct, if I remove the // from the file name it does not work. If I remove the // from the file name, save and reload, it does work. My guess there is still a bug in there, however. It seems to me what is happening is that when the smoke cache read tries to open a file and fails (file not exist), it fails to close that file and thus all subsequent attempts to read from a new file name are moot because of a hung file handle. It would be nice if you could change the file name without having to close and re-open blender. This way scripts could, in theory, change the cache to point to a new file on a frame_change event.%%%

%%%Good point, I will investigate that name change issue tomorrow. It likely affects all Blender tools that use point cache (external) so better get it fixed.%%%

%%%Good point, I will investigate that name change issue tomorrow. It likely affects all Blender tools that use point cache (external) so better get it fixed.%%%

%%%Committed a fix in r58830. I'm closing this now, but feel free to reopen if you find another related issue.%%%

%%%Committed a fix in r58830. I'm closing this now, but feel free to reopen if you find another related issue.%%%

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
4 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#35541
No description provided.