Jump to content

[SOLVED] Cloth and wind through window


Recommended Posts

Hi,

 

I want to make such simulation: wind goes through window and the cloth is waving. I want to simulate only the part of cloth that is near opened window. If the window is closed or slightly opened the curtain should waving more gently. As i see the wind can be set for entire cloth only, am i right?

 

Rafal

Link to comment

I want to make such simulation: wind goes through window and the cloth is waving. I want to simulate only the part of cloth that is near opened window. If the window is closed or slightly opened the curtain should waving more gently. As i see the wind can be set for entire cloth only, am i right?

 

yep, you are right. Your use case sounds quite special and I would expect some specific UNIGINE script code will be required to achive the desired effect.

 

For reduced wind influence on curtains farer away from the window you might use PhysicalWind::setLinear/AngularDamping(), so wind intensity will be reduced towards wind box edges.

 

Different wind reactions within parts of a single curtain might be possible by reducing particle mass for particles which should wave stronger. See BodyParticles::setParticleMass(). Alternative idea would be to explictly set particle velocity for unaffected part to 0 via BodyParticles::setParticleVelocity(). In both cases affected particles near/far to opened window could be spatially identified via BodyParticles:getParticlePosition() and some window area boundig box testing.

Link to comment

Just create PhysicalWind inside the opened window. PhysicalWind will affects only inner cloth particles.

 

as always: frustum finds the most simplistic solution...

Link to comment
×
×
  • Create New...