Raymond and I have recently made progress on the items for this week.
Raymond has coded up a mix of linear quadrature, with added samples, in order to smooth out the separation of strands. I’ll let him speak to that since he is more familiar with it.
Given our discussions last time, we have a new Adhesion-Collision model, with a modified profile on the Cohesion Table we use for lookups. Here are some views of the updates profiles:
We have modified the old table into essentially three regions, best seen from the Adhesion-Collision profile, the first picture above.
Region 1, from d = 0 to dmin (where dmin is the combined radii of two particles), denotes the penetration region. This accounts for everything from overlapping exactly all the way to just barely touching. This region is negative, linearly scaled, so that the two particles will push away from one another. Notably however, past the point of overlapping, when things begin tunneling, there is no special treatment, and particles would begin to push in the wrong direction. Ideally, there is never enough collision-contact drift to allow for that.
Region 2, from dmin to some threshold above dmin (for now 1/4 dmin), is the region when two particles are very close to one another. Normally adhesion would say to keep pulling together closer and closer, but instead now we scale this somehow (for now linearly), between the end of region 1 (contact or dmin) and the beginning of region 3, not worrying about tangent continuity.
Region 3, above the modified range or threshold near dmin, is where the plot remains exactly as it was before, in accordance with the principled profile Raymond derived for the Adhesion force. In order to determine the values for region 2, we look at the bounds of region 1 and region 3, and linearly scale between them.
Therefore there this model presents a few tunable parameters, those being:
- The scale constant, or form, at which region 1 changes
- The scale or profile for region 2
- The threshold or distance at which we transition from region 3 to region 2.
Implementing this new profile, we witness the following comparison videos:
From these videos we can see that the result is somewhat the same, but there is no need to do Collision response with the new Cohesion table.
Qualitative comparisons of different approaches below:
||Original w/ No Collisions
|(Collisions ON, Old Cohesion Table)
-slight separation throughout
|(Collisions OFF, Old Cohesion Table)
|(Collisions OFF, New Cohesion Table)
-very close proximity, touching
(Collisions ON, New Cohesion Table)
-may still want collisions elsewhere
(think dry hairs in contact)
-relatively fast, (few collisions if any)
-very similar to New way
Looking at the number of collisions created from simply changing this table, we get the following below (X is time, Y is #of Collisions) from the vertical tests in the videos:
We are also sub-stepping the hairs in order to prevent penetrations/collision. This helps disperse the dynamics and collision handling of adhesion over several substeps, and effectively lower the timestep of the scene.
The next order of business, as we see it, is as follows:
- Underwater filter on adhesion
- Should we remove collisions altogether from the pipeline, and replace them with our Adhesion-Collision spring model, then we will need a way to handle underwater collisions as well, since the adhesion model does not apply for fully saturated hairs (they do not come together, but move freely, but still cannot penetrate)
- Therefore we can simply continue to apply the non-penetration component of the Adhesion-Collision spring model, which acts as a spring/penalty force to push out collisions.
- We aim to do this by simply applying the adhesion model when the two particles are overlapping, and ignoring its contribution elsewhere while under water
- CCD (with thickness) replacing our instantaneous check
- If we want to take large timesteps, or avoid sub-stepping, or in general be safer about collisions, we will need to switch our detection routine from instantaneous to continuos.
- Additionally, since the adhesion forces begin to act when inside a neighborhood/threshold of the strands, we need a CCD routine with thickness involved.
- In the future we can add additional spring forces to preserve volume based on these CCD tests if necessary, but for now we are assuming all collisions will be treated by the Adhesion-Collision force
- Water sharing between neighboring strands
- Nearby strands with overlapping water regions should share water freely between themselves, so that way they may come apart with some averaged share of the original sum of water
- There are gravitational, frictional, and fluid-mechanical considerations which influence the behavior of sharing water, each of which Raymond is tackling individually to test
- In the future, we may want to combine all of these considerations into one, so there will be no special case code
These are the items we are aware of, and actively working on, but any input or alternative directions will be graciously appreciated.