Create a Muscular bull
Khalil Khalilian shares his process for creating a realistic character simulation using Ziva
Learn how to model a photorealistic bull using Ziva with this step-by-step tutorial from Khalil Khalilian
O ne of the most complex parts of VFX production is rigging, and it can be even more complex when you have to make anatomical body movements. Recently a plugin for Maya was released by Ziva Dynamics called ZIVA VFX. It’s specialised to help you make everything you want for the simulation of a character’s body, including muscles, fat, wrinkles and so on, enabling the creation of advanced deformations in a simple and accurate way. Recently I used Ziva for my muscular bull project and in this tutorial I’m going to show you how I made it.
ZIVA VFX is a simulation engine based on real-world physics and it makes precise collisions and simulations. It uses real-world logic, so all the input data should follow the same principles. For example in the case of modelling, in the real world, two solid objects can never pass through each other. For best results, we want to leverage Ziva’s collision system. In order to make the character simulate correctly, you should always be careful with the intersection between objects before simulation. The bull character was modelled by Ghasem Mollahasani, his knowledge of anatomy really helped me reach this result. Thanks to Hamed Behrouzi for animation and Milad Ghiasi for rendering.
01 research AND reference
The first step of character creation was searching for reference such as pictures, videos of real bulls and anatomical atlases in order to make the final result as realistic as possible. We didn't find all the necessary materials so we watched similar animals to compare them. When the model was completed we created our bone geometry and muscle layout based on our reference data.
02 Model topology
One of the most important modelling considerations for working with character rigging and deformation is mesh topology. You should have clean quad polygon topology without any self-intersections or manifold configurations. This will ensure best results when it comes to sliding and wrinkling deformations. For much better results the topology should be with no muscle definition when it comes to sliding muscles beneath the skin, otherwise the muscles will simply remain in their shapes on the model.
03 Joint layout
As with traditional rigging, you should put joints in the best positions on your model. To determine the correct locations of joints you could use the skeleton model. As mentioned earlier, intersections between objects can have negative effects on your results. Test a range of motion with the bone geometries; aim to minimise intersections as much as possible when they are animated. Be ready to spend a lot of time iterating between the muscle and bone rig. You'll want to spend a good amount of time making sure the joint layout is as good as you can make it, because mistakes at this stage can cause issues during the subsequent simulation passes.
The complete skeleton model should be skinned in a rigid way, because in the real world the skeleton is a hard surface and it shouldn't bend at all. For the spine and rib cage you can use Smooth Bind, but be careful that it doesn't behave as a soft object. Your character's final skin mesh should be skinned for two main reasons: - the animators will be able to realise their animation. - usually we don't simulate all of the parts (like head, tail and foot) so we blend back to the skincluster result for these parts.
05 Animation AND run-up
To work with Ziva you need to add an animation to your skeleton to see how the muscles behave in the simulation. A simple walk cycle is the best movement to start with. The animator does his or her work as usual. Because we’re working with a simulation, there is the concept of run-up to consider. Before the actual animation starts, the character must transition from origin, to the world space position, and then over some frames (I used 15), the character goes from default pose into start pose, and then the animation starts.
The transition to world space can be done over one frame. One simply has to move the solver at the same time as moving the character. Because Ziva physics are solved relative to the solver position/ orientation/scale, if the solver and character are being moved in lock step, the character won’t be torn apart if you move it a long distance over one frame.
let’s start with ZIVA
The only thing Ziva needs to start the simulation is to drive the skeleton objects with animation by alembic cache. So in a new scene, import your alembic cache and then import muscles. From the Ziva menu assign bone to skeleton and tissue to muscles. After you have done this Ziva gives you a zsolver, and you should scale it to the size of your character. In the solver parameters you should enable the collision and change the substeps to 2.
One of the most important elements in the process of character construction are the muscles, because the following simulation passes will be based on this step. Spend a lot of time (the same as joints placement) and try to make them in the best way you can. During this part you should pay attention to: - the muscle attachment. - the form of the muscles in static pose and also in movement. - muscle jiggle. - how to change the shape for tension and compression.
where to begin
I usually work on the muscles one by one because I can optimise my simulation and make it more accurate for each muscle (for this you can use Ziva Toggle Enabled in Ziva Tools to disable the tissues that you're not tweaking). When you set all of your muscles you can mirror them using the Ziva scripts that you can find in the class documentation of Ziva.
ZIVA FIX Attachment
For transferring the skeleton's movement to the muscles you should use the Ziva attachment node. To use it, select the vertices of the area you want to attach to the bone. This attachment works by closest distance. If you want to alter which vertices are attached after you've made the attachment, you can right-click on the mesh and select Paint>[name of attachment]. As well as attaching muscles to bones, with the Ziva attachment node you can also attach muscles to muscles. Use this functionality when you really need it, otherwise your
muscles can look over-constrained and rigid.
After you have started the simulation, if you do not obtain the results you want you have to set some parameters: - In the zmaterial node, there is a parameter called youngsmodulus in which you can set the amount of hardness or softness of the muscles. - In the ztet node, there is a parameter you can set for resolution, but be aware that a high resolution can make your simulation heavy.
After setting parameters, during the simulation it might be the case that some muscles take some distance from the base body. To avoid this problem you could use a sliding attachment. This is similar to the fixed attachment, but the only difference is the muscle can slide on the object it is attached to.
Fiber AND Zlineofaction (loa)
We added the zfiber to define the direction that the muscle will contract. To trigger the zfiber contraction we need to use a node that is called zlineofaction. But first we need to make a curve with the start and the end point at the extremity of the muscle, and then we attach this curve to our bone skeleton with the rivets. After that we select the curve and the zfiber node on the muscle and add the zlineofaction from the Ziva menu.
set Fiber AND loa
To set the extension or compression of your muscles you can change the ‘strength’ parameter in the zfiber node. The resulting excitation depends on the curve’s length (pos), the rate that the curve’s length is changing (vel), and the acceleration of the curve’s length (acc). By increasing the sensitivity parameter on LOA you can multiply the muscle sensibility effect – this value can be different on every muscle.
Muscles: Final step
Once you start to become happy with your results, you should activate the collisiondetection in the zsolver node and also change the substeps to three or four – it depends on how fast the input animation is. By increasing substeps you can achieve a better simulation. At the end you should cache it like you have cached the skeleton, with the alembic system.
We make the fascia for two main reasons: - using the fascia we can transfer all movement of the muscles and the skeleton on only one mesh, and it could help us to optimise the result. - we can get a sliding effect between muscles and skin.
To create the fascia mesh itself, you should shrink the character mesh on a combined version of the muscle and bones mesh by using Maya's shrinkwrap. You can also use the Ziva cloth solver and Maya ncloth to shrink your mesh. Then we smooth the hard edges and also fix any intersections between the fascia and the combined mesh. After that we should retopologise it following the same concept as in step 2.
We import the muscles cache, the bones cache, and the fascia
model with the new topology. We define the combined mesh as a bone, and the fascia as a cloth on the Ziva system. In the zmaterial we have two important parameters: - restscale, default 1 - pressure, default 0 With these two options we simulate Maya’s shrinkwrap deformer, but it will be dynamic. To start we change the restscale to 0.9 and pressure to 40. If you are not happy with the result you can test new values.
prepare For simulation
Turn the gravity off, or keyframe it on over five frames as part of the run-up. Keyframe the restscale envelope and pressure envelope from 0 to 1 over five frames as the start of your simulation. Make sure collisions aren't set higher than something like 1 x 10^6 on the zcloth and all zbones. Increase substeps to more than 7 – try to keep your fascia mesh resolution as low as possible, but not so low that you lose lots of details (the valleys between the muscles). This is because cloth is slower than tissue, and affected primarily by vertex count. As with the previous passes, you should export your result (the simulated fascia pass) by alembic cache.
A fat pass helps us to transfer all fascia movement to our character's model, plus it can simulate extra jiggle on fat. First you should make the fat model. As I said we don't need to simulate all parts of the character, so in this case, we delete the face of the horns, tail and feet in fascia and also the character model, then we combine them and with a polygon bridge we can fill the hole area. It's important that the fat mesh is completely closed and all the normals are painting outward.
simulate the FAT
At first we import the fascia cache and fat in the new scene. After that we should define our fascia as a bone and make the fat as tissue with a high-res tet mesh and soft material. You don't need collisions in this pass so disable collision globally.
For transfer result of cached fascia, on the fat layer, we should connect them by fix attachment, but only the inside of the fat model should be attached to the fascia.
With a skin pass you can add wrinkles on the body during the movement. The skin model is like the fat model but without the combination with fascia. It should be set as zcloth and attached to the cached fat simulation by fix attachment. You will need to paint materials and/or attachments in places where you don't want to see wrinkling effects. Just like with the fat pass you should disable collisions. For better results you should increase the substeps of zsolver.
the skin blend
Wrap a copy of the final skin geo to the skin solve bake (it will be quite messy for the hands, feet and head, but don't worry about that).
Make a blend shape from the animation bake (skin cluster, facial anim) to the skin wrapped to the solve that you made in step 4.
Paint the blendshape envelope anywhere that you want driven by skincluster. In this case we just painted the horns, tail and feet. •
Ghasem Mollahasani Ghasem is a 3D artist with over 10 years’ experience in 3D animation and the video game industry. His main experience is in modelling and texture. He usually likes to sculpt organic models and currently works as a freelancer. ghasemmollahasani.wordpress.com
Khalil Khalilian Khalil is a rigging technical director at MPC with over 12 years of experience in CG. He also has much experience in hair grooming with Yeti. vimeo.com\khalil66