Obi Official Forum
Please check out this model, I can't generate Full Body data for it - Printable Version

+- Obi Official Forum (https://obi.virtualmethodstudio.com/forum)
+-- Forum: Obi Users Category (https://obi.virtualmethodstudio.com/forum/forum-1.html)
+--- Forum: Obi Softbody (https://obi.virtualmethodstudio.com/forum/forum-12.html)
+--- Thread: Please check out this model, I can't generate Full Body data for it (/thread-4189.html)



Please check out this model, I can't generate Full Body data for it - spikebor - 28-04-2024

Softbody version 6.5.4
I have test with another character, it can generate just fine.
But this Slime model can not, I have no idea.
This is the error shown:
Code:
IndexOutOfRangeException: Index was outside the bounds of the array.
Obi.ObiSoftbodySurfaceBlueprint+<InsertParticlesIntoVoxels>d__42.MoveNext () (at Assets/Obi/Scripts/Softbody/Blueprints/ObiSoftbodySurfaceBlueprint.cs:323)
Obi.ObiSoftbodySurfaceBlueprint+<Initialize>d__37.MoveNext () (at Assets/Obi/Scripts/Softbody/Blueprints/ObiSoftbodySurfaceBlueprint.cs:168)

Code:
NullReferenceException: Object reference not set to an instance of an object
Obi.ObiActorBlueprintEditor.Refresh () (at Assets/Obi/Editor/Common/Blueprints/ObiActorBlueprintEditor.cs:416)
Obi.ObiActorBlueprintEditor.Generate () (at Assets/Obi/Editor/Common/Blueprints/ObiActorBlueprintEditor.cs:132)

I have created a thread like this in a long time, but I think this is new error, since the old error is patched I supposed.

Link https://drive.google.com/file/d/13TqlniB9fQTkWRiSs4VgfmZEH-j03c2_/view?usp=sharing


RE: Please check out this model, I can't generate Full Body data for it - josemendez - 29-04-2024

Hi!

Just tried your slime mesh on Obi 6.5.4, but I'm unable to reproduce this. It generates the blueprint just fine for me (using default blueprint settings).

Could you share the settings you're using?

kind regards


RE: Please check out this model, I can't generate Full Body data for it - josemendez - 29-04-2024

Could reproduce the issue by adding a root bone to the skeleton in the blueprint editor, then clicking generate.

The issue happens because most bones in your Slime character are far outside of the mesh, and the sampler fails to assign a particle to voxels in the voxelized mesh because they're very far from the voxel mesh bounds.

This can be prevented by performing a bounds check, with no ill effects. Please find attached a patched version of ObiSoftbodySurfaceBlueprint.cs.

let me know how it goes,

kind regards,


RE: Please check out this model, I can't generate Full Body data for it - spikebor - 29-04-2024

(29-04-2024, 09:00 AM)josemendez Wrote: Could reproduce the issue by adding a root bone to the skeleton in the blueprint editor, then clicking generate.

The issue happens because most bones in your Slime character are far outside of the mesh, and the sampler fails to assign a particle to voxels in the voxelized mesh because they're very far from the voxel mesh bounds.

This can be prevented by performing a bounds check, with no ill effects. Please find attached a patched version of ObiSoftbodySurfaceBlueprint.cs.

let me know how it goes,

kind regards,
Yes I did have a root bone set.
The patch you sent does fixed the issue, thank you!
Btw the character Full Body Soft Body and the Obi Bone is somewhat having the same functionality, that is letting character does 2-ways contact with the environment colliders.
If you have to choose for your project, what is your go-to solution?


RE: Please check out this model, I can't generate Full Body data for it - josemendez - 29-04-2024

(29-04-2024, 10:13 AM)spikebor Wrote: Yes I did have a root bone set.
The patch you sent does fixed the issue, thank you!
Btw the character Full Body Soft Body and the Obi Bone is somewhat having the same functionality, that is letting character does 2-ways contact with the environment colliders.
If you have to choose for your project, what is your go-to solution?

Hi,

They're meant for completely different use cases.

Full body softbodies are meant for volumetric objects that can deform, like a character's belly.

ObiBones are meant for thin, long hierarchical structures that can move, but can't deform. Like tails, tentacles, braids, etc. These can move, but you can't squash/compress them like you can with a softbody. They're essentially a solid tube.

kind regards,