Page MenuHome

Add simulation access modifier and integrate with depsgraph
ClosedPublic

Authored by Jacques Lucke (JacquesLucke) on Tue, Apr 28, 11:25 AM.

Details

Summary

This adds a new modifier that will allow copying e.g. particle data from the simulation data block to a point cloud. Currently, the modifier is called "Simulation Access", which I don't really like. Alternative names could be "Copy Simulation Data", "Pull Simulation Data", "Simulation", "Read Simulation Data", ...

We probably want to use the same modifier later on to copy simulation data into mesh/volume/curve/hair objects later on. So, the name should not be specific to particles (although it could be for now).

While it is totally undecided, I might want to add a similar modifier later, that copies data from a data block which contains geometry nodes.

This patch also does an initial integration with the depsgraph. It just makes sure that BKE_simulation_data_update is called before the modifier is evaluated. I added a depsgraph NodeType and OperationCode for this. However, I'm not sure if this is necessary.

Lastly, there is a new depsgraph API function called DEG_add_simulation_relation, which is used by the modifier.

Diff Detail

Repository
rB Blender

Event Timeline

Jacques Lucke (JacquesLucke) requested review of this revision.Tue, Apr 28, 11:25 AM
Jacques Lucke (JacquesLucke) edited the summary of this revision. (Show Details)
  • make sure it can compile without WITH_NEW_SIMULATION_TYPE

Depsgraph side seems fine.

The rest kind of depends on particular design which I am not aware of. But all seems reasonable.

Can this be called just the "Simulation Modifier"?. I'm not sure putting "Access" in there really helps to make things clear for the user.

Can this be called just the "Simulation Modifier"?. I'm not sure putting "Access" in there really helps to make things clear for the user.

I agree. I just made the name so bad that we are forced to rename it ;D
Do you mean to show "Simulation" or "Simulation Modifier" in the Simulate section of the Add Modifier menu?

Naming is indeed tricky due to the modifier category. We could consider renaming the category to Physics?

To me physics is a special case of simulation. However, to resolve this conflict, I think renaming the modifier category to physics is fine.

Besides the naming, this looks good to me.

ok, I'll rename the modifier category in a separate commit. Then I'll rename this modifier to just "Simulation".

  • remove "Access" from name
This revision is now accepted and ready to land.Tue, May 12, 11:27 AM