Help Question about calculating lambda - Printable Version +- Obi Official Forum (https://obi.virtualmethodstudio.com/forum) +-- Forum: Obi Users Category (https://obi.virtualmethodstudio.com/forum/forum-1.html) +--- Forum: Obi Fluid (https://obi.virtualmethodstudio.com/forum/forum-3.html) +--- Thread: Help Question about calculating lambda (/thread-3446.html) |
Question about calculating lambda - littleaa - 09-05-2022 Question about calculating lambda According to the formula in PBD, we just use the sum of the square of gradient to calculate the lambda, but in the code of CalculateLambdasJob in BurstDensityConstraint, it adds the square of the sum of gradient(data[2] * data [2]) too. Is there some reason to add this term ? Code: // self particle contribution to density and gradient: RE: Question about calculating lambda - josemendez - 10-05-2022 (09-05-2022, 02:32 AM)littleaa Wrote: Question about calculating lambda For position-based fluids, the gradient takes a slightly different form depending on whether the particle is a neighbor or not. Check equation 8) here: https://mmacklin.com/pbf_sig_preprint.pdf the square of the sum of the gradients accounts for the case where k == i. kind regards, |