States and Rigid Bodies question

Discussions about SOFTIMAGEs© Interactive Creative Environment©
Post Reply
Victorcg
Posts: 91
Joined: 26 Jun 2009, 10:59

States and Rigid Bodies question

Post by Victorcg » 12 Feb 2010, 17:55

Hi all. Have issue with simulate rigid bodies and states. It simply doesn't work, though Simulate Rigid Bodies connected to Execute Every Frame slot.
Does anybody know the solution.


P.S. It works with "if" structure, but I want the "States" solution.
Thank You.

grahamef
Posts: 281
Joined: 23 Jun 2009, 21:01

Re: States and Rigid Bodies question

Post by grahamef » 12 Feb 2010, 18:21

The state compounds weren't designed for rigid bodies, so you'll need to set up your own state system. At its core a state is just really an integer attribute used to control which branches get executed on which particles.

I've also discovered that the Simulate Rigid Bodies node will keep simulating any particle that it has already simulated, so instead of having a Simulate Rigid Bodies node for each state, you should use only one for the whole tree. For example, use a Select Case node based on state_id to control state switching behaviour, another Select Case to set forces and other attributes based on state_id, then one Simulate Rigid Bodies node for all particles.

Victorcg
Posts: 91
Joined: 26 Jun 2009, 10:59

Re: States and Rigid Bodies question

Post by Victorcg » 13 Feb 2010, 21:47

Thank You for answer. It is not very coomfortable, but I'll use ''case".

Zarvosa
Posts: 13
Joined: 19 Aug 2009, 23:13
Location: Vancouver, Canada

Re: States and Rigid Bodies question

Post by Zarvosa » 19 Feb 2010, 09:27

You could, if you wanted to, explore inside the "state" node. Within the state node there's a Simulate Particles node built in. You can replace that with Simulate Rigid Bodies and whichever collision objects you need plugged into it.
some cons to this approach though:
- You'd have to do this for each state you use
- you can't mix rigid body and particle simulation nodes (must be either one or the other)
- collisions are a bit less reliable. Not sure why...

Post Reply

Who is online

Users browsing this forum: No registered users and 53 guests