Obi Official Forum
Volume Blueprint Problem - 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: Volume Blueprint Problem (/thread-1570.html)



Volume Blueprint Problem - apapaxionga - 18-12-2019

When fix the value of particle radius, the change of particle overlap will change the particle representation of the object (particle size will change). However, when fix the value of particle overlap value, the change of particle radius parameter doesn't make any difference on the particle representation.  I want to have a high resolution particle representation of a small object. Is there any way to achieve this rather than increase the scale of the input mesh ?

I also tested setting particle overlap to 0 and set the particle radius to different value. The particle representation still the same (particle radius did not change if I use very small value for particle radius). It looks like there is a limit on voxelization resolution, right ?


RE: Volume Blueprint Problem - josemendez - 18-12-2019

(18-12-2019, 10:43 AM)apapaxionga Wrote: When fix the value of particle radius, the change of particle overlap will change the particle representation of the object (particle size will change). However, when fix the value of particle overlap value, the change of particle radius parameter doesn't make any difference on the particle representation.  I want to have a high resolution particle representation of a small object. Is there any way to achieve this rather than increase the scale of the input mesh ?

I also tested setting particle overlap to 0 and set the particle radius to different value. The particle representation still the same (particle radius did not change if I use very small value for particle radius). It looks like there is a limit on voxelization resolution, right ?

Hi,

Yes, there's a limit on voxelization resolution.

This is to prevent apparent hangups when someone tries to voxelize a mesh using a very small particles, which can take a lot of time (hours sometimes). Constraint generation is O(n^2) in the amount of particles because we need to batch them in mutually independent sets, and particle count in O(n^3) in the voxel count per axis. (Btw, in case you aren't familiar with big-O notation: https://en.wikipedia.org/wiki/Big_O_notation)

I might change this hard-limit to a warning in the inspector, to allow for use cases like yours. For now you can change the limit in line 56 of  ObiSoftbodyVolumeBlueprint. Change the "32.0f" to any max  number of particles per axis you want to allow.

Code:
// Calculate voxel size so that no more than 32^3 particles are created:
Vector3 boundsSize = Vector3.Scale(inputMesh.bounds.size, Vector3.one);
float voxelSize = Mathf.Max(boundsSize.x / 32.0f, boundsSize.y /32.0f, boundsSize.z /32.0f, particleRadius * 2 * (1 - particleOverlap));