Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Understanding the inner mechanics of softbody
#1
Hi,

I want to use Obi softbody as an input parameter to create a sound effect. I want to use the deformation factor as one of the controlling parameters. I saw DeformationToColors.cs, and I think it is pretty close to what I want to do with the asset, but I am having a little bit of a hard time understanding how it exactly works. Could you explain or point me to the right documentation location?

So, what I did was add and print this information in the loop of the batch.numIndices in DeformationToColors.cs:
logQueue.Enqueue($"Batch {j}, Constraint {i}, Index {k}, Deformation {deformation}, Norm {norms[p]}, Count {counts[p]}");

and this is what was logged in one of the instances
Batch 5, Constraint 2, Index 3, Deformation 0.0003457069, Norm 0.001275539, Count 5

If you could explain what each of the variables corresponds to and how it helped you achieve the colour indexing of the particles, it would be a great help.

PS: I am assuming this post is cleaner without cluttering it with copying and pasting huge chunks of code from the script. If it is confusing, then please let me know, and I will copy-paste the relevant lines so that you don't need to go back and forth between this post and the original script.

Thank you.
Reply


Messages In This Thread
Understanding the inner mechanics of softbody - by whatever - 07-06-2023, 12:45 AM