SFM Porn Tutorial 3. Detailing and Rendering a loop.

So after a long break we are back to look at finishing up our Tracer animation. In this tutorial we will be looking at ways to add some dynamics to our loop (and ways we can make changes) and rendering the final product (the way I do it at least). Note that once again these ideas are by no means set in stone and may not be the best way to do these steps, it is just how I do it. There are many better animators than me and these tutorials are just here to provide a basic structure.

For those who haven’t read my previous two tutorials this directly follows tutorial 2.

As this is a direct continuation, if you do not already have a version you will need:

Additionally if you wish to just get started from this tutorial I have provided the DMX file here. Note that if you are very new to SFM this may be a bridge too far and I suggest reading my / other tutorials first (or other peoples).

Note: Due to hosting issues some videos were broken. I have fixed them as best I can (my poor planning bit my ass). Sorry for any wrong links.

Now that is out of the way let’s get started. We currently have a pretty simple 3 point loop, with a bit of reactive motion from Tracer (she doesn’t move in perfect sync with Francis, but reacts to when his pelvis meets hers). A lot of this tutorial is open to artistic interpretation. If you want to add move movement, add more movement, experimentation is key to understanding how the models move.

Offset Detail Motion

The first adjustment we will make is to refine Francis. We are basically going to adjust some bones to try and make his movement a bit less robotic. Let’s start with his head…

Generally a person’s head will stay focused on a point even when in motion, so the fact that his head goes up and down in a locked position is one of the first things that throws us off. If we select the head and neck bones we see that we already have three key frames (these are the start of our loop, the beginning of the second loop and the end of our loop) but our lines are flat, cause they have no motion yet (duh…).

image

Now we want to add some movement. The easiest way is to tie the head and neck motion to the motion of his torso. If we hold control we can select his rig_spine_2 bone, and this will give us the point at which his upper body changes direction. We can then put our play head at that marker and hit M. This will create a key frame for our head and neck. Now we want to deselect our spine (hold control and click it) and we are left with a new key frame for our head and neck, located at the point our spine changes direction.

Now we want to add our motion. We are just going to go to our mid frame, and for both our head and neck bones rotate them down so his point of vision stays roughly the same. There is no way or need to make this perfect. You may want to scrub back to the start and through the first iteration of our loop to see if it looks alright (you can hold and drag the play head along the time line to do this).

Since we are making a loop we can now, with our neck and head bones selected:

  • Select our first key frame
  • Holding shift select your mid key frame (you now have the cycle of the first loop selected)

  • Ctrl-c to copy the key frames
  • Move your play head to the middle of your loop

  • Paste our key frames with ctrl-v

We should now have our head and neck movement from loop one copied over to the second one

Note: Beware of moving the head and neck bones together. While this will work on some models reasonably well, on others it won’t. Francis is one such model; if you try to rotate both bones at the same time you will see his head moves away. Plus SFM has a habit of bugging out even when the neck and head are well matched often moving the neck bone a small amount each time. This can lead to the head of your model sinking into the torso.

Now we have our head motion for Francis across our two cycle loop, we want to do what we usually would do here and select all our bones and spline. Once done it should look a bit like this:

basic head movement

Now we can change our mid key frames for our head and neck if we want, either to add some variation between loops or just adjust the motion. If we want the loops to remain identical we can always make changes to one key frame and copy it to another. The only rule is our very first and very last key frames need to stay the same, so our loop is smooth.

At this point it is worth noting that this is the basic approach for most of our minor adjustments, but before we move on to them we are going to use a little trick.

See when we move our heads don’t move in perfect sequence with our bodies, our extremities often lag behind by a little bit. Whip a piece of rope and the whole thing doesn’t move at once. Conversely sometimes we will look at something and our bodies follow. But almost never are they in perfect sync. So we don’t really want our head to be moving at exactly the same position as our upper torso, we want a bit of variation. And this is dead simple to do, since we already have our motion. All we need to do is select one of our mid key frames and move it. As I mentioned at the start there is a wealth of room for interpretation at this point. You could move the key frame 3 or 4 steps before its current position and he would look down earlier, his body following his head. Below you see our playhead at the old position and the key frame moved ahead by 4 frames. The second loop is left in sync with the upper torso.

