I have a vector field in a volume with 3 components ( generated in python ) and want to use it as a ‘force field’ in a wire simulation.
Can someone give me a hint, how to do that ?
The force field node seems to generate its own vector field ..
Wire simulation in vector field
6376 7 4- dulo
- Member
- 383 posts
- Joined: June 2010
- Offline
- goldfarb
- Staff
- 3455 posts
- Joined: July 2005
- Offline
- dulo
- Member
- 383 posts
- Joined: June 2010
- Offline
I just discovered that the fieldforce node accepts a vectorfield node as an input. If that is a possible way then the question is how to feed the vectorfield node with data and how to make the fieldforce influence the wire solver.
The effect I want to achive can be imagined like a ball made of cloth with linear and angular stiffness which works against the force vectors of the given vectorfield provided by a python sop ( which generates the vector field with lots of scipy magic .. )
The effect I want to achive can be imagined like a ball made of cloth with linear and angular stiffness which works against the force vectors of the given vectorfield provided by a python sop ( which generates the vector field with lots of scipy magic .. )
- WhimmY
- Member
- 18 posts
- Joined: Aug. 2013
- Offline
- goldfarb
- Staff
- 3455 posts
- Joined: July 2005
- Offline
- old_school
- Staff
- 2540 posts
- Joined: July 2005
- Offline
Here's an example file showing how to use the Force Field DOP and an external velocity vector field volume to drive the forces.
Every DOP Object can have force sub-data attached to it. If it is there, and it is valid, all solvers (hopefully) will use this force data attached.
You can merge in as many Force type DOPs that you want including several Force Field DOPs to composite multiple fields together. They can be piled on top of each other or spread out across space as smaller vector fields. As long as you have unique data names checked on that is.
You can also add Noise Force DOP, Metaball Force DOP, VOP Force DOP, etc. Look at the Tab > Force menu option to see all the Force type DOPs.
Note that how the simulation object samples in to these Forces varies by simulation solver type. For example RBD objects going through the RBD Solver may use a single point sample (when set to Default) and that is not so good. By setting sampling type to say circle you will get more accurate sampling.
I don't recall off-hand how wires sample in to the forces but the option “Default” seems to be doing a good job.
Every DOP Object can have force sub-data attached to it. If it is there, and it is valid, all solvers (hopefully) will use this force data attached.
You can merge in as many Force type DOPs that you want including several Force Field DOPs to composite multiple fields together. They can be piled on top of each other or spread out across space as smaller vector fields. As long as you have unique data names checked on that is.
You can also add Noise Force DOP, Metaball Force DOP, VOP Force DOP, etc. Look at the Tab > Force menu option to see all the Force type DOPs.
Note that how the simulation object samples in to these Forces varies by simulation solver type. For example RBD objects going through the RBD Solver may use a single point sample (when set to Default) and that is not so good. By setting sampling type to say circle you will get more accurate sampling.
I don't recall off-hand how wires sample in to the forces but the option “Default” seems to be doing a good job.
There's at least one school like the old school!
- dulo
- Member
- 383 posts
- Joined: June 2010
- Offline
Great !!!
Your example seems to work for me. I was playing around with a multisolver setup ( like in the sidefx examples ) and could not make it work.
thanks a lot !!
btw. what is the logic in the connection order of the dop graph ?
I would have connected the force field above the wire solver to provide information before it travels through the solver ..
Is there a rule how the dop graph is evaluated and whats the idea behind it ?
Your example seems to work for me. I was playing around with a multisolver setup ( like in the sidefx examples ) and could not make it work.
thanks a lot !!
btw. what is the logic in the connection order of the dop graph ?
I would have connected the force field above the wire solver to provide information before it travels through the solver ..
Is there a rule how the dop graph is evaluated and whats the idea behind it ?
- old_school
- Staff
- 2540 posts
- Joined: July 2005
- Offline
The DOP graph is all about binding data to simulation objects which then gets evaluated and the results are what you see in the viewport and in the Details View. Details view is read-only for that reason.
As for the logic of wiring the nodes, absolutely you can wire in the forces before the solver. In this simple example, yes you can localize the force to just that single simulation objects. Its all about binding sub-data to the simulation objects.
In more complicated simulations, putting the forces below Merge DOPs that combine simulation objects with their bound solvers makes all those objects get the same force sub-data.
I tend to wire my example files with forces applied after the final merge so that adding additional simulation objects with solvers (say you add an RBD sim or a POP sim), they would all pick up the same forces for consistency.
I hope that makes sense… (I really really need to get OldSchool up and pumping vids and tips again…)
As for the logic of wiring the nodes, absolutely you can wire in the forces before the solver. In this simple example, yes you can localize the force to just that single simulation objects. Its all about binding sub-data to the simulation objects.
In more complicated simulations, putting the forces below Merge DOPs that combine simulation objects with their bound solvers makes all those objects get the same force sub-data.
I tend to wire my example files with forces applied after the final merge so that adding additional simulation objects with solvers (say you add an RBD sim or a POP sim), they would all pick up the same forces for consistency.
I hope that makes sense… (I really really need to get OldSchool up and pumping vids and tips again…)
There's at least one school like the old school!
-
- Quick Links