johnroper100 / CrowdMaster

Crowd Simulation for the Masses
http://crowdmaster.org
GNU General Public License v3.0
133 stars 24 forks source link

Rigid Bodies #11

Closed johnroper100 closed 8 years ago

johnroper100 commented 8 years ago

Any Ida's on how these could be integrated? All other crowd simulators have them.

Peter-Noble commented 8 years ago

The only thought I've had so far on this topic is maybe we could have a state node which when reached turns the agent into a ragdoll and ceases to be simulated by the crowd simulator.

johnroper100 commented 8 years ago

Yea, that makes sense

johnroper100 commented 8 years ago

This could require a custom property on the rig that changes the influence like in this tutorial: https://www.youtube.com/watch?v=HryXEpIz-cg&app=desktop

TheDuckCow commented 8 years ago

You could also accomplish it in the node system which would be quite powerful. Not exactly sure on how generate is setup or when it is triggered, but if there is a node that gets the IDs of simulated items, it could use a function to decide if or when something becomes a rigid body. If it ever does, give it the appropriate physics settings, and then insert keyframes on an according frame - this could even be further modified via a random or other math input node to the rigid body trigger node, which would have the effect of taking the logic of deciding when to apply the cuttover keyframe for being animated versus simulated. In this way, I could also see a way where you could switch to and from rigid body simulations partway, though would be more complicated

Peter-Noble commented 8 years ago

john - Yes I completely agree the user would have to set up collision objects. If the generation ever becomes node based then this would fit really well with that. There could be some nodes related to creating an individual agent, the "create agent" node would then have "display geo", "physics geo" and brain type. The output from the "create agent" node then pipes into the nodes that scatter the agents.

TheDuckCow - Sounds good. I think there are other things we need to finish before doing this but the sort of thing you describe would be great when we get to that point.