Or you could move it much later and his head would lag behind. Both of these would create a rolling motion; give it a play around, I’ll wait…

Below is a quick gif of the head motion of the first loop moved 4 frames earlier, while the second iteration has been left in sync with the upper chest as an example.

head in loop one moved, loop 2 in sync

Again, remember we can do whatever we want with our movement so long as our first and last frame are the same. Let’s move our frames back to their “in sync” position. If you have experimented so wildly you have lost that position, you can just redo the motion entirely.

For this we don’t want such an exaggerated movement, but even a little movement will do. Sometimes even one frame can be enough, especially with fast animations. Now we are going to select all our loops internal key frames (ctrl click each one) for the head and neck, and drag them all two key frames to the left.

Note: It is worth mentioning here that we are not moving our starting and stopping frames for each of our loops. Normally we would adjust them and take that into account, but for this tutorial we will just leave our neutral points alone. You will actually find that it is actually the neutral key frames that look wrong.

Now we have our head motion just a little bit offset from our body motion and it looks better! Well I think it does…

Creating offset by look

So we can use the same idea for some of our other bones. For the most part once we have our major body motion (done in the other tutorials) the big things we have left to do are head, shoulders and hands. We have already done our head motion, so next up is shoulders. Here we will use a slightly different (though very similar) approach.

When we did the head we set our motion exactly in line with the upper torso, but in the end we didn’t use that point really, because when everything moves in perfect sync it doesn’t look right. I think this is a key thing most new SFM animators overlook. So for Francis’ shoulder we are not even going to bother with a starting frame and just eyeball it based on the motion we want. Think for a moment about our animation, is Francis pulling or pushing Tracer? In our animation the speed and motion suggest that he is probably pulling her towards him. If that is the case would his shoulder be moving backwards before his chest? I don’t know about you but mine do. So we know we want a point somewhere before our chest’s key frame. At the same time none of the motion is very violent, so they probably wouldn’t be that far ahead. So for this we are going to select a point a little before our mid-point and set a key frame for our left and right shoulder.

Here it is worth mentioning that if we do not want our collar to be in the default position this is where we can adjust it. Once we introduce key frames this is a more difficult job.

Open up the RigArms menu and select both rig_collar_l and rig_collar_r. Now the first thing you will notice is that we currently have no key frames at all for our collar bones. While we don’t care about our middle loop frames, we still need our start, middle and end frames. The easiest way to get these is to use another bone we have already set. In this case I will use rig_spine_2.

  • Move the play head to the start key frame and press M.
  • Next move the play head to the mid point and again press M.
  • Lastly set the final key frame.

We now have key frames for the start of our first loop, the start of our second loop and the end of our animation. If we wanted we could also set our middle loop key frame now and adjust it, there is no one single correct way.

Lastly we will set our mid key frame for our loop, eyeballed to be a bit before the apex of the motion. Move the play head to the desired position and press M to create key frames for the shoulder (remember to deselect spine 2 before doing this, we don’t want unnecessary key frames).

Note: SFM can be buggy. If you hold down the mouse to drag along your play head and try to create new key frames while the button is held you will find that upon releasing the mouse button your key frames will disappear. Just be aware of this “feature”.

Here I have just created one for the first loop as we will just copy the key frames to the second loop. If you want more variation you could do it loop by loop, but be aware this can get complicated fast. Now we just want to make our shoulder adjustments.

Because they move counter to each other you need to move each one separately. In this instance Francis is pulling Tracer towards him, so his shoulders would be moving back a little bit. Make the adjustment to each shoulder (the amount is up to you).

Now that we have made our shoulder motions scrub through it a couple of times and make adjustments until you are happy with it. Now just like the head we will select the shoulder key frames for our first loop, copy them, then past them to the second loop. You know what’s next: spline the animation. Now we have a bit more dynamic upper body.

