taichi_houdini icon indicating copy to clipboard operation
taichi_houdini copied to clipboard

Support per-particle physical properties

Open Eydcao opened this issue 2 years ago • 0 comments

Imagine a scenario when user bumps a light elastic ball into a heavier elastic ball. This may be solved by super-sampling in the heavier ball, but will bring more troubles (like stable condition).

More accurately, and desiring to give the user more control, per-particle physical property should be supported in the ti-element-sovler.

Ti-Element end

  1. Instead of using a single member variable, use ti.Field for the following parameters: p_vol(when ppc is not 2**dim, vol is different), p_rho, p_mass, p_Lambda, p_mu
  2. Modifying the following kernel: P2G, G2P (and/or G2P2G) where it uses the old member variables, now use p_var[p_index]

Houdini-end

  1. the creation of each property (as point attribute) and reading from SOP node (as np array) is already supported
  2. say if property X is already supported in ti-element-end, remember to fill the obtained np array for X to solver before step(frame_dt); after step(frame_dt), export from solver to np array, then set SOP node point attribute from this np array.

Eydcao avatar Sep 24 '21 04:09 Eydcao