Page MenuHome

Add pressure forces to cloth sim
Needs ReviewPublic

Authored by Sebastian Parborg (zeddb) on Tue, Aug 13, 4:23 PM.

Details

Summary

Here is my port of T30941 to blender 2.8.

This adds the ability to simulate air pressure inside a closed cloth surface.

I think it should be good to go. Perhaps a bit more polishing on the UI is needed.

Diff Detail

Event Timeline

Jacques Lucke (JacquesLucke) added inline comments.
source/blender/makesdna/DNA_cloth_types.h
102

I think this property names can be improved. cloth_pressure does not make much sense to me. Why not just call it something like air_pressure_difference?

For the others: initial_volume and pressure_factor (factor seems to fit better than scale here imo).

source/blender/makesrna/intern/rna_cloth.c
785

Don't shorten names unnecessarily.

Sebastian Parborg (zeddb) marked 2 inline comments as done.Wed, Aug 14, 10:10 AM
Sebastian Parborg (zeddb) updated this revision to Diff 17091.

Simplified the volume calculation method and unified the method into a new math function.
I made the other parts of blender that uses this method use this function as well.