Sunday, February 7, 2010
2.49b Snap Tools 1
One of the most important skills in Blender mesh modeling is the ability to position objects precisely. This is especially true in architectural models, where you are closely following a blueprint, or in a product model, where you need to position a part, such as the tires or doors on a car, exactly. If your mesh is complicated, it can be a difficult task because of the many vertices or faces that are close together.
Blender provides a number of tools that make it much easier to position objects more exactly. A commonly used tool is the Snap Menu which will be the subject of this tutorial which, combined with an understanding of how the 3D cursor and the transform widget work, should help a lot. I want to make the explanation simple because this topic often confuses beginning Blender users. I know because at my forum, and in emails, I have been asked these type of object positioning questions many times. We'll use as an example the common task of positioning columns precisely above and across a ground plane. I used Blender Version 2.49b.
Start with the default scene. We'll keep the default cube and first, go into Front View (Num1). You can tell if you're in Front View if the blue arrow (the Z axis) is pointing upward. Add a plane (Space - Add - Mesh - Plane). Press the Z key to go into wireframe mode. That way, we see the geometry better. Select the cube. We'll scale the cube a bit so that it looks like a column. To do that, pres the S key, then the Z key, then 3, then Enter, to scale the cube up 3 times in the Z direction.
Scale the plane up 5 times (Right Click to select, then S, 5, and Enter). Zoom out 3 or 4 times, using the Num- key. Panning with the middle mouse button (or Alt-Left Mouse Button if you have selected the Emulate 3 Button Mouse button in the Preferences Menu) shows that the cube, the basis for our column, is half above the plane and half below it. Don't worry. We'll fix this.
Our first job is to snap the column to the top left corner of the ground plane. First, let's locate the 3D cursor and the transform widget. Left click anywhere a few times in the 3D window. The 3D cursor is the circular icon, with a cross, that follows where you click. You can find out where the 3D cursor is by clicking on View Properties from the View Menu. Note how the X, Y, and Z coordinates of the 3D cursor change as you click in different areas of the 3D window.
Where the selected object is, is another matter entirely. Select the cube. Press the N key to bring up the Transform Properties window. The LocX, LocY, and LocZ coordinates show the center of either the selected object or objects. Right now, the cube is centered at 0,0,0, as is the plane.
Moving the column around to try to get it to align to the top left corner of the plane by just grabbing it with the G key is difficult. Here's a way to get an exact snap. First, select the column cube. Tab into Edit mode. Right click on the bottom left vertex to select it. Note that while the 3D cursor hasn't changed its position, the Transform Properties window is telling us that the selection is at the vertex with X=-1, Y=1, and Z=-1. The Transform Widget has moved to that position as well.
We're going to use the Snap Menu to position the column exactly. Press Shift-S to bring up the Snap Menu. The menu has options which either move the Selection, or move the 3D cursor. We're going to reposition the 3D cursor at the Selection. Select Cursor -> Selection. This moves the 3D cursor to the Selection. Now the 3D Cursor is in the exact position as the vertex we selected (X=-1, Y=1, and Z=-3). If that's true, how come the VertexX, VertexY, and VertexZ coordinates are different? That's because the coordinates are different. Click the Global button in the Transform Properties window. Now the coordinates match. The original vertex position was in local coordinates, positioned relative to the object's center.
The next step is to Tab out of Edit mode. In the Mesh Tools panel there are a series of buttons related to changing the center of selected objects. Right now, the column's object center is 0,0,0. We want it to be at the selected vertex (-1, 1, -3). To do that go to the Edit buttons (F9) and click Center Cursor. Now the transform widget, showing the center of the post is exactly at the selected vertex.
Next, select the ground plane. Press Shift-S and select Cursor -> Selection. In the Transform Properties window, note that the Plane is selected and the cursor is at -5, 5, 0 in global coordinates. This is also the position of the cursor.
Tab out of Edit mode. Select the column. Press Shift-S again. This time, select Selection -> Cursor. The column snaps to the upper left corner of the ground plane.
Let's repeat this procedure to create a new column and snap it to the upper right vertex of the plane. First press Shift-D to create a duplicate of the column. Move the duplicated column a bit so we see it as an individual column. Tab into Edit Mode. Select the upper right vertex of the column. Press Shift-S to bring up the Snap menu, and select Cursor -> Selection. Tab into Object Mode. From the Edit buttons (F9), in Mesh Tools, click Center Cursor. Select the Plane. Tab into Edit Mode. Select the Plane's upper right vertex. Press Shift-S and select Cursor -> Selection. Tab out of Edit Mode. Select the Column. Press Shift-S. Select Selection -> Cursor. The column should snap in place.
Now for the fun part. How can we position a beam across the columns? First, go to Front View (Num1). With a column select, press Shift-D to duplicate. Move the column a bit so we see it individually. Rotate the column on its side 90 degrees (R - 90 - Enter). Tab into Edit Mode. Select the lower left vertex of the cube. From the Edit buttons, click the Center Cursor button. Select the original column. Tab into Edit mode. Select the upper left vertex of the column. Press Shift-S to bring up the Snap menu. Select Cursor -> Selection. Tab out of Edit mode. Select the beam. Press Shift-S. Select Selection -> Cursor.
The beam doesn't extend to the end of the second column. This is easy to fix. Note that the dimensions of the beam are 2 x 2 x 6 Blender units. Select the plane. Note that its dimensions are 10 x 10. Reselect the beam. Change DimX to 10. Now the beam fits exactly on the two columns, for the dimension of the ground plane.
In the next part of our Snap Tools Tutorials, we'll look at snapping objects in more depth, including a discussion of the Transform Snap tool. If you enjoyed this tutorial, hit the YouTube Subscribe button. Also, ask your questions about this video at my Blender 3D forum. Happy Blendering!
Tuesday, February 2, 2010
BGE 2.49 Character Creation
Discuss this video at Ira Krakow's Blender 3D Forum!
Creating a character for Blender's Game Engine is different from creating a character in Blender 3D. In Blender 3D, you have a wider range of options for creating detailed characters, such as adding geometry for details, using curves and surfaces, and sculpt mode. These high-polygon models work well for rendering. However, if such a model is placed in the Game Engine, the animation would slow down to an unacceptable level. Some commonly used techniques, such as subsurf, are not available in the BGE. BGE characters should be low-polygon for best performance.
However, they can't be too low-poly, because the characters will look too much like rectangles and squares. In addition, you need enough geometry to do realistic animations in the BGE, such as walk cycles and lattice deformations. So creating a character for the Blender Game Engine is a tradeoff. In this tutorial, which is based on Tony Mullen's discussion in Mastering Blender, a book I recommend if you want a great introduction to Blender in more depth, I show a recipe for creating a character for the BGE. It's more a set of steps than a fully realized character. I leave that to you. I encourage you to use these steps to create your own character and post your result on my Blender 3D Forum at http://forum.irakrakow.com. I used Blender 2.49b.
So let's get started. Start with the default Blender scene. Go into Front View (Num1), the best view for the BGE because it shows the effect of gravity. Make sure you are in Edit mode, with all vertices selected. Press the W key to bring up the Specials Menu. Select Subdivide Smooth, accepting the default of 1.00 by clicking OK. The result is a polygon with 24 faces.
Press the Z key to go into wireframe mode. Deselect the 3D Transform Widget, which gets in the way of this demo. Press the A key to deselect all vertices. Position the cursor in the lower right area of the polygon, and press the B key to box select. Box select the lower right vertices. Press the E key, and select Region, to extrude the region of vertices. Scale the extruded vertices by pressing the S key, and then the Z key, and then the number 0. Finally, with the vertices still selected, press the E key again and extrude the vertices downward to complete the leg.
We're going to model the rest of our character with the Mirror Modifier. To do that, press the A key to deselect the vertices. Box select (B key) the vertices on the left side of the model. Press the X key to delete, and select Vertices. Now we have half the model. We're going to mirror the model along the X axis. Go to the Editing Buttons (F9). From the Modifiers tab, click the Add Modifer button. Select Mirror. You should see a mirror of the right side of the model on the left side. Make sure that the X button and the Do Clipping button are enabled, and that the Merge Limit is 0.001.
Now we're going to do the shoulders and arms. Box select the upper right vertices. Press the E key to extrude the forearm. You can use the S key to scale the forearm either more or less. Press the E key again to extrude another part of the arm, and use the S key to scale it down. Press the R key to rotate a bit as well. Extrude one more time by pressing the E key. Note that the left arm is being created as well, a mirror of the right arm.
Let's bend the knees a bit. Go to side view (Num3). Box select (B key) the knee vertices (the ones in the lower middle of the leg), and move them a bit on the Y axis by pressing the G key, then the Y key, then moving the vertices, then pressing Enter.
Let's add a head. Go to Front View (Num1). Press Alt-A to deselect the vertices. Box select (B key) the upper right vertices. Press the E key, selecting Region, to extrude the head upwards.
The shape of the character is done. We don't need the Mirror Modifier any more. To apply the Mirror Modifier to the model, press Tab to go into Object Mode. Then press the Apply button to add the geometry on the left side to the mesh on the right side. Pressing Tab to go into Edit mode shows that we have a complete character. We need a bit more geometry to make this character work well in the BGE. To do that, press the A key to select all vertices. Then press the W key for the Specials menu. Select Subdivide Smooth. Our character has a few hundred faces, enough for moving around in the BGE but not so complex as will slow down the BGE.
We're going to paint our character using Texture Paint. To do that, we first need to mark a seam for unwrapping. Go to Front View (Num1). Position the cursor at the center of the character, at the border of the left and right part, and press Alt-Right click to select the edge loop. Press Ctrl-E to bring up the Edge Specials menu, and select Mark Seam. Split the 3D window to create a UV / Image Editor in the right part of the window. Press the A key to select all vertices. Then press the U key, selecting Unwrap, to unwrap the mesh. In the UV / Image Editor, select Image, then New. The default size is fine. We want to click on the UV Test Grid as well. Then press OK.
Change the view to Textured. At this point, we can change the mode to Texture Paint and actually paint our character. We can play with the brush, opacity, size, blend, and other settings by changing the options in the Paint panel.
At this point, we have a modeled and textured character. Save your Blend file because we will use it in the next video, to rig our character and have it fully participate in the game. Just to prove that our character works in the Blender Game Engine, go to the Logic Buttons (F4). Change the Physics type of our character to Rigid Body (Dynamic would work as well). With the cursor in the 3D window, press the P key. Our character falls int the abyss, pulled by the Bullet Physics calculations. Congratulations, we have made a character for use in the Blender Game Engine. Show off your character at http://forum.irakrakow.com. Subscribe to my Youtube videos. See you next time. Happy Blendering!
Creating a character for Blender's Game Engine is different from creating a character in Blender 3D. In Blender 3D, you have a wider range of options for creating detailed characters, such as adding geometry for details, using curves and surfaces, and sculpt mode. These high-polygon models work well for rendering. However, if such a model is placed in the Game Engine, the animation would slow down to an unacceptable level. Some commonly used techniques, such as subsurf, are not available in the BGE. BGE characters should be low-polygon for best performance.
However, they can't be too low-poly, because the characters will look too much like rectangles and squares. In addition, you need enough geometry to do realistic animations in the BGE, such as walk cycles and lattice deformations. So creating a character for the Blender Game Engine is a tradeoff. In this tutorial, which is based on Tony Mullen's discussion in Mastering Blender, a book I recommend if you want a great introduction to Blender in more depth, I show a recipe for creating a character for the BGE. It's more a set of steps than a fully realized character. I leave that to you. I encourage you to use these steps to create your own character and post your result on my Blender 3D Forum at http://forum.irakrakow.com. I used Blender 2.49b.
So let's get started. Start with the default Blender scene. Go into Front View (Num1), the best view for the BGE because it shows the effect of gravity. Make sure you are in Edit mode, with all vertices selected. Press the W key to bring up the Specials Menu. Select Subdivide Smooth, accepting the default of 1.00 by clicking OK. The result is a polygon with 24 faces.
Press the Z key to go into wireframe mode. Deselect the 3D Transform Widget, which gets in the way of this demo. Press the A key to deselect all vertices. Position the cursor in the lower right area of the polygon, and press the B key to box select. Box select the lower right vertices. Press the E key, and select Region, to extrude the region of vertices. Scale the extruded vertices by pressing the S key, and then the Z key, and then the number 0. Finally, with the vertices still selected, press the E key again and extrude the vertices downward to complete the leg.
We're going to model the rest of our character with the Mirror Modifier. To do that, press the A key to deselect the vertices. Box select (B key) the vertices on the left side of the model. Press the X key to delete, and select Vertices. Now we have half the model. We're going to mirror the model along the X axis. Go to the Editing Buttons (F9). From the Modifiers tab, click the Add Modifer button. Select Mirror. You should see a mirror of the right side of the model on the left side. Make sure that the X button and the Do Clipping button are enabled, and that the Merge Limit is 0.001.
Now we're going to do the shoulders and arms. Box select the upper right vertices. Press the E key to extrude the forearm. You can use the S key to scale the forearm either more or less. Press the E key again to extrude another part of the arm, and use the S key to scale it down. Press the R key to rotate a bit as well. Extrude one more time by pressing the E key. Note that the left arm is being created as well, a mirror of the right arm.
Let's bend the knees a bit. Go to side view (Num3). Box select (B key) the knee vertices (the ones in the lower middle of the leg), and move them a bit on the Y axis by pressing the G key, then the Y key, then moving the vertices, then pressing Enter.
Let's add a head. Go to Front View (Num1). Press Alt-A to deselect the vertices. Box select (B key) the upper right vertices. Press the E key, selecting Region, to extrude the head upwards.
The shape of the character is done. We don't need the Mirror Modifier any more. To apply the Mirror Modifier to the model, press Tab to go into Object Mode. Then press the Apply button to add the geometry on the left side to the mesh on the right side. Pressing Tab to go into Edit mode shows that we have a complete character. We need a bit more geometry to make this character work well in the BGE. To do that, press the A key to select all vertices. Then press the W key for the Specials menu. Select Subdivide Smooth. Our character has a few hundred faces, enough for moving around in the BGE but not so complex as will slow down the BGE.
We're going to paint our character using Texture Paint. To do that, we first need to mark a seam for unwrapping. Go to Front View (Num1). Position the cursor at the center of the character, at the border of the left and right part, and press Alt-Right click to select the edge loop. Press Ctrl-E to bring up the Edge Specials menu, and select Mark Seam. Split the 3D window to create a UV / Image Editor in the right part of the window. Press the A key to select all vertices. Then press the U key, selecting Unwrap, to unwrap the mesh. In the UV / Image Editor, select Image, then New. The default size is fine. We want to click on the UV Test Grid as well. Then press OK.
Change the view to Textured. At this point, we can change the mode to Texture Paint and actually paint our character. We can play with the brush, opacity, size, blend, and other settings by changing the options in the Paint panel.
At this point, we have a modeled and textured character. Save your Blend file because we will use it in the next video, to rig our character and have it fully participate in the game. Just to prove that our character works in the Blender Game Engine, go to the Logic Buttons (F4). Change the Physics type of our character to Rigid Body (Dynamic would work as well). With the cursor in the 3D window, press the P key. Our character falls int the abyss, pulled by the Bullet Physics calculations. Congratulations, we have made a character for use in the Blender Game Engine. Show off your character at http://forum.irakrakow.com. Subscribe to my Youtube videos. See you next time. Happy Blendering!
Friday, January 29, 2010
BGE Blender 2.49b Part 3
Discuss this video at Ira Krakow's Blender 3D Forum
The purpose of this video is to show some basic sensor and actuator behavior. We'll look at the Always, Touch, and Keyboards sensors. I'll show you some basic techniques for moving an object, how the movement interacts with gravity, how to bounce an object, and how to replace one object with another object. I used Blender 2.49b for the demo.
Setup:
We'll use the default cube. Go to Front View (NUM1), the best for the BGE because it shows the effect of gravity the best, as objects actually fall down in response to simulated gravity. Add a ground plane for the cube to bounce off of (Shift - Add - Mesh - Plane). Scale the plane 8 times (S - 8 - Enter). Move the plane down about 5 Blender Units. It doesn't really matter - you could have moved the cube up as well to get the same effect. Select the cube. Go to the Logic buttons (F4). Select Rigid Body from the Physics types dropdown. This turns on the Actor button as well, so that the cube becomes an actor, with the realistic Rigid Body physics applied, in the Game Engine.
Show:
1) The default sensor is the Always sensor. Click the Add buttons to add a Sensor, a Controller, and an Actuator, to the cube. Wire up the logic bricks, connecting the sensor to the controller and the controller to the actuator. Enter .10 in the LocX area. What this logic block is saying is that, each time the logic blocks are evaluated (the Always sensor - it's not strictly Always, it's when the logic is evaluated), the cube will be moved .10 Blender Units in the X direction. Press P to start the game. Note how the cube moves in the X direction (because of the logic brick), as well as down (because of the rigid body physics) until it touches the plane (which is an obstacle that prevents the cube from falling any further). For a while, the cube moves in the X direction on the plane, until eventually it falls off the plane. Press Esc to end the game.
2) How to make the cube bounce. Enter 0 in the Loc X area. Now enter .1 in the Loc Z area, the third location area. Press P to start the game. Now, on every evaluation of the logic, the cube goes upward in the Z direction .1 Blender unit. At the beginning this causes the cube to go up a bit. Eventually, however, gravity takes over, being more powerful than the displacement in the Z direction, and the cube bounces down, until it hits the plane. After that, the cube bounces up in the Z direction, then gravity takes over, in an infinite cycle. Press ESC to stop the game.
3) Perhaps you want the cube to start bouncing only when it touches the ground, allowing gravity to control the cube fully before it hits the ground. To do that, change the Always sensor to a Touch sensor. Press the P key with the cursor in the 3D window to start the game. Note that the bounce doesn't take place until the plane touches the ground.
4) How to make the go in the X direction. Set the LocZ parameter back to 0. Set the LinV, linear velocity, to 0.10. This makes the cube's speed, in the X direction, become .10 blender units, every time it touches the plane. The cube indeed goes into the X direction that way, but its motion is unrealistic because the cube seems to penetrate into the plane. Perhaps you can do better. Hint: a more realistic way is to use the Servo type of motion. Post your render at http://forum.irakrakow.com to show the cube moving more realistic, without going into the cube. Press ESC to end the game.
Now click the little Add button on the LinV row, at the right. What that does is add .10 Blender Units to the speed of the cube. It accelerates quickly along the X axis until it falls from the plane. Press Esc to end the game.
5) Here's an interesting effect. We can replace one mesh with another while the Game Engine runs. We'll use the Keyboard sensor to trigger this effect. We will replace the cube with Suzanne. Here's how it's done. Go to Level 2 by clicking on the second rectangle. Add Suzanne (Space - Add - Mesh - Monkey). Click back on Level 1. The Game Engine only shows the objects on Level 1. We'll substitute the cube with Suzanne when we hit the R key (for replace, I guess). First, change the Sensor to a Keyboard sensor by selecting Keyboard from the Sensor Type dropdown. Left click in the Key area. In the rectangle, where it says Press A Key, move the cursor. Then press the R key. Now the key area displays the letter R. Whatever happens will be triggered when the user presses the R key.
In the Actuator area, select Edit Object. Below is a popup menu which lets you select the type of object editing you want. Select Replace Mesh. In the Obj: field, enter Suzanne. Wire the sensor to the controller and the controller to the actuator. Run the game by moving the cursor into the 3D window and pressing the P key. Press the R key. Suzanne magically replaces the cube. This is a great technique if, say, you want, say, your Cinderella mesh to be replaced by a pumpkin, as in the story. Press Esc to end the game.
6) Now suppose you want the cube back. We can show and hide the details about the sensor and actuator by clicking on the little arrow at the right. This is useful when you want to show a lot of logic bricks in a small area. So click these arrows to hide the details about the sensor and actuator. Let's make the C key restore the cube back. To do that, we need another set of logic bricks. Click the Add buttons on the Sensor, Controllor, and Actuator tabs. Set the sensor type to Keyboard. Left click in the Key area. In the rectangle where it says Press a Key, press the C key. Now the key area displays the letter C.
In the Actuator area, select Edit Object. In the popup menu which lets you select the type of object editing you want, select Replace Mesh. In the Obj: field, enter Cube. Wire the sensor to the controller and the controller to the actuator. Run the game by moving the cursor into the 3D window and pressing the P key. Let the cube fall to the ground. Press the R key first, replacing the cube with the monkey. Press the C key next, replacing the monkey with te cube. Pretty neat...you can make objects appear and disappear.
One last thing I want to point out before my 10 minutes runs out. Don't worry. I'll show more stuff in the next part. It's a good idea to name your sensors something meaningful instead of Sensor and Sensor1, the default names. To do this, expand the details for each sensor. Name the first sensor Monkey. Then click the arrow to hide the details. Expand the details for the second sensor. Name the second sensor Cube. Now you can tell what each sensor does.
I hope this gives you a better idea of how to wire up logic bricks to do basic object movement, as well as how to replace one object with another under Game Engine control. Leave your comments at http://forum.irakrakow.com. Happy Blendering!
The purpose of this video is to show some basic sensor and actuator behavior. We'll look at the Always, Touch, and Keyboards sensors. I'll show you some basic techniques for moving an object, how the movement interacts with gravity, how to bounce an object, and how to replace one object with another object. I used Blender 2.49b for the demo.
Setup:
We'll use the default cube. Go to Front View (NUM1), the best for the BGE because it shows the effect of gravity the best, as objects actually fall down in response to simulated gravity. Add a ground plane for the cube to bounce off of (Shift - Add - Mesh - Plane). Scale the plane 8 times (S - 8 - Enter). Move the plane down about 5 Blender Units. It doesn't really matter - you could have moved the cube up as well to get the same effect. Select the cube. Go to the Logic buttons (F4). Select Rigid Body from the Physics types dropdown. This turns on the Actor button as well, so that the cube becomes an actor, with the realistic Rigid Body physics applied, in the Game Engine.
Show:
1) The default sensor is the Always sensor. Click the Add buttons to add a Sensor, a Controller, and an Actuator, to the cube. Wire up the logic bricks, connecting the sensor to the controller and the controller to the actuator. Enter .10 in the LocX area. What this logic block is saying is that, each time the logic blocks are evaluated (the Always sensor - it's not strictly Always, it's when the logic is evaluated), the cube will be moved .10 Blender Units in the X direction. Press P to start the game. Note how the cube moves in the X direction (because of the logic brick), as well as down (because of the rigid body physics) until it touches the plane (which is an obstacle that prevents the cube from falling any further). For a while, the cube moves in the X direction on the plane, until eventually it falls off the plane. Press Esc to end the game.
2) How to make the cube bounce. Enter 0 in the Loc X area. Now enter .1 in the Loc Z area, the third location area. Press P to start the game. Now, on every evaluation of the logic, the cube goes upward in the Z direction .1 Blender unit. At the beginning this causes the cube to go up a bit. Eventually, however, gravity takes over, being more powerful than the displacement in the Z direction, and the cube bounces down, until it hits the plane. After that, the cube bounces up in the Z direction, then gravity takes over, in an infinite cycle. Press ESC to stop the game.
3) Perhaps you want the cube to start bouncing only when it touches the ground, allowing gravity to control the cube fully before it hits the ground. To do that, change the Always sensor to a Touch sensor. Press the P key with the cursor in the 3D window to start the game. Note that the bounce doesn't take place until the plane touches the ground.
4) How to make the go in the X direction. Set the LocZ parameter back to 0. Set the LinV, linear velocity, to 0.10. This makes the cube's speed, in the X direction, become .10 blender units, every time it touches the plane. The cube indeed goes into the X direction that way, but its motion is unrealistic because the cube seems to penetrate into the plane. Perhaps you can do better. Hint: a more realistic way is to use the Servo type of motion. Post your render at http://forum.irakrakow.com to show the cube moving more realistic, without going into the cube. Press ESC to end the game.
Now click the little Add button on the LinV row, at the right. What that does is add .10 Blender Units to the speed of the cube. It accelerates quickly along the X axis until it falls from the plane. Press Esc to end the game.
5) Here's an interesting effect. We can replace one mesh with another while the Game Engine runs. We'll use the Keyboard sensor to trigger this effect. We will replace the cube with Suzanne. Here's how it's done. Go to Level 2 by clicking on the second rectangle. Add Suzanne (Space - Add - Mesh - Monkey). Click back on Level 1. The Game Engine only shows the objects on Level 1. We'll substitute the cube with Suzanne when we hit the R key (for replace, I guess). First, change the Sensor to a Keyboard sensor by selecting Keyboard from the Sensor Type dropdown. Left click in the Key area. In the rectangle, where it says Press A Key, move the cursor. Then press the R key. Now the key area displays the letter R. Whatever happens will be triggered when the user presses the R key.
In the Actuator area, select Edit Object. Below is a popup menu which lets you select the type of object editing you want. Select Replace Mesh. In the Obj: field, enter Suzanne. Wire the sensor to the controller and the controller to the actuator. Run the game by moving the cursor into the 3D window and pressing the P key. Press the R key. Suzanne magically replaces the cube. This is a great technique if, say, you want, say, your Cinderella mesh to be replaced by a pumpkin, as in the story. Press Esc to end the game.
6) Now suppose you want the cube back. We can show and hide the details about the sensor and actuator by clicking on the little arrow at the right. This is useful when you want to show a lot of logic bricks in a small area. So click these arrows to hide the details about the sensor and actuator. Let's make the C key restore the cube back. To do that, we need another set of logic bricks. Click the Add buttons on the Sensor, Controllor, and Actuator tabs. Set the sensor type to Keyboard. Left click in the Key area. In the rectangle where it says Press a Key, press the C key. Now the key area displays the letter C.
In the Actuator area, select Edit Object. In the popup menu which lets you select the type of object editing you want, select Replace Mesh. In the Obj: field, enter Cube. Wire the sensor to the controller and the controller to the actuator. Run the game by moving the cursor into the 3D window and pressing the P key. Let the cube fall to the ground. Press the R key first, replacing the cube with the monkey. Press the C key next, replacing the monkey with te cube. Pretty neat...you can make objects appear and disappear.
One last thing I want to point out before my 10 minutes runs out. Don't worry. I'll show more stuff in the next part. It's a good idea to name your sensors something meaningful instead of Sensor and Sensor1, the default names. To do this, expand the details for each sensor. Name the first sensor Monkey. Then click the arrow to hide the details. Expand the details for the second sensor. Name the second sensor Cube. Now you can tell what each sensor does.
I hope this gives you a better idea of how to wire up logic bricks to do basic object movement, as well as how to replace one object with another under Game Engine control. Leave your comments at http://forum.irakrakow.com. Happy Blendering!
Tuesday, January 26, 2010
2.49b BGE (Animation) Part 2
The purpose of this video is to compare animation in Blender 3D modeling with animation in the Blender Game Engine. The animation results are different because the BGE uses a different physics engine, Bullet Physics, than the 3D animation engine. As you will see, because the default frame rates are different, animations generated in the BGE are faster (60 frames per second) than in Blender 3D (25 frames per second). I will show how to visualize animations in both, how to synchronize the animations between the BGE and Blender 3D, and the basic visualization settings in the BGE that will let you fine tune your game animations.
I am using Blender 2.49b because, as far as I can tell, this is the only Blender version where you don't need Python scripting to synchronize the animations. Versions before 2.49 required you to have a Python script to set the default frame rate in the BGE. Blender 2.50, Alpha 0, has not fully implemented BGE animation yet. In 2.50 alpha 0, you can run a game and show visualizations, but you can't do animations in Blender 3D and have them show up in the BGE, or vice versa. Both of these can be done in 2.49b. I'll show you how to do both and why it's a good idea to be able to move smoothly back and forth between Blender 3D and the Blender BGE. So 2.49b seems to be the way to go if you want to do animation with the Blender Game Engine.
By the way, I have not seen this type of discussion anywhere, either as a video, in documentation, or in a book. The closest is Tony Mullen's book Bounce, Tumble, and Splash, which is an excellent introduction to Blender physics libraries such as the fluid simulator, soft bodies, cloth, boids, particles, and so on. However, he uses an older Blender version which needs a Python hack to synchronize the animation speeds between Blender 3D and the Blender BGE. My conclusions are the result of pure experimentation. If you have any comments on this, please join my Blender 3D forum at http://forum.irakrakow.com, and comment on this video.
Here are the steps:
a) Setup: Go into Animation View by selecting it from the different views available. Go into Front View, the best view for the BGE because of the gravity simulation, by pressing Num1 or View Front from the menu. Start by deleting the default cube (Select, right click, then confirm with the Delete key), Add an icosphere (Add - Mesh - Icosphere), accepting the defaults. Add a plane (Space - Add - Mesh - Plane). Tilt the plane 45 degrees (R - 45 - Enter) to tilt it. This will make the icosphere fall off the plane when we press P to play the game in the Blender Game Engine.
b) Before running the BGE, we need to make the icosphere an Actor, with rigid body physics. The plane will be an obstacle for the sphere, which will react according to gravity by falling off the plane. Movement of the sphere down the plane is dependent on gravity and the calculations of the Bullet Physics engine, as well as the mass of the object and other things. Press the P key with the 3D cursor in the 3D window to run the game. Press Esc to stop the game.
c) We can generate IPO curves from running the game. Check the Record Game Physics to IPO check box. Press the P key to run the game. Note how the IPO curves are generated in the IPO Curve Editor.
d) Here's how to fine tune collisions in the game engine. Select the icosphere. Select Bounds, and then Sphere. Check the Show Physics Visualization menu item from the Game menu. The visualization shows the rectangular area which is the collision area of the plane, as well as the spherical area which is the collision boundary for the sphere. This is how you check for valid collisions in the game engine. Press the P key to run the game. Press Esc to stop the game.
e) Let's see how our animation runs in the 3D part of Blender. Run the animation with Alt-A. Note how the animation runs much slower. Why is this? This is because the 3D animation is at 25 frames per second. Go to Scene buttons and find the FPS indicator. The BGE runs at 60 frames per second. In the World buttons, and this is ONLY in 2.49, in the Mist/Stars/Physics panel, the Physics part refers to the Blender Game Engine. The dropdown shows Bullet, the default engine. There's also Servo Physics. We'll leave the engine at Bullet. The FPS is at 60. We can change it to 25. Then rerun the BGE by pressing the P key. Press the ESC key and new IPO curves are generated.
f) We can also change Gravity. The default is earth's gravity at 9.8. Let's decrease it to 2, simulating a planet with less gravity. Press the P key to rerun the BGE. Press ESC to end the game and generate new curves.
g) We'll change gravity back to earth, 9.8. We're going to clear out the IPO curves we created. Press the A key in the IPO Curve Editor to select all the curves. Press the Delete key and confirm the deletion.
Another way to generate IPOs, which bypasses actually running the game, is to press Ctrl-Alt-Shift-P with your objects in the position as if you were going to run a game. Go to Frame 1. Position the icosphere above the plane. Disable Record Game Physics to IPO in the Game Menu. Instead, press Ctrl-Alt-Shift-P. The Bullet Physics engine runs, generating the IPO curves. Press Alt-A. Change gravity to 16. Press Ctl-Alt-Shift-P. Then press Alt-A. We now have the IPOs for gravity in a bigger planet, like Jupiter.
h) Let's go the other way, from 3D to the Game engine. We'll create a simple animation in Blender 3D. First, get rid of the previous IPO curves by going to the IPO Curve Editor, pressing the A key to select all the curves, and pressing Delete. Set keyframes from 1 to 100. Start with the ball. Keyframe it at Frame 1 by pressing the I key and selecting LocRot. Go to Frame 100. Move it 5 or so Blender Units up. Keyframe it by pressing the I key and selecting LocRot. Press Alt-A. Now we have an animation in Blender 3D over 100 frames.
i) We can get the Game Engine to run this animation using Logic Bricks. Do the Always Sensor with the IPO actuator. Select the Play type. Connect the sensor to the controller and the controller to the actuator, as usual. Make the end frame the same as the end frame in the 3D engine. Then run the BGE, to show that the BGE can run the IPO curves created in the IPO Curve Editor.
I hope you now have a better idea of how animation works in Blender 3D as compared with the animation of the Blender Game Engine. They're totally separate, yet, with more understanding of how Bullet Physics and gravity work, they can work well together. I look forward to seeing your animations, both in the BGE and in 3D, on my Blender 3D forum at http://forum.irakrakow.com. And don't forget to subscribe to my videos as well. Happy Blendering!
Labels:
2.49b,
bge,
blender,
blender game engine,
tutorial
Sunday, January 24, 2010
My Blender 3D Forum
Join Ira Krakow's Blender 3D Forum
I am pleased to announce Ira Krakow's Blender 3D Forum, at http://forum.irakrakow.com. The Forum is a place where you can learn and share your Blender 3D knowledge with other Blender users 24 hours a day, 7 days a week, 365 or 366 days a year. I decided to create the Forum for a number of reasons. First, I have received excellent feedback from you about my Blender 3D videos. Many of you have said that my video tutorials are the best they have seen anywhere. I'm certainly pleased with all the five star ratings I have received. So thank you.
I have published 50 Blender tutorials on Youtube, all in HD. They cover a range of features, from the simple to the very advanced. The forum at forum.irakrakow.com can be a Table of Contents to the tutorials. I created a section called Blender 3D Video Tutorials. I grouped the tutorials according to categories that start simply and proceed to the more complicated. These topics are: User Interface, Mesh Modeling, Animation, Materials and Textures, Curve Modeling, Camera and Lighting, Rigging, Physics, Nodes, Blender 2,5, the Blender Game Engine, Python, and Resources (other places to find great Blender information). I created topics for each of my videos under the categories I felt made sense. There is a link to the Youtube video as well as, for most of the videos, my blog where you can read the video's script, at blender3dvideos.blogspot.com. In some cases there are links to associated blend files. The Forum can serve as a Table of Contents to my videos, something that would be difficult to see in a simple Youtube flat listing of videos. Please leave your comments and suggest other tutorials by replying to these topics.
I have also received many comments, both on Youtube and as private messages, as well as requests for help. These are wonderful as well. While I guess this shows you think I know something about Blender, which is great, there is much more to be learned from all of us as a whole. We have an incredible variety of people who know much more than me and who, more important, are willing to share. I'll just mention two. Michael Fox (mfoxdogg38 on Youtube) is a Blender developer who has published many great videos, including comprehensive tours of Blender 2.5. I urge you to check out his blog at http://blenderlabrat.blogspot.com, for the latest and greatest progress in Blender. Josh Beck (jbeckneisdnet on Youtube) is a secondary school teacher who has published great Youtube tutorials. There are Blender experts from all around the world who subscribe to my tutorials.
While Youtube comments, both for individual videos and on my profile, are great, it's not easy to see all the topics discussed and to get all of us involved. So I created discussion areas where we can create topics of interest, post both our finished renders and works in progress, so that we can get feedback from everyone, and talk about anything else relating to Blender.
So head over to forum.irakrakow.com, register, and join the conversation. I look forward to seeing you there.
I am pleased to announce Ira Krakow's Blender 3D Forum, at http://forum.irakrakow.com. The Forum is a place where you can learn and share your Blender 3D knowledge with other Blender users 24 hours a day, 7 days a week, 365 or 366 days a year. I decided to create the Forum for a number of reasons. First, I have received excellent feedback from you about my Blender 3D videos. Many of you have said that my video tutorials are the best they have seen anywhere. I'm certainly pleased with all the five star ratings I have received. So thank you.
I have published 50 Blender tutorials on Youtube, all in HD. They cover a range of features, from the simple to the very advanced. The forum at forum.irakrakow.com can be a Table of Contents to the tutorials. I created a section called Blender 3D Video Tutorials. I grouped the tutorials according to categories that start simply and proceed to the more complicated. These topics are: User Interface, Mesh Modeling, Animation, Materials and Textures, Curve Modeling, Camera and Lighting, Rigging, Physics, Nodes, Blender 2,5, the Blender Game Engine, Python, and Resources (other places to find great Blender information). I created topics for each of my videos under the categories I felt made sense. There is a link to the Youtube video as well as, for most of the videos, my blog where you can read the video's script, at blender3dvideos.blogspot.com. In some cases there are links to associated blend files. The Forum can serve as a Table of Contents to my videos, something that would be difficult to see in a simple Youtube flat listing of videos. Please leave your comments and suggest other tutorials by replying to these topics.
I have also received many comments, both on Youtube and as private messages, as well as requests for help. These are wonderful as well. While I guess this shows you think I know something about Blender, which is great, there is much more to be learned from all of us as a whole. We have an incredible variety of people who know much more than me and who, more important, are willing to share. I'll just mention two. Michael Fox (mfoxdogg38 on Youtube) is a Blender developer who has published many great videos, including comprehensive tours of Blender 2.5. I urge you to check out his blog at http://blenderlabrat.blogspot.com, for the latest and greatest progress in Blender. Josh Beck (jbeckneisdnet on Youtube) is a secondary school teacher who has published great Youtube tutorials. There are Blender experts from all around the world who subscribe to my tutorials.
While Youtube comments, both for individual videos and on my profile, are great, it's not easy to see all the topics discussed and to get all of us involved. So I created discussion areas where we can create topics of interest, post both our finished renders and works in progress, so that we can get feedback from everyone, and talk about anything else relating to Blender.
So head over to forum.irakrakow.com, register, and join the conversation. I look forward to seeing you there.
Monday, January 18, 2010
BGE Blender 2.50 Part 1
Join my Blender 3D forum where you can network with other Blender friends and get your Blender 3D questions answered.
Download the blend file
This is the first in a series of tutorials on the Blender Game Engine (BGE) in Blender 2.5. The purpose of this tutorial is a quick tour of the BGE user interface in 2.5. If you have used the BGE in 2.4x, the process should be fairly familiar to you. Even if you have never used the BGE, after watching this tutorial you should be comfortable enough to experiment with creating more complicated games. I'm using Blender 2.5 Alpha 0, which you can download from blender.org.
So let's get started. We'll use the default cube, in the default scene. We're going to bounce the cube onto a plane, simulating the ground. To create the plane, press Shift-A, then Mesh, then Plane. Scale the plane 10 times (S - 10 - Enter). Position the plane so that its center is roughly at the center of the cube. Select the cube. Move the cube upwards, in the positive Z direction, about 5 blender units, by pressing the G key, then the Z key, then 5. Now the cube appears to be ready to be dropped.
Blender 2.5 contains a series of views that are designed for things you would commonly want to do. Click on the icon to the left of the Default text. You should see selections such as Animation, Compositing, Scripting, and so on. Select Game Logic. Let's do a litte tour of the Game Logic setup. At the upper left is the outliner. In addition to the Camera and the Lamp, we have the cube, which is the active object, and the plane, which is just called Mesh. To the right of the outliner is the 3D view, set to Top View to start. Let's change to front view and rotate the view a bit so that we can watch the cube drop. With the cursor inside the 3D view, press Num1, or from the View Menu select Num1, to go to Front View. I used the middle mouse button to give the view a bit of an angle from the Front View, so you can see the cube drop.
Blender's game engine uses the Bullet Physics library to simulate gravity, collisions, bouncing, and the physics of the game world. This is actually a different type of physics library than, say, the fluid simulator or soft bodies. One of the challenges of working with the game engine is getting used to the differences. Animation and texturing, as examples, work a bit differently in the BGE than in the 3D modeling part of Blender.
Having said that, to make the cube participate, so to speak, in the game, we need to select the cube and click on the Physics buttons (all the way to the right). Right now, the settings for the BGE are not available to us. It appears as if the 3D physics options, such as Fluid and Cloth, are what's available. To make the BGE settings active, change the the renderer from Blender Render to Blender Game. Now the Blender Game Physics options can be set. To make the cube do its thing in the game engine, change the Physics type to Rigid Body. Note that the Actor check box is checked automatically.
This is enough to make the cube participate in the game. As in 2.4x, with the cursor in the 3D window, press the P key to start the Game Engine. The cube falls onto the plane, and rolls over a bit. Press ESC to go back to the 3D view.
Another way to start the Game Engine is to click on the Camera icon, the first one on the left, in the Properties Window. The buttons here also changed when we changed the view from Blender Render (which shows the image and animation settings) to Blender Game. Now, there's a big Start button. We can press the Start button to start the game as well.
Now we're going to add some interactivity to the game. We'll push the cube to the edge of the plane by nudging it a bit, until eventually the cube falls off into oblivion. To do that, we'll work with the bottom middle window. We'll maximize this window by pressing Control - Down Arrow. Then we'll zoom, using the Num- key, until we can see the Sensor, Controllor, and Actuators button groups. There are 3 Add keys. Click each Add key to add a Sensor, a Controller, and an Actuator. Here's the deal. The Sensor looks for some type of activity, in this case it's going to look for a particular key to be pressed. The Controller can control the logic as to what happens when that key is pressed. The Actuator determines what exactly happens after the sensor and controller logic has been set.
Let's make it so that when the user presses the R key, the cube moves a bit in the X direction. To do that, click on the Always dropdown in the Sensor area. Note that there are all types of sensors. We're going to use the Keyboard sensor. Select Keyboard. Position the mouse at the Key area, and left click. The prompt Press A Key displays. Press the R key. Any key will do.
Now go to the Actuators area. In the first Loc area, enter 0.5. The idea is that when we press the R key, the cube will go .2 Blender Units in the X direction. If you had entered 0.2 in the second area the cube would go .2 Blender Units in the Y direction, and similarly 0.2 in the 3rd area would make the cube go .2 Blender Units in the Z direction. There are other things you could have made the cube do, such as add a force or rotate (torque).
Finally, we need to hook up the Sensor, Controller, and Actuator. Connect the right socket of the Sensor with the left socket of the Controller. Then connect the right socket of the Controller to the left sockete of the Actuator. Now, when the BGE detects the R keypress, the cube will go .2 Blender Units in the X direction.
Let's see if this is what happens. Press Control-down arrow to return this logic window back to its original position. Click the Start button. The cube does what it did before. Now I will press the R key a few times. The cube bounces up a bit because that's what the Bullet Physics calculation might think a cube resting on its point might do as well. Eventually, the cube falls off the plane and bounces into space.
Let's add some more interactivity. Add an icosphere next to the cube (Shift-A, Mesh, Icosphere), accepting the defaults. Position the icosphere under the cube, between the cube and the plane. Go to the Physics tab. Give it a Rigid Body physics preoperty. Let's make the icosphere go .2 Blender Units in the -Y direction when we press the Space Bar. Maximize the bottom middle window, the one with the Sensor, Controller, and Actuator tabs. Press the 3 Add buttons for Sensor, Controller, and Actuator. Select the Keyboard sensor. Move the cursor to the Key area and left click. When prompted to press a key, press the Space Bar.
Press the P key in the 3D window to start the game. If you positioned the icosphere underneath the cube, watch the cube hit the icosphere and then react as if it was affected by the collision. Depending on how large the plane is and how big the cube and icosphere are, you might get different effects. The cube and or the icosphere might fall off the plane. Pressing the space bar causes the icosphere to move.
I hope this gives you a start with using the Game Engine in Blender 2.5. Press the SUBSCRIBE button on Youtube to make sure you won't miss my future BGE and Blender tutorials. Happy Blendering!
Download the blend file
This is the first in a series of tutorials on the Blender Game Engine (BGE) in Blender 2.5. The purpose of this tutorial is a quick tour of the BGE user interface in 2.5. If you have used the BGE in 2.4x, the process should be fairly familiar to you. Even if you have never used the BGE, after watching this tutorial you should be comfortable enough to experiment with creating more complicated games. I'm using Blender 2.5 Alpha 0, which you can download from blender.org.
So let's get started. We'll use the default cube, in the default scene. We're going to bounce the cube onto a plane, simulating the ground. To create the plane, press Shift-A, then Mesh, then Plane. Scale the plane 10 times (S - 10 - Enter). Position the plane so that its center is roughly at the center of the cube. Select the cube. Move the cube upwards, in the positive Z direction, about 5 blender units, by pressing the G key, then the Z key, then 5. Now the cube appears to be ready to be dropped.
Blender 2.5 contains a series of views that are designed for things you would commonly want to do. Click on the icon to the left of the Default text. You should see selections such as Animation, Compositing, Scripting, and so on. Select Game Logic. Let's do a litte tour of the Game Logic setup. At the upper left is the outliner. In addition to the Camera and the Lamp, we have the cube, which is the active object, and the plane, which is just called Mesh. To the right of the outliner is the 3D view, set to Top View to start. Let's change to front view and rotate the view a bit so that we can watch the cube drop. With the cursor inside the 3D view, press Num1, or from the View Menu select Num1, to go to Front View. I used the middle mouse button to give the view a bit of an angle from the Front View, so you can see the cube drop.
Blender's game engine uses the Bullet Physics library to simulate gravity, collisions, bouncing, and the physics of the game world. This is actually a different type of physics library than, say, the fluid simulator or soft bodies. One of the challenges of working with the game engine is getting used to the differences. Animation and texturing, as examples, work a bit differently in the BGE than in the 3D modeling part of Blender.
Having said that, to make the cube participate, so to speak, in the game, we need to select the cube and click on the Physics buttons (all the way to the right). Right now, the settings for the BGE are not available to us. It appears as if the 3D physics options, such as Fluid and Cloth, are what's available. To make the BGE settings active, change the the renderer from Blender Render to Blender Game. Now the Blender Game Physics options can be set. To make the cube do its thing in the game engine, change the Physics type to Rigid Body. Note that the Actor check box is checked automatically.
This is enough to make the cube participate in the game. As in 2.4x, with the cursor in the 3D window, press the P key to start the Game Engine. The cube falls onto the plane, and rolls over a bit. Press ESC to go back to the 3D view.
Another way to start the Game Engine is to click on the Camera icon, the first one on the left, in the Properties Window. The buttons here also changed when we changed the view from Blender Render (which shows the image and animation settings) to Blender Game. Now, there's a big Start button. We can press the Start button to start the game as well.
Now we're going to add some interactivity to the game. We'll push the cube to the edge of the plane by nudging it a bit, until eventually the cube falls off into oblivion. To do that, we'll work with the bottom middle window. We'll maximize this window by pressing Control - Down Arrow. Then we'll zoom, using the Num- key, until we can see the Sensor, Controllor, and Actuators button groups. There are 3 Add keys. Click each Add key to add a Sensor, a Controller, and an Actuator. Here's the deal. The Sensor looks for some type of activity, in this case it's going to look for a particular key to be pressed. The Controller can control the logic as to what happens when that key is pressed. The Actuator determines what exactly happens after the sensor and controller logic has been set.
Let's make it so that when the user presses the R key, the cube moves a bit in the X direction. To do that, click on the Always dropdown in the Sensor area. Note that there are all types of sensors. We're going to use the Keyboard sensor. Select Keyboard. Position the mouse at the Key area, and left click. The prompt Press A Key displays. Press the R key. Any key will do.
Now go to the Actuators area. In the first Loc area, enter 0.5. The idea is that when we press the R key, the cube will go .2 Blender Units in the X direction. If you had entered 0.2 in the second area the cube would go .2 Blender Units in the Y direction, and similarly 0.2 in the 3rd area would make the cube go .2 Blender Units in the Z direction. There are other things you could have made the cube do, such as add a force or rotate (torque).
Finally, we need to hook up the Sensor, Controller, and Actuator. Connect the right socket of the Sensor with the left socket of the Controller. Then connect the right socket of the Controller to the left sockete of the Actuator. Now, when the BGE detects the R keypress, the cube will go .2 Blender Units in the X direction.
Let's see if this is what happens. Press Control-down arrow to return this logic window back to its original position. Click the Start button. The cube does what it did before. Now I will press the R key a few times. The cube bounces up a bit because that's what the Bullet Physics calculation might think a cube resting on its point might do as well. Eventually, the cube falls off the plane and bounces into space.
Let's add some more interactivity. Add an icosphere next to the cube (Shift-A, Mesh, Icosphere), accepting the defaults. Position the icosphere under the cube, between the cube and the plane. Go to the Physics tab. Give it a Rigid Body physics preoperty. Let's make the icosphere go .2 Blender Units in the -Y direction when we press the Space Bar. Maximize the bottom middle window, the one with the Sensor, Controller, and Actuator tabs. Press the 3 Add buttons for Sensor, Controller, and Actuator. Select the Keyboard sensor. Move the cursor to the Key area and left click. When prompted to press a key, press the Space Bar.
Press the P key in the 3D window to start the game. If you positioned the icosphere underneath the cube, watch the cube hit the icosphere and then react as if it was affected by the collision. Depending on how large the plane is and how big the cube and icosphere are, you might get different effects. The cube and or the icosphere might fall off the plane. Pressing the space bar causes the icosphere to move.
I hope this gives you a start with using the Game Engine in Blender 2.5. Press the SUBSCRIBE button on Youtube to make sure you won't miss my future BGE and Blender tutorials. Happy Blendering!
Sunday, January 17, 2010
Free Blender Render Farms
Join my Blender 3D forum where you can network with other Blender friends and get your Blender 3D questions answered.
One of the most significant challenges for Blender users is that, when scenes become complex, with meshes containing many thousands, or even millions, of polygons, complicated physics, many texture and material channels, many render layer passes, all of which are animated, render times on even a powerful PC can become unacceptably high. These can stretch into even days or weeks. You might think that you would need a Pixar-size budget to get acceptable render times. In fact, it's possible to significantly reduce render times, I mean by factors of 10 or 100, for free. The answer is to use one of the free render farm options available. I believe that Blender, combined with using one of these render farm options, can help you to approach Pixar-like, or Avatar-like, quality videos with a fraction of Pixar's budget, or even with no budget at all. That's why I call Blender "Pixar on your laptop". I hope Pixar doesn't sue me for this slogan. My goal for this video is to show you how to either create your own render farm if you have some spare PCs hanging around, and you have a wireless Internet connection, or how you can use one of the free, open source, to grab the computer power you need.
First, here's a quick and dirty way to create a render farm with some spare PCs that you have networked. The only real requirement is that you have enabled file sharing on, say, a Public folder in your network. I don't know what operating system - Windows XP, Vista, System 7, Linux, Mac OS X, whatever - that you're working on, but I'll assume that you have some way to share files. Once you've done that, create the Blend file that you want to render. Press the Scene button (F10) and in the Output directory, enter the name of the shared folder (I entered /IRA-PC/Public just as an example). Then press the Touch and the No Overwrite buttons. What this does is allow any temporary files to stay around. Save the file. Then copy the Blend file to the Public folder, making sure the file is shareable. The last step is to go to each PC on your network, open up the blend file, and press the ANIM button. Each computer will then start up at the next unrendered frame, thus sharing the rendering load. Try it. Tell us your results by going to my blog for these tutorials, at http://blender3dvideos.blogspot.com, and adding a comment.
OK, now suppose you don't have spare PCs available and want to speed up your renders like the big guys. No problem. There are a number of free, open source, render options available. I'll show you two of them. The most commonly used one is FarmerJoe, which you can download at www.farmerjoe.info (Make sure you use the .info suffix.) I haven't installed it, but I did download the zip file. The install appears to be simple enough. Unzip the file, in Windows, run the exe file, and then run the Python script to schedule jobs. There's a Web app server to check the status of your job. Again, try it and tell us your results by adding a comment to my blog at http://blender3dvideos.blogspot.com. I'll post the full URL of the blog page on the Youtube notes to this video.
Another possibility is the University of California, Berkeley's BOINC project, which uses the spare computer cycles of PCs around the world, available for anyone to share. You can join the network, at http://boinc.berkeley.edu and trade your idle CPU cycles with other PCs. There's plenty of idle computer time to go around. Why not make use of it?
Maybe you have other ideas? If so, please share them by commenting, either on my blog at http://blender3dvideos.blogspot.com, or leave a comment on this video. If you liked this, remember to hit the Youtube Subcribe button so you won't miss any of my future Blender tutorials. Happy Blendering!
One of the most significant challenges for Blender users is that, when scenes become complex, with meshes containing many thousands, or even millions, of polygons, complicated physics, many texture and material channels, many render layer passes, all of which are animated, render times on even a powerful PC can become unacceptably high. These can stretch into even days or weeks. You might think that you would need a Pixar-size budget to get acceptable render times. In fact, it's possible to significantly reduce render times, I mean by factors of 10 or 100, for free. The answer is to use one of the free render farm options available. I believe that Blender, combined with using one of these render farm options, can help you to approach Pixar-like, or Avatar-like, quality videos with a fraction of Pixar's budget, or even with no budget at all. That's why I call Blender "Pixar on your laptop". I hope Pixar doesn't sue me for this slogan. My goal for this video is to show you how to either create your own render farm if you have some spare PCs hanging around, and you have a wireless Internet connection, or how you can use one of the free, open source, to grab the computer power you need.
First, here's a quick and dirty way to create a render farm with some spare PCs that you have networked. The only real requirement is that you have enabled file sharing on, say, a Public folder in your network. I don't know what operating system - Windows XP, Vista, System 7, Linux, Mac OS X, whatever - that you're working on, but I'll assume that you have some way to share files. Once you've done that, create the Blend file that you want to render. Press the Scene button (F10) and in the Output directory, enter the name of the shared folder (I entered /IRA-PC/Public just as an example). Then press the Touch and the No Overwrite buttons. What this does is allow any temporary files to stay around. Save the file. Then copy the Blend file to the Public folder, making sure the file is shareable. The last step is to go to each PC on your network, open up the blend file, and press the ANIM button. Each computer will then start up at the next unrendered frame, thus sharing the rendering load. Try it. Tell us your results by going to my blog for these tutorials, at http://blender3dvideos.blogspot.com, and adding a comment.
OK, now suppose you don't have spare PCs available and want to speed up your renders like the big guys. No problem. There are a number of free, open source, render options available. I'll show you two of them. The most commonly used one is FarmerJoe, which you can download at www.farmerjoe.info (Make sure you use the .info suffix.) I haven't installed it, but I did download the zip file. The install appears to be simple enough. Unzip the file, in Windows, run the exe file, and then run the Python script to schedule jobs. There's a Web app server to check the status of your job. Again, try it and tell us your results by adding a comment to my blog at http://blender3dvideos.blogspot.com. I'll post the full URL of the blog page on the Youtube notes to this video.
Another possibility is the University of California, Berkeley's BOINC project, which uses the spare computer cycles of PCs around the world, available for anyone to share. You can join the network, at http://boinc.berkeley.edu and trade your idle CPU cycles with other PCs. There's plenty of idle computer time to go around. Why not make use of it?
Maybe you have other ideas? If so, please share them by commenting, either on my blog at http://blender3dvideos.blogspot.com, or leave a comment on this video. If you liked this, remember to hit the Youtube Subcribe button so you won't miss any of my future Blender tutorials. Happy Blendering!
Subscribe to:
Posts (Atom)
