Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

3 Dimensional Chat / Ninja's Blender Cutscene Tutorial

Author
Message
ninja9578
16
Years of Service
User Offline
Joined: 25th May 2008
Location:
Posted: 7th Dec 2008 20:28 Edited at: 21st Dec 2008 17:30
Welcome to Ninja's Cutscene tutorial.

Most gamers believe that a modern game's story is as important as the gameplay. A nonexistent story (like DOOM) or a stupid story (like Mario) doesn't cut it anymore. Some game developers choose to tell a story though in-game interactions, but most of the professionals do it through cutscenes.

Cutscenes provide both the story and a welcome break for the players. Even a great game can lose its power if pieces of it are dragged out, players need a break.

For this tutorial I will be discussing the creation of cutscenes using the free 3D software Blender. A common misconception is that free means that it's not a good as professional solutions, but Blender competes just fine. Spiderman 2 was the first big-name movie to use Blender, and recently more companies have started using it. This tutorial could also be used for Maya, but, due to the price of Maya, if you already have it, you probably don't need this tutorial.

Before this tutorial, it is assumed that you already have a working knowledge of the basics of Blender and have a set plot for your game. This isn't a Blender tutorial per ce, nor is it a story development guide.

Models

Probably the first thing that you will want to do it convert your characters into Blender characters, or make your own. Blender comes with a wide variety of importers from milkshape to .x, if you don't find the importer that you want in what you downloaded, there are many Python scripts on the internet to import almost anything.

Now that you've imported it, you may wish to change it slightly, to make it more Blender friendly. The most obvious first thing to do would be to convert it from a low poly model into a high poly model, this will eliminate sharp points and make everything smoother. Add a subsurf modifier.

The subsurf modifier may drastically change some of your model that you wish to remain the same, flat surfaces will probably be made into curves. The best way to eliminate this problem is to find the edges or planes that you want to stay the way that they are and subdivide them a few times. Each time you do, the subsurf makes less and less changes.

You can choose to apply the subsurf if you wish, I usually just leave it an a modifier so that I can change things later if I wish.

The main character in an FPSC game is never seen except for in cutscenes, so when modeling him or her originally, you don't have to keep framerate in mind and can make him/her as complex as you wish.

Materials

Shaders

For most of the parts of your models, the materials that you've assigned them will work fine. For others, you may wish to add some more advanced options.

You may notice that the default diffuse shader in Blender is the Lambert shader, for consistency, you may want to change it to the same shader that you are using in FPSC. The CookTorr is the default specular shader in Blender, I find that the Phone shader looks better for skin and organic material.

Sub-surface Scattering

For objects made of materials that are semi-permeable to light, you will want to add some sub-surface scattering. If you have close up shots of a character's hands, you may want to add a second skin material with a SSS between each finger, this provides realistic light penetration and scattering.

Sub-surface Scattering



Mirrors

Mirrors are something that can make a scene look fantastic, but they take quiet a long time to render in Blender. If you are using a lot of mirrors, you may wish to choose the yafray rendering engine as opposed to the Blender internal one.

For most mirrors the default depth of 2 will work fine, however if you have a lot of highly reflective materials near each other, you will need to increase the depth.

Most materials have a little bit of a mirror quality, it just tapers off quickly. You need to decide how much time you want to take for rendering. Materials with blurry reflections can make a subtle difference that means the difference between photorealism and obvious CG, but at the default sample rate of 18, it takes a very long time, even bringing the sample rate to 9 or even 4 can take quiet some time.

Transparency

Blender supports two kinds of transparencies: Z-buffer and ray traced. Z-buffering is very fast, but ray-tracing is more photorealistic. For things like windows or anything else perfectly flat, z-buffering is the way to go.

For anything else, you want to do ray traced transparency for the simple fact that it's the only way to do refraction. The first thing that you need to figure out is the alpha level, then you need to find out how much to refract light that passes through the object. There are plenty of lists on the internet with common materials and their iofs (Index of Refraction.)

Like with mirrors, doing a blurry refraction requires lots of samples and therefore, lots of time, so it is advisable to stay away from them.

With coloured objects, you want a coloured shadow. If not all of the light from a material is absorbed, it should cast a coloured shadow. Blender doesn't do this by default. For each material that you want a coloured shadow to fall on you have to go into the material properties and click on the Trashad (Transparent Shadow) button to allow Blender to do that for you.