simple shoulder movement

Be aware that you are not locked in to just 3 key frames. While I will not go into it here, we can get more complicated. For example maybe we want Francis to look like he is holding Tracer. We might move our shoulder frames back even more, then copy them to the end, keeping the one position for longer. The ideas remain the same. A visual example can be found below…

multiple shoulder key frames

We are going to leave hands for now, feel free to play with them on your own the idea remains the same, but our locking provides basic movement already, and any SFM animator will tell you hands are the bane of your existence.

Adjusting Tracer

So now we can adjust our shoulder and head motion we will do the same for Tracer.

I am not going to go step by step for this one but instead provide an outline. Consider using this as an opportunity to play around The actions are exactly the same as those we performed above:

  • Select her head and neck bones.
  • Create key frames for her head and neck at the mid-point in our loops
  • Adjust our position
  • Off set our key frames
  • Copy our first loop across to our second
  • Select our collar bones
  • Set start middle and end key frames, using another bone (rig_spine3 for example) as reference. Remember that because Tracers motion is offset, her middle loop key frames are different. But since we are just eye balling our collar points that isn’t an issue.
  • Set your collar mid-point.
  • Copy her shoulder key frames across to the second loop.

Again remember there is no single way to do this, the motion is entirely up to you, experimentation is essential. Below is an example I have made that implements these same ideas.

Tracer motion added

At this point I have also provided a copy of the DMX it was made with so if you are lost you can open it up and have a look what I did.

You may notice that I have added 2 key frames instead of 1 to her head movement. If you think about the motion there are two key points for Tracer; as she is being pulled back, and as contact is made. So I kept her head relatively stable until the point contact is made, then as she arrives at the end of that motion I added a second key frame and tilted her head up a bit more to help signify added movement.

So now we have motion across most of our major body points (except hands). But you may notice that our main body motion is still in perfect sync and looks a bit weird. This isn’t too bad in our slow loop, but if we had a faster loop you would end up with a single frame where your models entire body changes direction. It is mitigated a bit by our shoulder and head movement not being synced, but we can make our bodies look a bit better as well.

We are basically going to use the same idea as we did to create the offset in our shoulder / head, but we are a bit more constrained. We obviously don’t want to move all our body parts together at the same time, but if we shift them too far apart our models will get weird and jerky. As a general rule, for simple loops shifting rig_spine3 is often enough. Moving it forward will accentuate a pushing motion, while moving its key frames backwards will produce a reactive motion.

So how do we do this? Very easily!

We know that Tracer should be reacting to the thrust, so we want to shift our spine bones a bit right.

Open up Tracers model and select rig_spine3. Select all the key frames between the first and last key frame. Here it does not matter that we are also offsetting our middle because Tracer is already offset.

With the key frames selected shift them 2 steps to the right.

Play through the loop and we see a slight delay in her upper body. But it still doesn’t really look right. All we can do now is play around with our key frame position until we find something that works. Because our loop is quite slow and the motion covered is quite large, this is a case where significant offset will look better. Here I have used 6 steps.

And in motion it looks like this:

Tracer big chest offset

It’s a bit better but still doesn’t look great. That’s because our upper chest is too out of sync with the rest of our body. We need to bring them more into line and we can do this by simply setting the next bone down into a nice “middle ground”.

So we will select rig_spine1 and offset that by 4 steps

And in motion we now get a much smoother reaction:

better offset animation

Now we want to do the same thing with Francis. But here a small change is enough, since we just want to break up the “direction change” point. Remember that Francis is pulling, and for a pull motion we want to move to the left. So a small shift of his spine_2 three key frames to the left should be enough.

And now we have a more nuanced animation overall:

Francis and Tracer detailed

So we can see how these simple changes can turn our quite static reactive motion animation into something that looks a bit more natural. We have used a couple of techniques to create offset and these same techniques in lots of places to do the same thing. Remember that experimentation is at the heart of these ideas, play around with positioning and offsets to find the motions that work for what you are trying to do.

Breaking the rules (and bones)

