Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
'2D' Meshes for Softbodies
#4
(16-09-2022, 02:49 AM)woffles Wrote: i've read about backface culling before, just wasn't exactly sure if that was controlled by Unity or within the obi simulation. thanks for the clarification!

Hi there!

Backface culling is performed by the GPU during rendering, Obi does not perform any rendering of its own since it's a physics engine.

(16-09-2022, 02:49 AM)woffles Wrote: I got the flat '2D' mesh working after messing around with the solver and a model for a few hours. The anisotropy setting seems to have helped in preventing the softbody from collapsing on itself. When I am performing a ObiSoftbody.Teleport(), it seems to work as intended but the function complains about an ArgumentOutOfRange exception, with some index inside the BatchCount bounds to blame. Not really sure why this is happening since the moving seems to work fine.

I am supplying a Vector3.zero and softbody.transform.rotation to the function.

Tested this, could reproduce when teleporting an object with multiple constraint batches, thanks for reporting this! Line 202 in the ObiSoftbody.cs script should be:

Code:
sc.batches[i].orientations[batchOffset + j] = rotOffset * sc.batches[i].orientations[batchOffset + j];

instead of:

Code:
sc.batches[j].orientations[batchOffset + i] = rotOffset * sc.batches[i].orientations[batchOffset + j];

let me know if I can be of further help,
Reply


Messages In This Thread
'2D' Meshes for Softbodies - by woffles - 13-09-2022, 12:01 AM
RE: '2D' Meshes for Softbodies - by josemendez - 15-09-2022, 07:37 PM
RE: '2D' Meshes for Softbodies - by woffles - 16-09-2022, 02:49 AM
RE: '2D' Meshes for Softbodies - by josemendez - 17-09-2022, 10:06 AM
RE: '2D' Meshes for Softbodies - by woffles - 18-09-2022, 03:44 AM
RE: '2D' Meshes for Softbodies - by josemendez - 18-09-2022, 08:54 AM
RE: '2D' Meshes for Softbodies - by woffles - 18-09-2022, 10:15 AM
RE: '2D' Meshes for Softbodies - by josemendez - 18-09-2022, 11:19 AM
RE: '2D' Meshes for Softbodies - by woffles - 18-09-2022, 11:46 AM
RE: '2D' Meshes for Softbodies - by josemendez - 18-09-2022, 01:03 PM