Fluids solved on the GPU every frame, inside the same engine that runs the games: fire and smoke on a sparse grid, water made of particles, and smoke that can take the shape of any model. They collide with the physics, light the scene and cast shadows. Every video is recorded from the engine in real time, in the VfxLab test bench.Fluidos resueltos en la GPU en cada fotograma, dentro del mismo motor que mueve los juegos: fuego y humo en una rejilla dispersa, agua de partículas y humo que puede tomar la forma de cualquier modelo. Chocan con la física, alumbran la escena y proyectan sombras. Todos los vídeos están grabados del motor en tiempo real, en el banco de pruebas VfxLab.
Three simulations running together on the GPU, in real time. The fire and the smoke live on a sparse grid that only exists where there is something to simulate; the water is made of particles. An air zone with a swirl holds the water as a shell around the flame, the fire is seen through the water, and where the water touches the flame it cools it and the heat leaves as steam. The cloud casts its shadow on the floor.Tres simulaciones a la vez en la GPU, en tiempo real. El fuego y el humo viven en una rejilla dispersa que solo existe donde hay algo que simular; el agua son partículas. Una zona de aire con remolino sujeta el agua como una cáscara alrededor de la llama, el fuego se ve a través del agua y, donde el agua toca la llama, la enfría y el calor sale como vapor. La nube proyecta su sombra en el suelo.
Scanned stones, rocks and branches drop into the orb one at a time, released by a Lua script. They are rigid bodies with a convex hull collider, and the water and the smoke see them as obstacles: each one punches through the shell, the shell closes behind it and the smoke takes a while to clear.Piedras, rocas y ramas escaneadas caen en el orbe una a una, soltadas por un guion en Lua. Son cuerpos rígidos con un collider de envolvente convexa, y el agua y el humo los ven como obstáculos: cada uno atraviesa la cáscara, la cáscara se cierra detrás y el humo tarda en irse.
Water as particles solved on the GPU. The surface is drawn either in screen space, with a narrow-range filter and ellipsoidal particles so the drops do not look like spheres, or as a real mesh built with marching cubes. Foam, spray and bubbles come from diffuse particles, and the foam is drawn as a lace that travels with them. The water pushes the dynamic bodies and makes them float, and it shares its obstacles with the smoke.Agua de partículas resuelta en la GPU. La superficie se dibuja en pantalla, con un filtro de rango estrecho y partículas elipsoides para que las gotas no parezcan esferas, o como una malla de verdad hecha con marching cubes. La espuma, el rocío y las burbujas salen de partículas difusas, y la espuma se dibuja como un encaje que viaja con ellas. El agua empuja los cuerpos dinámicos y los hace flotar, y comparte sus obstáculos con el humo.
The fire burns fuel on the sparse grid: heat makes the gas rise, vorticity keeps its curls and the burning leaves smoke and soot behind, each with its own colour. The glow comes from the temperature of the gas. The light it casts on the scene is taken from the simulation itself, the flame bends with the wind of the air zones and collides with the colliders, and it renders in both the rasterizer and the path tracer.El fuego quema combustible en la rejilla dispersa: el calor hace subir el gas, la vorticidad conserva sus rizos y lo que arde deja humo y hollín, cada uno con su color. El brillo sale de la temperatura del gas. La luz que echa sobre la escena se toma de la propia simulación, la llama se dobla con el viento de las zonas de aire y choca con los colliders, y se dibuja tanto en el raster como en el path tracer.
One component gives the smoke the shape of any model. The engine computes the signed distance field of its mesh once and caches it; the smoke is drawn towards that surface, fills it as a hollow skin with streaks and keeps moving inside, while a loose outer layer is combed by the wind. Here a column rises, becomes a face and dissolves again, in an eight-second loop. The same code works for a bust, a horse or a cat.Un componente da al humo la forma de cualquier modelo. El motor calcula una vez el signed distance field de su malla y lo guarda en caché; el humo se ve atraído hacia esa superficie, la llena como una piel hueca con vetas y sigue moviéndose dentro, mientras una capa suelta por fuera la peina el viento. Aquí una columna sube, se vuelve una cara y se deshace, en un bucle de ocho segundos. El mismo código sirve para un busto, un caballo o un gato.
The shape follows the blend shapes of the model: for each one the engine stores how the distance field changes, so the smoke opens its mouth, smiles and blinks with the face. The motion of the face also pushes the smoke: the air at the skin moves with it, so the smoke at the mouth travels with the mouth instead of lagging behind. The visemes carry their timing to match a voice, the hollows of the eyes, nose and mouth are darker, and the hair is a second, thinner shape.La forma sigue a los blend shapes del modelo: para cada uno el motor guarda cómo cambia el campo de distancia, así que el humo abre la boca, sonríe y parpadea con la cara. El movimiento de la cara además empuja el humo: el aire de la piel va con ella, así que el humo de la boca viaja con la boca en vez de llegar tarde. Los visemas llevan su tiempo para ir con una voz, lo hondo de los ojos, la nariz y la boca sale más oscuro, y el pelo es una segunda forma, más fina.
Everything the engine doesTodo lo que hace el motor See the path tracerVer el path tracer