Krakatoa SkinWrap Particle and Mesh Deformations

Available in Krakatoa v1.5.0 and higher

Overview

  • The Krakatoa SkinWrap World Space Modifier allows the deformation of particle clouds with dynamic particle counts and geometry objects with varying topology using animated geometry as the deformation lattice.
  • For technical details, please see the Krakatoa SkinWrap WSM topic.

Deforming Geometry With Geometry

  • In the following simple example, we will explore the deformation of a geometry object using another geometry object.
    • The deforming object MUST have constant topology, because the deformation is calculated by comparing the deformer mesh on a Base (Reference) Frame and the current Frame.
    • The deformed object can have varying topology. It is desirable that the two objects are aligned as well as possible on the Base Frame to avoid artifacts.

Initial Setup

  • Let’s create two similar objects with different topology:
    • A default 4 segments Geosphere primitive with radius of 50 units - shown in green
    • A default 32 segments Sphere primitive with radius of 50 units - shown in blue
  • The two objects have the same center and are thus aligned perfectly:
../../../_images/krakatoa_skinwrap_meshdeform_spheres.png
  • Now let’s add a Bend modifier to the Geosphere (which will be our deformer object)
    • On frame 100, we enable AutoKey and keyframe the Angle of the Bend modifier to 180 degrees:
../../../_images/krakatoa_skinwrap_meshdeform_gsbent.png
  • Let’s add a Krakatoa SkinWrap WSM (let’s call it KSW for short) to the Sphere (which will be our deformed object) and select the Geosphere as the deformer.
    • The Base Frame defaults to 0 - the KSW will compare the vertex positions of the Sphere on frame 0 with the surrounding faces of the Geosphere on frame 0 and calculate the influences on the fly.
    • Then on frame 100, the vertices of the Sphere will be moved according to the new positions of the same faces whose influence was calculated on frame 0, thus deforming the Sphere to match the same shape:
../../../_images/krakatoa_skinwrap_meshdeform_sphereskinwrapped.png

Varying The Deformed Object’s Topology

  • As mentioned already, the topology of the deformed object can change over time without any restrictions.
    • Let’s animate the number of segments in the deformed Sphere from 32 to 128 between frame 0 and frame 100.
    • The images below show frames 25, 50, 75 and 100 - the segmentation of the blue Sphere is increasing, but it is still deforming correctly by the bent green Geosphere:
../../../_images/krakatoa_skinwrap_meshdeform_spheresegsanimation.png

Deforming Offset Geometry

  • So far, the two objects were perfectly aligned on the Base Frame 0 - only their topology was different. This would be the case for example when deforming a high-resolution character with a low-resolution proxy.
  • The KSW will deform the vertices even if they are not close to the deforming surface - after all, the KCM was developed to deform volumes of particles inside (or even outside) of the deforming mesh.
    • To test this, let’s change the radius of the deformed Sphere to 40, thus offsetting it inwards relative to the deforming Geosphere.
    • Even if the Radius were animated over time, the deformation would function as expected.
    • The following image shows frames 0, 50 and 100 of the deformation:
../../../_images/krakatoa_skinwrap_meshdeform_sphererad40.png

Very Low Resolution Lattices

  • Since the influences of the deforming geometry are based on its faces, reducing the resolution of the deforming Geosphere too much will start causing artifacts in the high-resolution deformed object.
    • This is because a single large flat face is influencing very strongly a large number of vertices.
    • The following example shows frame 100 with the Geosphere set to only 2 segments:
../../../_images/krakatoa_skinwrap_meshdeform_gs2segs.png
  • We can try to fix this by tweaking the parameters controlling the influence falloff.
    • The Exponent value was reduced from the default 6.0 to 2.5. This causes the influence of farther faces to increase, favoring the closest face a lot less.
    • The Tessellation value was changed from 1 to 2 - this introduces more smaller faces in the deforming mesh, allowing each vertex of the deformed mesh to find a close face at a shorter distance.
    • The Radius value was changed from the default of 1.5 to 2.5 - this means that each deformed vertex looks for faces at a distance up to 2.5 times the distance to the closest face found. As result, a lot more faces have influence over each vertex, thus smoothing the overall shape. With the Exponent reduced, these farther faces also have higher influence.
    • The following image shows the same frame 100 after the parameter adjustments:
../../../_images/krakatoa_skinwrap_meshdeform_gs2segs_exptweak.png

Rigid Deformations

  • So far, we used the Radius method which searches for the closest face first, then applies influences from all faces within a threshold based on the closest distance to the surface and a Radius multiplier.
  • The second method allows us to deform based on a fixed number of closest faces which is generally faster for interactive work.
    • The default is 4 faces and can go down to 1, producing fully rigid deformations where every vertex is influenced by only one face.
    • If we would set the radio button to Count and default value of 4, we get the following result on frame 100 (using Exponent of 6.0):
../../../_images/krakatoa_skinwrap_meshdeform_rigid4.png
  • And here is the fully rigid deformation with Count set to 1 - it is very ugly, but in general a lot faster to calculate since it reduces the search through the kdtree for faces within the distance threshold.
../../../_images/krakatoa_skinwrap_meshdeform_rigid1.png
  • Increasing the Count to 10 produces smooth results similar to the Radius method. Obviously, we are forcing every vertex to find exactly 10 faces to get influenced by, while the Radius method is adaptive and would find a varying number of faces depending on the Radius value. Thus, when smooth deformations are desired, it is advisable to use the adaptive Radius method.
../../../_images/krakatoa_skinwrap_meshdeform_rigid10.png

Particle Deformations

Deforming Geometry and Deformed Particles

  • The main purpose of the Krakatoa SkinWrap WSM is the deformation of particle clouds by geometry objects.
  • Now that we have seen the basic operation of the KSW when deforming meshes with meshes, let’s take a look at a more complex case.
    • We will use the geometry and animation of a Fu-Lum creature used in the movie Dragonball:Evolution to create a particle cloud that performs the same motion.
    • The image on the left shows the shaded geometry of the Fu-Lum in a base pose on frame 0 (Base Frame for deformations)
    • The image in the middle shows the wireframe of the Fu-Lum geometry - Inner Body, Outer Body (Exo-Skeleton), Hands and Head.
    • The image on the right shows 4 PRT Loaders containing 352,423 particles generated on the base frame 0 using Krakatoa PRT Volume objects:
../../../_images/krakatoa_skinwrap_particles_fulumshaded.png ../../../_images/krakatoa_skinwrap_particles_fulumwireframe.png ../../../_images/krakatoa_skinwrap_particles_fulumparticlesall.png
  • Each of the 4 PRT Loaders is assigned a Krakatoa SkinWrap WSM set to
    • Base Frame 0,
    • Exponent 6.0 (default),
    • Tessellation 1,
    • Count 1 (rigid deformations) - we do this because the deforming geometry is dense enough and produces rather smooth results even when using a single face. At the same time, it increases the performance.

The Animation

  • The wireframe screenshots show frames 5, 10, 15, 20 and 25 of the mesh animation.
  • The particle screenshots show the same frames of the resulting particle animation in the viewport - the PRT Loaders deformed to follow the same animation using four Krakatoa SkinWrap WSMs.
  • The blue background images show the results from Voxel Rendering using Voxel Size 0.25, Voxel Filter Radius 3, Density 5.0/-2:
../../../_images/krakatoa_skinwrap_particles_fulumrun_0005.png ../../../_images/krakatoa_skinwrap_particles_prtloaderrun_0005.png ../../../_images/krakatoa_skinwrap_particles_voxelrender_0005.png ../../../_images/krakatoa_skinwrap_particles_fulumrun_0010.png ../../../_images/krakatoa_skinwrap_particles_prtloaderrun_0010.png ../../../_images/krakatoa_skinwrap_particles_voxelrender_0010.png ../../../_images/krakatoa_skinwrap_particles_fulumrun_0015.png ../../../_images/krakatoa_skinwrap_particles_prtloaderrun_0015.png ../../../_images/krakatoa_skinwrap_particles_voxelrender_0015.png ../../../_images/krakatoa_skinwrap_particles_fulumrun_0020.png ../../../_images/krakatoa_skinwrap_particles_prtloaderrun_0020.png ../../../_images/krakatoa_skinwrap_particles_voxelrender_0020.png ../../../_images/krakatoa_skinwrap_particles_fulumrun_0025.png ../../../_images/krakatoa_skinwrap_particles_prtloaderrun_0025.png ../../../_images/krakatoa_skinwrap_particles_voxelrender_0025.png

