Where does Blender report on fluid simulation bake completion time?
Asked
Active
Viewed 621 times
1
-
2I don't seem to remember this.. What versions do you think did this? – gandalf3 Mar 15 '14 at 06:20
-
I've checked older versions and don't see it either. Is there a log file or other location containing this info? I'm experimenting with simulation settings affect on bake time but I bake overnight and thus cannot use a stop watch. – futurehack Mar 15 '14 at 19:12
-
What about using a script or something? – gandalf3 Mar 15 '14 at 22:36
-
Thanks for your response gandalf3. However, I would like to know if Blender natively reports this information before I explore scripting. – futurehack Mar 15 '14 at 23:07
1 Answers
2
I don't know of any bake times being displayed.
To work out the bake time of a simulation that you have already baked, look in the cache folder and compare the earliest modified date to the latest modified date, the difference is how long it took to bake.
It isn't hard to setup a timer yourself. Rather than start the bake by pressing the bake button, you use a simple script that runs the bake operator and has timing around it.
import bpy
import time
startTime = time.process_time()
bpy.ops.fluid.bake()
timeToBake = time.process_time() - startTime
print("Time to bake the fluid sim was",timeToBake,"seconds")
This will print the time to the console - that is the terminal you started blender in. Alternatively you can paste the above code into blenders python console to see the result there when it is finished.
You also use wallclock timing with something like --
print("Start - ",time.strftime("%Y-%m-%d %H:%M:%S"))
print("End - ",time.strftime("%Y-%m-%d %H:%M:%S"))
around the fluid.bake
sambler
- 55,387
- 3
- 59
- 192
-
Thanks for the script sambler. Unfortunately, I am unfamiliar with Python scripting. I ran the script from the Python Console and the Text Editor and in both cases Blender which reports that the bake took 1.4 seconds (unlikely as I've a resolution of 200). Without changing any settings, when I click the Bake button, it takes all night. Am I meant to insert variables into that script? – futurehack Mar 18 '14 at 05:08
-
The line
bpy.ops.fluid.bake()is the same code that gets run when you press the fluid bake button, running the script as it is should bake the fluid sim just the same as clicking the bake button. The fluid domain would need to be the selected object, I get an error if it isn't selected. Does entering thebpy.ops.fluid.bake()command by itself into blenders python console start the bake? Do you have the()after the bake command? – sambler Mar 18 '14 at 10:37 -
Executing the bpy.ops.fluid.bake() command into the Python Console comes back with {'FINISHED'} within a second or so. The domain object is selected, and the command includes the (). I've tried using a new, empty cache directory and a different version of Blender but the script command doesn't actually execute the bake for me. Any other ideas? – futurehack Mar 19 '14 at 00:47
-
You have to pass the fluid domain and such. See this post for baking fluid from python. – gandalf3 Jul 31 '14 at 02:50
-
@gandalf3 that depends on what you are doing, this was expected to be run from within blender as an alternative to the bake button and only to give a time taken, an active simulation was therefore assumed to be selected (noted in my first comment) but if run in the background without a gui or for a more robust solution then you would need to specify the context details. – sambler Jul 31 '14 at 03:58