3D World

Handling the WIND

-

Simulation TD Olivier Soares offers more insights on the wind effects For the self- occlusion, we take all the hairs and create a signed distance field out of it. For each hair particle, we raymarch against the wind direction with a step dx and we basically sum the density of hair that we are traversing and divide it by the total hair density. occlusion = f (density_ traversed / total_ density) If we take the function f(x) = x, we simply have: occlusion = density_ traversed / total_ density

Directiona­l winds are the most simple types of wind we can have. If we have such wind (with D as the direction), we simply have for each raymarchin­g position p: wind( p) = D

Since the wind is not spatially varying, we don’t have to sample it for each raymarchin­g step. But we can also have more complex spatially varying wind models. In this case, we have to sample the wind direction for each raymarchin­g step and update our raymarchin­g direction. The way we are using this is generally by pre-simming generic winds and saving the result in a voxel cache. We are then re-using those wind simulation­s in various shots and basically adding the occlusion component to it. Thus we don’t have to do any complex computatio­n in the wind field – we just read the pre-simmed data for each raymarchin­g position p: wind( p) = intensity * readWind( p) This is for self- occlusion ( ie. hair-to- hair occlusion). To calculate the occlusion with the body, or with different elements of the sets ( a tree, a wall, and so on), we use exactly the same method. We just add those different objects into the signed distance field. Since some objects will occlude the wind more than others ( a brick wall will occlude the wind more than hair, for example), we multiply their density by a scalar. For example, hair has a density multiplier of 0.1, the leaves of a tree 0.6, a brick wall 10.0, and so on.

Once we have our occlusion value for the hair particle p, the final value of the wind field is then: wind_ force( p) = (1 - occ( p)) * wind( p)

This main short- coming of this method is that we only change the wind intensity. We do not change the wind direction – for example, to have the wind being redirected around the head and then combining on the opposite side would be interestin­g, but will also mean needing wind simulation for each shot as the animation will change the way the wind interacts with the body.

It would be interestin­g to compare this method with a real wind simulation and see how much components are added and if it’s worth the extra computatio­n time. The main advantage of this method is that it’s extremely fast. Depending on the type of structure we are using to store and manipulate the volumetric data, we can get very fast performanc­es. We can use a structure optimised for fast voxel access like the ones exposed in the OpenVDB library.

There is no heavy computatio­n as most of the algorithm is only about sampling a volumetric data structure. And if we combine this with a generic wind simulation that has been pre-simmed, we can get very compelling results.

 ??  ??

Newspapers in English

Newspapers from Australia