Running Smoke Clouds

  • One of the possible reasons to prefer rendering a character as particles instead of geometry faces is if you intend to create a character that appears to be made of smoke.
  • Using the Voxel Rendering mode of Krakatoa, we can render the PRT Loaders as a more or less dense smoke cloud of varying resolution.
    • The examples below show frame 20 rendered with Voxel Size of 0.15, 0.25, 0.50, 1.0, 2.0 and 3.0 with Filter Radius of 3 and Density 5.0/-2:
../../../_images/krakatoa_skinwrap_particles_voxelrender015_0020.png ../../../_images/krakatoa_skinwrap_particles_voxelrender025_0020.png ../../../_images/krakatoa_skinwrap_particles_voxelrender050_0020.png ../../../_images/krakatoa_skinwrap_particles_voxelrender1_0020.png ../../../_images/krakatoa_skinwrap_particles_voxelrender2_0020.png ../../../_images/krakatoa_skinwrap_particles_voxelrender3_0020.png

Growing Gooey Blobs

  • The main use of the Krakatoa SkinWrap SWM during the production of the Dragonaball:Evolution movie was to simulate the growth of the Fu-Lum’s inner body which was made of a goo-like substance.
  • The following workflow was employed:
    • The deformation mesh was animated as usual and a snapshot of it was created on the Base Frame.
    • A Particle Flow system was created and set to use the snapshot mesh as collision object.
    • The particles would move through the volume of the snapshot mesh, spawning trails of more particles and bouncing around until the whole volume was filled with particles.
    • The resulting particle animation was then saved to a PRT file sequence, one for each body part that had to grow.
    • Each PRT Sequence was loaded back using a PRT Loader object.
    • A Krakatoa SkinWrap WSM was added to the PRT Loader and the original animated mesh for the respective body part was selected as the deforming mesh.
    • The resulting deformed particles which were both running the Particle Flow animation of filling up the base frame shape AND deformed to follow the body animation were saved to a new PRT sequence.
    • In theory, these deformed particle sequences could be rendered as a particle cloud or voxels in Krakatoa, but in this particular project, a Particle Mesher (similar to the BlobMesh object in 3ds Max but thousands of times faster) was used to generate an Iso-Surface out of all the animated particles.
    • The following screenshots show the PRT Loader on frames 0,15,30,50,65,90,120 and 140 of the Inner Body growth. The PRT Loader contains 10 different deformed sequences: Inner Body, Inner Head, Outer Head, Left Arm, Left Extra Arm, Left Hand, Right Arm, Right Hand, Left Leg and Right Leg.
../../../_images/krakatoa_skinwrap_particlegrowth_prtloader_0000.png ../../../_images/krakatoa_skinwrap_particlegrowth_prtloader_0015.png ../../../_images/krakatoa_skinwrap_particlegrowth_prtloader_0030.png ../../../_images/krakatoa_skinwrap_particlegrowth_prtloader_0050.png ../../../_images/krakatoa_skinwrap_particlegrowth_prtloader_0065.png ../../../_images/krakatoa_skinwrap_particlegrowth_prtloader_0090.png ../../../_images/krakatoa_skinwrap_particlegrowth_prtloader_0120.png ../../../_images/krakatoa_skinwrap_particlegrowth_prtloader_0140.png
  • The following screenshots show the Frost output from the same frames above, turning the particle cloud into a blobby surface:
../../../_images/krakatoa_skinwrap_particlegrowth_prtmesher_0000.png ../../../_images/krakatoa_skinwrap_particlegrowth_prtmesher_0015.png ../../../_images/krakatoa_skinwrap_particlegrowth_prtmesher_0030.png ../../../_images/krakatoa_skinwrap_particlegrowth_prtmesher_0050.png ../../../_images/krakatoa_skinwrap_particlegrowth_prtmesher_0065.png ../../../_images/krakatoa_skinwrap_particlegrowth_prtmesher_0090.png ../../../_images/krakatoa_skinwrap_particlegrowth_prtmesher_0120.png ../../../_images/krakatoa_skinwrap_particlegrowth_prtmesher_0140.png