The last detail device I will touch on is also the most dangerous. As a general rule we don’t want to move bones that shouldn’t move in a human body. We rotate internal bones, move limbs. So we don’t want to move our internal bones as a general rule. If you are just starting out with animating it is a good idea to practice all the other techniques in this tutorial before you play with this idea and to be careful with its implementation. You should have a good grasp of the rules before you break them.

Sometimes we want to get a certain look or position and the only way to get it effectively is to move the internal bones themselves. One of the prime places we can use this idea is in the hips, especially Francis’. At the moment our thrust are quite controlled, without any real oomph on the end. While we could do this with extra pelvis movement this will result in extra speed being placed on the spine, head, etc. However the hip bone can move independently of the pelvis, so we can use this to create our thrust and adding a little extra “push”.

Select Francis rig_hips bone. We want our push to start at about the point where Francis’ thrust meets Tracer, so scrub through to that point and create a key frame.

Next we want to add our “end” push. We want this to be a little bit after Francis starts to move back, since we want him to be finishing his push as he moves back, so move to that point and add another key frame.

Now we want to break our rules, and move our hip bone. We are just going to drag our hip bone forward a bit. This is really just a “by eye” thing, we don’t want to go too far forward, and we want to make sure we don’t see too much abnormal distention in the stomach area (this is one of the things you need to be careful with). Below is a screen shot of the end hip position.

Now copy your first loop to your second so it all fits together. Remember to be careful with this method as it is very easy to end up with a broken model. We now have our completed animation with most of our detail work done (minus facial work and hands and fingers).

final loop

Here is also the DMX of the finished loop.

Final animation thoughts

It is worth noting, as I have repeated throughout, that the key here is practice and experimentation. As you improve you will realize you can remove the vast majority of “3 frame” animation points, adjust all your pivots and bones by eye, and get a much more fluid looking animation. The way I have presented the ideas here are I hope just a simple way to expose you to the concepts, but they are no substitute for practice.

Rendering our loop

Now we need to get our loop out of SFM. Note that I am not going into lighting or moving the camera here, just the process of making the loop. At the moment we have a single 3.2 second loop. We can just render it right now but there are a few things we can do to make our loop come out cleanly.

The first thing we are going to do is select all our models and select all of their key frames

And then we want to copy all of them, move our play head to the last key frame, and paste all our key frames.

Now go to the end key frame and paste again:

We should now have 3 copies of our loop one after the other. Select all the key frames and spline. Why did we do this? Well we really only want the middle one, but one of the common errors people make with loops is they get the middle smooth and forget about the ends. We want to make sure our first and last frame blend nicely together, and by adding a loop before and after we ensure this.

Lastly Tracer has jiggle bones in her hair breasts and butt. If you have read my previous tutorial on jiggle bones you know this will be a problem, and you can see it earlier in the tutorial once we added movement to her head; her hair clips on the loop cycle. We need to bake her bones first, so right click on her model in the animation set editor, open utilities and click “Bake procedural bones”.

Now we want to make our loop cut by blading our shot in the clip editor. To start with select the start point of the last loop in the graph editor.

And change to the clip editor:

We don’t want to actually render the third one of our loops so we will get rid of that. Note we do not lose the information, it just will not be visible. Do this by pressing B, then select the new right hand shot and delete it.

We now want to do the same thing with the first part of our loop. But uh oh! When we blade a shot a lot of the time SFM will screw up where it thinks our key frames and sequences are. You can fix it however by just reloading the dmx. So save your clip and reload to fix this problem.

Now in our graph editor we will see our key frames extend off the shot. This is fine, and is actually something we want! Now we want to get rid of the first part, so again locate the start of the middle loop

And go to the clip editor.

Blade the shot again with B, and delete the first shot this time:

Note that when you do this the remaining shot will shift to the right. And again, we will probably have messed up key frames back in our graph editor, so it’s time for a save and reload.

We now have our single loop on its own. Lastly we want to just check it in SFM to make sure our loop is smooth enough. We want to have SFM play our loop cleanly.

