Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Is a mesh requried?
#1
Pregunta 
Hi, I am a new Obi user and I am trying to use the Obi Softbody package.

Am I bound to use a mesh to generate a volumetric softbody? Or can I somehow build an arbitrary rigged volume without a mesh?

My characters are procedural (editor time) and I wish to write my own render for the volume and thus do not care for any skinned or original mesh.

/Arni
Reply
#2
Hi Arni,

Using the included blueprint generator yes, you need to use a mesh. This is because it's by far the most straightforward way to define an arbitrarily shaped volume for particle generation, regardless of whether you use a mesh for rendering or not.

Note that rendering and simulation are completely decoupled in Obi, you can use completely different meshes for generating the blueprint and rendering the softbody. Typically you will always use a mesh to generate the blueprint, but using a mesh for rendering is completely optional: just don't add a ObiSoftbodySkinner component to your softbody, and render it some other way.

You could write an entirely custom blueprint generator, but that's probably more complex than just creating a mesh that encloses the volume you wish to generate particles in, and pass that to the included blueprint generator. This depends on how complex it is to create a mesh that encloses your volume is for your use case, though.

kind regards,
Reply
#3
Hi Jose,

I appreciate the quick responds! I see your point and I need to further investigate Obi features and code to figure how to best incoporate Obi into my pipeline.

I am currently exploring writing my own blueprint generator and own actor. And so far so good. However, I am curious as to why it was not until I had added the ConstraintUser interfaces to my custom actor before the constraint defined in the blueprint generator started working?
EDIT: I am asking this because I could not find any reference as to where these interfaces are used other than some Merge method.

Furthermore, assume I have a long Obi rod and I want to vary the stretch compliance accross the particles of the rod; then I can use the index parameter defined in IStretchShearConstraintsUser.GetStretchShearCompliance to return the appropriate complience value depending on that index param?

/ Arni
Reply
#4
(04-11-2022, 08:31 PM)ArniA Wrote: However, I am curious as to why it was not until I had added the ConstraintUser interfaces to my custom actor before the constraint defined in the blueprint generator started working?
EDIT: I am asking this because I could not find any reference as to where these interfaces are used other than some Merge method.

Hi!

The Merge method you discovered has a very important role: when an actor is added to the solver, its constraints must be merged with the constraints of other actors in the solver for efficient data layout and parallelization, this is done on a per-batch fashion (see: http://obi.virtualmethodstudio.com/manua...aints.html). These "merged" batches used by the solver may contain constraints belonging to different actors, which allows it to work simultaneously on constraints of multiple different softbodies to maximize performance.

Batches of different constraint types in the solver will ask the actor for their constraint data, by checking if they implement the corresponding IWhateverConstraintsUser interface. If an actor does not implement this, the solver will assume the actor doesn't contain constraints of that type and they won't be considered by the solver during simulation.

(04-11-2022, 08:31 PM)ArniA Wrote: Furthermore, assume I have a long Obi rod and I want to vary the stretch compliance accross the particles of the rod; then I can use the index parameter defined in IStretchShearConstraintsUser.GetStretchShearCompliance to return the appropriate complience value depending on that index param?

Yes, that should work.

kind regards,
Reply