Obi Official Forum
Help Can Obi Cloth float on water? - Printable Version

+- Obi Official Forum (https://obi.virtualmethodstudio.com/forum)
+-- Forum: Obi Users Category (https://obi.virtualmethodstudio.com/forum/forum-1.html)
+--- Forum: Obi Cloth (https://obi.virtualmethodstudio.com/forum/forum-2.html)
+--- Thread: Help Can Obi Cloth float on water? (/thread-502.html)



Can Obi Cloth float on water? - evera.hart - 24-03-2018

Obi Cloth looks fantastic! Can the cloth float on water (not Obi Fluid, just default Unity water) while a rigidbody sits on top of the cloth? (So the cloth is affected by both the rigidbody and water's waves.) 
Would this be too rendering intensive or is there a way to pre-bake the water and cloth together?
Thanks! Sonrisa


RE: Can Obi Cloth float on water? - josemendez - 24-03-2018

(24-03-2018, 07:26 AM)evera.hart Wrote: Obi Cloth looks fantastic! Can the cloth float on water (not Obi Fluid, just default Unity water) while a rigidbody sits on top of the cloth? (So the cloth is affected by both the rigidbody and water's waves.) 
Would this be too rendering intensive or is there a way to pre-bake the water and cloth together?
Thanks! Sonrisa

Hi!

Yes it can be done. You'd need to use Oni.AddParticleExternalForces to add a upwards force to each cloth particle, proportional to how deep it has sunk. It will be able to support a rigidbody on top of it.

Rendering is not a problem at all with Obi, simulation is. Depending on how dense your cloth mesh is, it can be too intensive (>10000 triangles)

cheers,


RE: Can Obi Cloth float on water? - evera.hart - 30-03-2018

(24-03-2018, 11:14 AM)josemendez Wrote: Hi!

Yes it can be done. You'd need to use Oni.AddParticleExternalForces to add a upwards force to each cloth particle, proportional to how deep it has sunk. It will be able to support a rigidbody on top of it.

Rendering is not a problem at all with Obi, simulation is. Depending on how dense your cloth mesh is, it can be too intensive (>10000 triangles)

cheers,

Thanks so much, I'll try it out!
Is it possible to simulate less triangles for the part of the cloth that is underneath the rigidbody, since the rigidbody will be blocking the cloth from view?
Also, can the cloth emit a glow?
Sonrisa