Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How do I set softbody particle phases in OBI 5.0?
#1
Pregunta 
I am trying to get soft bodies in the same solver to collide with each other.  Here is what I know so far.

So without the Particle Editor menu how do I do per actor edits on particles? Is there any way to access the Particle Editor on softbodies and set particle phases?

Is the concept of particle phases deprecated? is there some other way I should be getting actors on the same solver to collide?

Thanks!
Reply
#2
(02-05-2020, 11:08 PM)IanWoskey Wrote: I am trying to get soft bodies in the same solver to collide with each other.  Here is what I know so far.

So without the Particle Editor menu how do I do per actor edits on particles? Is there any way to access the Particle Editor on softbodies and set particle phases?

Is the concept of particle phases deprecated? is there some other way I should be getting actors on the same solver to collide?

Thanks!

UPDATE: 

So I was able to partially answer this question and get two softbodies interacting. I found the option in the blueprint editor for setting phases, and created a duplicate of my bleurprint with particles set to a new phase.

[Image: IlT3Y2A.gif]

So with that proof of functionality out of the way I can refine my original question.

Is it possible to set particle phases per blueprint/softobdy instance in editor? I have ~20 softbodies in scene and I would rather draw from a single blueprint.

Alternatively is it possible to instance a blueprint through script with different particle phases at run time? I havnt been able to find anything in the coding API related to blueprints but I assume I just have no idea where to start.

Thanks
Reply
#3
Blueprints are assets, and their behavior is quite close to that of prefabs: modifying a blueprint at runtime has no effect on existing instances.

When instantiating a blueprint, all per-particle properties stored in blueprint are copied over to the solver arrays. At runtime, the data in the solver arrays is what's being used.

So, no need to mess with blueprints. You could simply set the particle phases of your actors at runtime, using the particle API:
http://obi.virtualmethodstudio.com/tutor...icles.html

Luckily, the actor class has a convenience method for that:

Quote:actor.SetPhase(phase);

You can see it being used in the ActorSpawner.cs sample script, in the BallPool sample scene: all balls are instantiated from the same blueprint, and their phase set right after instantiation.
Reply