Attempt to speed up smoke sim by writing out collision sdf

   2171   0   1
User Avatar
Member
25 posts
Joined: June 2008
Offline
Hey guys,
I'm currently trying to do a smoke sim that needs to interact with a relatively large number of objects. It seems as if the creation of the collision data(creating the sdf and velocity data) is what takes up a lot of the time for each frame. I thought that since the animation of the objects won't change I could write out this data to speed up the time to calculate from frame to frame. But for some reason the sim takes the same amount of time and sometimes more if it reads in the data I've written out.

Below is a basic breakdown of the sim without writing out data and then reading in the data:

Computing collision data for each frame.
Start Frame 2:
4.57 sec solve smoke/Solver/t_tempsubstep_pyrosolver1_multisolver1_1/buildcollisionmask_pyrosolver1_multisolver1_1_pyrosolver1_t_tempsubstep_3_pyrosolver1_collisions_0 (GAS_BuildCollisionMask)
2.80 sec solve smoke/Solver/t_tempsubstep_pyrosolver1_multisolver1_1/project_1_pyrosolver1_multisolver1_1_pyrosolver1_t_tempsubstep_10_pyrosolver1_velocity_project_1_pyrosolver1_merge1_0 (GAS_ProjectNonDivergent)
0.00 ms 5912 port foreground (persp1)
(434 hidden events)
End Frame 2: 9.30 sec 0.11 Hz
Unaccounted Time: 66.56 ms
Average of 812: 1.36 sec 0.74 Hz

Reading in collision data for each frame
Start Frame 2:
5.61 sec solve smoke/Solver/t_tempsubstep_pyrosolver1_multisolver1_1/project_1_pyrosolver1_multisolver1_1_pyrosolver1_t_tempsubstep_10_pyrosolver1_velocity_project_1_pyrosolver1_merge1_0 (GAS_ProjectNonDivergent)
0.00 ms 5943 port foreground (persp1)
(402 hidden events)
End Frame 2: 9.39 sec 0.11 Hz
Unaccounted Time: 86.85 ms
Average of 820: 1.52 sec 0.66 Hz

Thanks must go to Jenny at sidefx for showing me how to set this up. So what I do is run through the simulation once and write out the collision and collisionvel fields. I then read those fields back in and run the sim again. My assumption is that the sim doesn't need to calculate the sdf but just copy the data which should make it faster.

What am I missing here?

Thanks.

Mike

Attachments:
save_collision.hipnc (690.3 KB)

  • Quick Links