To do this we need to set the film strip. The area outside the shot (the blue outline) is the film strip. IT is actually very important because ONLY things within the film strip will play. This can be a very powerful tool when making loops. For now we are just using a very simple application for it at the end.

In the clip editor we want to drag the empty space of our shot, otherwise it won’t loop properly:

Now click the loop button:

And you should be able to play your file and have it loop

Note that sometimes that you need to press the loop button an extra time to make it work, just SFM things…

Hopefully what we should see now is a nice smooth loop. The last thing we want to do is set up our camera basics. Normally we would want to add camera motion and such here, but since this is just to get the idea we will leave our camera static.

Remember that in order to change any camera settings we cannot be in the Clip editor so head back to the graph or motion editor for this part. Select your camera in the animation set. If it is not there you will need to add it. It will also help to ensure the camera is selected in the camera selection panel.

Note that in the provided DMX’s the camera is part of a group. This will not have any impact on how it functions, it is just to keep the animation set editor tidy.

Normally we would want to change our SSAO bias, strength and radius based on our lighting, set our focal distance to our models and put on some aperture. Note that in order to see how the camera is really viewing the scene you need to go to the clip editor and let SFM load the extra detail. For this example I have just added some basic levels. We can change these levels as we want during an animation just like we would any other sliders.

So now we are ready to render…

Select File -> Export -> Movie

After the save prompt you will be greeted with the export menu.

Choose your path (1) and from the drop down menu (2) select “Image Sequence”. SFM’s default movie encoder is not very good and instead we will use a different one. By rendering an image sequence we can use whatever tools we want to build our video to a much better quality.

Select More Options (3) to expand our choices.

For our simple render we only really care about Depth of Field and Motion Blur boxes. If left alone they will use the camera settings, which we didn’t change so they are set to 0. While increasing these will make our render times much greater they are helpful to making our render look good. As you get better you may find you wish to use different settings (some animators use no motion blur for example). We want to use at least 64 bit for both of them.

Note that these two are especially useful when using volumetric lighting.

We now want to render our image sequence.

Render… Render… Rendering…

Note: below is my way of rendering videos. There are many options available for turning an image sequence into a video, some freeware some not. IF you would rather use a different method like photoshop you can ignore the below section, get your image sequence into the program of your choice and build your video.

So we should now have an image sequence. We can use lots of different programs to render it but personally I use ffmpeg with some script files to create my videos. It is free, lightweight and easily modifiable to webm / mp4’s of varying quality. I use modified version of AreGees scripts (mine just make videos, and have some bat files for converting between video types, I don’t make posters of gifs)

I have included a zip file with my ffmpeg directory and bat’s.

You should be able to extract the zip wherever you want, and go into the ffmpeg/bin folder to find the batch files. As I basically build 1 video file to work with in post processing most of these batch files are for converting between video formats and down scaling.

The one we want to use is PNG_toMp4_24fps.bat because we rendered a 24fps image sequence. For this you will need two windows open, one with the batch files, the other where you saved your image sequence.

In your image sequence folder will be a bunch of png image files, a sound file, and a text file. For building our video we need to change the name of the text file. Currently it will be called “name_of_sequence_mycomputername.txt” where mycomputername is, well, your computer name. We want to change the textfile name to “name_of_sequence.txt” and remove “_mycomputername”, so it is looking for the correct name for the image files.

Now that we have changed the name of our file, just drag the text file on to the PNG_toMp4_24fps.bat file icon. A window should pop up and your video start converting. A folder called “sequencename-video”.

Once our convert is finished we have our mp4 video!

Whew that’s a lot of stuff. I think that marks the general end of this tutorial. If you want to do post work that is up to you, I won’t go into that in these tutorials. I hope these are helpful to people, remember that the ideas remain pretty much the same. One last thing I would mention is that I ignore the motion editor for the most part. For porn we are nearly always working in the graph editor for our general loop movement, and these tutorials are about that, general loop movement.

If you have any questions feel free to drop me a mail or message and I will try to answer them. Have fun!