Trashad and refraction



Lighting

Blender 2.48 introduced a unified lighting system so now all lights have the ability to cast soft shadows. The problem is that they are raytraced so to have a truly soft shadow, you need a high sample rate.

For complex scenes I would recommend leaving the shadows hard and letting the antialiasing soften them. They won't look entirely realistic, but will save you from rendering times in the hours.

All images in this tutorial were rendered with one soft shadow using 6 samples.

Ambient Occlusion

Ambient light is the light that is in a room without the aid of the lamp. It is uniform, except in the immediate vicinity of an object, this is because that object absorbs light. So in corners, there is slightly less light than in an open area, ambient occlusion does this for you. It's a very subtle change that can really add to the realism.

Rigging

Even though Blender can import animated models, I would recommend rigging the model yourself, this gives you more control, especially since Blender has features that some of the other animators don't. There are many good rigging tutorials out there for you to learn from if you don't know how to already.

I recommend creating a backbone with four or five segments to give characters a more realistic bend and rigging every finger so that they can be bent and moved individually.

Make handles for the feet that stick out the back (this makes the IK solver keep the knees pointed forwards and assign IK solvers to the foot handles and the hands. This allows you to simply grab the handle and the rest of the arm will move with it.

Animating

Now that you've got a rigged character and modeled your scene you are ready to animate. Most animation with Blender is done with keyframe animation, which is the best choice for almost everything.

An exception may be a dogfight or long flyby, those should probably be done with spline paths.

The correct speed for your animation is something that's tough to estimate, luckily, blender can render your animation very quickly using traditional graphics. This allows you to see your render in real time. Go into Modeling mode and Shift + click on the Render button. It will use the current CG settings to do a fast render, you can then watch that render to judge your speed.

Physics and effects can dramatically increase the your production values. You can add fire and mist.

Blender also has a physics engine for doing fluid simulations for things like blood and cloth simulations for things like clothing and hair. When doing fluids, remember that you need a domain, the smaller your domain, the easier your simulation will be on the processor, so make it as small as possible.

Rendering

There are some tricks to rendering in Blender that can make your cutscenes look very good. The first thing that you want to do is to ramp up the resolution for rendering. Blender has built in buttons for HD and 4K too I believe, but I use 1200x960. That's a normal 4:3 screen, if your game is widescreen then you should probably use HD.

Make sure that all of the features that you are using are turned on. Raytracing and shadows are on by default, but SSS isn't, so you may need to turn that on if you are using it.

The OSA is how much antialiasing there is, 8 is useful for almost anything, but sometimes you need more or less depending on complexity of the scene and depth of field. You should never turn it off though, it looks terrible. All images in this tutorial were rendered with an OSA level of 8.

The best image format is PNG. It's lossless and very highly compressed, which makes a perfect video, you can use Quicktime Pro or another video converter to make the sequence into a movie that you can use in your game.

Speed

At the bottom of the Render tab there are a number of options that will allow you to dramatically speed up your render. There is a pulldown menu that has the default of 128. This is the octree resolution, it makes raytracing faster or slower. For most scenes, you want 512. I don't know why it's not the default, but it should be.

The next is the X Parts and Y Parts, this is for concurrent rendering. 4x4 is good for computers with just one processor, but for 2 processes you should go 8x8. 4 or 8 processors should go at 16x16, that will insure that your computer is running at 100% at all times.

The lighting is going to be a big power hog, but remember, the number of samples doesn't affect the amount of light, so they can be different for each lamp. For lights that are close to objects in the view field, you can bring the number of samples down, because the shadow will not be as soft as ones that are far away from lights. This will speed up your rendering.

Baking

For long and / or complicated renderings, you will want to bake as much as you can beforehand. Baking is pre-calculating things like ambient occlusion, shadows, and even mirrors (although mirrors are discouraged because they mirror from the normal, and don't take into consideration the camera.) You have to remember that if something moves (the object, the light, or even something that casts a shadow on the object, you can't bake it. Search your scene and you will find things that only need to be rendered once, bake it and forget it, it will seriously speed up your rendering.

Nodes

Blender has some really nice tools for post production that most people don't know about. Create a new window or change the 3D one to the Node Editor. Right now there is nothing there. There is a button that looks like a face, those are the post production nodes. Click on it and then the Use Nodes button.

Now you see how Blender comes up with final images. Right now the render goes directly to the output, that's normal. Add a node like you would add anything else (Shift-A.) The two that I will discuss is defocus and vector blur, both are in the Filters.

When you use any nodes, you have to add one more feature in the rendering options. Make sure that the Do Composite button is turned on, this will do your composite after it renders.

Defocus

Defocus is probably the single most useful node that there is in terms of photorealism. It should probably be used for every scene. It blurs the background and anything in front of the foreground, this is how depth of field is done in Blender.

You may have found the Depth of Field section in the camera, but got frustrated when you found that it doesn't do anything in rendering, now you can change it and it will work. You can set it to a fixed amount, or you can fix the DoF to an object, I find this most useful since it can allow you to make an animated DoF.

Connect the Z value to the Z value in the output and defocus nodes and turn off the button that says No Z-Buffer. Also connect the Image to the Image. Adjust the samples depending on how much blurring there is, by default it's 16, I prefer 128.

Adjust the fstop for how much blur there is. The default of 128 means that it will be perfectly focused, 0 means that everything will be blurred, pick something in the middle. Lower values are better for small scenes, bigger values are better outdoors in the wide open.

Defocus



Vector Blur

Another one off the most useful nodes is the vector blur. Blender can do motion blur in the render, but it requires many renders and then blurs them together, this takes much more time. The OSA is the amount of renders that it will do.

Vector blur takes the speed of each pixel from the previous and next frame and moves things accordingly.

You'll notice that the Vector Blur requires a Speed input, but the render layer one doesn't have one. Go into the Render Settings and click on the Render Layers. At the bottom you can add things to render, the 3rd one is the vectors.

The default settings are fine for this node except for the samples, you may want to use 128 for this one as well.

Motion Blur (2 minutes)



Vector Blur (16 seconds)




Well, this concludes my Blender animation tutorial, if you have any questions on specifics, post them here and I'll response the best that I can. [u]

Nothing is impossible
Sushi01
16
Years of Service
User Offline
Joined: 14th Nov 2008
Location: Houston, Texas
Posted: 7th Dec 2008 21:20
Im gona have to start using blender, its free
greenlig
21
Years of Service
User Offline
Joined: 30th Aug 2003
Location: Melbourne
Posted: 8th Dec 2008 15:00
Very nice ninja. I like how you set this out. It's not exactly a tutorial as much as it is an overview of the features Blender has. Maybe a part on how to set up a cutscene in DB?

Blender3D - GIMP - WINXP - DBPro
ninja9578
16
Years of Service
User Offline
Joined: 25th May 2008
Location:
Posted: 8th Dec 2008 17:21
Well... I wrote this primarily for the FPSC, which uses movie files as cutscenes, so I talked about movie production. I don't know how to set up cutscenes in DB, I don't use DB

Nothing is impossible
ninja9578
16
Years of Service
User Offline
Joined: 25th May 2008
Location:
Posted: 19th Dec 2008 18:23
I added a small note of ambient occlusion.

Nothing is impossible
CoffeeGrunt
17
Years of Service
User Offline
Joined: 5th Oct 2007
Location: England
Posted: 20th Dec 2008 00:54
I have to vouch for this tutorial, it's helped improve my renders alot if applied correctly, I've tried alot of stuff out with it, but with practice, I changed it from this:



...to this:



That's a big improvement as far as I'm concerned...

ninja9578
16
Years of Service
User Offline
Joined: 25th May 2008
Location:
Posted: 21st Dec 2008 17:30
I added a section on Baking.

Nothing is impossible
CoffeeGrunt
17
Years of Service
User Offline
Joined: 5th Oct 2007
Location: England
Posted: 21st Dec 2008 19:06
Do you have a more detailed guide to DeFocus, I just can't find it...

ninja9578
16
Years of Service
User Offline
Joined: 25th May 2008
Location:
Posted: 21st Dec 2008 21:07
Try This: http://www.youtube.com/watch?v=NSsB8t_sG18

Nothing is impossible
CoffeeGrunt
17
Years of Service
User Offline
Joined: 5th Oct 2007
Location: England
Posted: 21st Dec 2008 21:22
Awesome, thanks! There's a whole series here....

Login to post a reply

Server time is: 2024-11-25 09:45:07
Your offset time is: 2024-11-25 09:45:07