Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
blender [2015/08/31 04:12]
slackermedia [Renderers]
blender [2021/06/03 19:48] (current)
Line 169: Line 169:
  
 {{anchor:​crashcourseblender}} {{anchor:​crashcourseblender}}
-===== Blender Crash Course+===== Blender Crash Course ​=====
  
 3d graphics is a complex subject, and the applications that generate them can be intimidating. A full course on Blender is out of scope for this article, but sometimes the hardest part of getting started with a new application are the first few steps. This "crash course"​ demonstrates how to generate some CGI objects, texture them, and then render the shot (a still image or animation) to disk.  3d graphics is a complex subject, and the applications that generate them can be intimidating. A full course on Blender is out of scope for this article, but sometimes the hardest part of getting started with a new application are the first few steps. This "crash course"​ demonstrates how to generate some CGI objects, texture them, and then render the shot (a still image or animation) to disk. 
  
 <WRAP important>​ <WRAP important>​
-Learning 3d applications is more than just learning the application;​ it's also learning the way that 3d on a 2d surface is implemented. In order to complete this quickstart, you should have some basic 3d experience. If you are completely new to the genre, start with something even more basic than this. The initial episodes of [Blender for Motion Graphic Artists|http://​www.youtube.com/​watch?​v=7FBoegkgIho] are highly ​recommended.+Learning 3d applications is more than just learning the application;​ it's also learning the way that 3d on a 2d surface is implemented. In order to complete this quickstart, you should have some basic 3d experience. If you are completely new to the genre, start with something even more basic than this. The initial episodes of [[Blender for Motion Graphic Artists|http://​www.youtube.com/​watch?​v=7FBoegkgIho]] are particularly ​recommended.
 </​WRAP> ​ </​WRAP> ​
  
Line 185: Line 185:
 </​WRAP>​ </​WRAP>​
  
-Add a new cube. To add an object, place your mouse cursor in the 3d workspace ​of Blender (the main window, where the first cube was located before you deleted it) and press the **spacebar** and type "Add Cube", or use the menu **Add > Mesh > Cube**+==== Working with 3d Objects ==== 
 + 
 +Add a new cube. To add an object, place your mouse cursor in the 3d viewport ​of Blender (the main window, where the first cube was located before you deleted it) and press the **spacebar** and type "Add Cube", or use the menu **Add > Mesh > Cube**
  
 [{{ blender_addCube.png | Add a basic cube. }}] [{{ blender_addCube.png | Add a basic cube. }}]
  
-Also add a plane for variety. To add a plane, press the **spacebar** and type "Add Plane",​ or use the menu **Add > Plane**+Also add a plane for this exercise. To add a plane, press the **spacebar** and type "Add Plane",​ or use the menu **Add > Plane**
  
 [{{ blender_addPlane.png | Add a plane. }}] [{{ blender_addPlane.png | Add a plane. }}]
  
-Scale (resize) the plane and move the cube so that the cube sits on the plane with enough of a "​ground"​ for reflections and fancy effects like that. To scale an object, press the **s** key on your keyboard. To grab onto things and move them, press the **g** key on your keyboard. Moving around in a 3d space takes practise, so if you're new to 3d applications entirely, you might spend a few hours just practising navigating the space.+Scale (resize) the plane and move the cube so that the cube sits on the plane with enough of a "​ground"​ for reflections and fancy effects like that. To scale an object, ​hover your mouse cursor over the object and press the **s** key on your keyboard. To grab onto things and move them, press the **g** key on your keyboard. ​
  
-It often helps to move objects either by number or by axis.+To release an object in Blender, left-click. 
 + 
 +It often helps to move objects either by number or by axis:
  
 * To move by axis, press **g** and then **x** (or **y** or **z**, depending on which axis you want to move along). Defining an axis immediately after a transform key (such as **g** for grab, **s** for scale, or **r** for rotate) constrains all motion along that axis). * To move by axis, press **g** and then **x** (or **y** or **z**, depending on which axis you want to move along). Defining an axis immediately after a transform key (such as **g** for grab, **s** for scale, or **r** for rotate) constrains all motion along that axis).
 * To move objects by numbers, press **n** to birng up the properties panel. Use the **X**, **Y**, and **Z** fields to manipulate the location and size of the cube. * To move objects by numbers, press **n** to birng up the properties panel. Use the **X**, **Y**, and **Z** fields to manipulate the location and size of the cube.
  
-To release ​an object in Blender, ​+[{{ blender_scale.png | Scaling an object. }}] 
 + 
 +==== The Camera Object ==== 
 + 
 +When you are rendering something, you are transferring it from 3d space into 2d space. So you always render from the point-of-view of a camera. 
 + 
 +By default, you have one camera in your viewport. You can grab it and move it around just as you can any other object. ​To actually see through its lens so you know what you will see in your final render, press the **0** on your *number pad*. To get back to normal ("​perspective"​) view, press **5** on your number pad.  
 + 
 +[{{ blender_camview.png | Through the lens. }}] 
 + 
 +==== Lighting ==== 
 + 
 +The fact that you can see anything at all in your Blender workspace is only because there'​s an imaginary worklight on, but that worklight will not render. It's just a worklight, it's not on your virtual set.  
 + 
 +To add a lamp, press the **spacebar** and type "add lamp", or use the menu **Add > Lamp > Area**. 
 + 
 +[{{ blender_lamp.png | Summon your inner gaffer.}}] 
 + 
 +Like 3d objects and cameras, you can grab and move a lamp, but you might notice that it is difficult to light a shot when there is no indication what affect a lamp has on your scene. To see a preview of what your scene looks like under different lighting situations, switch your Blender viewport into **Texture shading**: click the **Display** pop-up menu at the bottom of your viewport pane.  
 + 
 +[{{ blender_texturedview.png | Switch to Textured View.}}] 
 + 
 +Now if you move your light around your workspace, you should be able to see a better indication of what effect it will have upon your scene. 
 + 
 +[{{ blender_adjustlamp.png | Adjust the position of your lamp to suit.}}] 
 + 
 +To see what you have so far, do a single-frame render. Press **F12**, or use the menu **Render > Render Image** in the top menu bar of the Blender window.  
 + 
 +Press **Escape** to exit the render view. 
 + 
 +[{{ blender_renderframe1.png | A basic render of a basic scene.}}] 
 + 
 + 
 +==== Textures, Materials, and Maps ==== 
 + 
 +Texturing works differently,​ in Blender, for polygonal objects and vector shapes, so the process will be different on the cube and the plane. 
 + 
 +All objects in Blender, however, need a *material*. Without having a defined material, ​an object ​is *immaterial*;​ there isn't really an equivalent in the real world, but you might imagine that everything you create ​in Blender ​is made of olddull clay until you give it a material. 
 + 
 +<WRAP tip> 
 +Remember: you cannot texture an object that has no material. You cannot UV map an object that has no material. Think of any object in Blender that has no material as *immaterial*,​ like the lamps and the camera; they have no material and likewise cannot be textured by you. 
 +</​WRAP>​ 
 + 
 +=== Material === 
 + 
 +First add a material to the plane object. 
 + 
 +**Right-click** on the plane to select it, and then click on the **Material** tab of the **Properties** panel.  
 + 
 +[{{ blender_newmaterial.png | Add a material in the Properties panel. }}] 
 + 
 +Click the **New** button to create a new material and assign it to your plane. 
 + 
 +Once your plane is "​made"​ of something, or else has a "​tangible"​ shell around it (if you prefer), make it reflective, like a mirror. ​ Activate the **Mirror** attribute in the **Material** tab and raise the reflectivity to **0.8** or so. 
 + 
 +[{{ blender_mirror.png | Create a reflective material. }}] 
 + 
 +Perform a test render and notice that the plane is now reflecting the cube. 
 + 
 +[{{ blender_mirrorrender.png | A rendered mirror effect. }}] 
 + 
 +Press **Escape** to exit the render screen. 
 + 
 +Apply a basic texture to your cube before continuing. Don't make it reflective or anything fancy, since you are going to use it as a target for a UV map. 
 + 
 +=== Texture === 
 + 
 +A *texture* is a pattern or algorithmically generated image that is "​painted"​ onto a material. In this example, we will use the generic textures that come bundled with Blender. 
 + 
 +To create a new texture for your cube, click the **Texture** tab in the **Properties** panel. 
 + 
 +[{{ blender_cubetexture.png | Texture tab in Properties panel. }}] 
 + 
 +By default, the texture applied to your cube will be a cloud pattern. Feel free to try out other patterns found in the **Type** pop-up menu.  
 + 
 +[{{ blender_cubemarble.png | Generated Texture. }}] 
 + 
 +Perform a test render and notice that the texture is not only applied to the cube, but is accurately reflected in the plane.  
 + 
 +[{{ blender_cuberender.png | A simple render with texture. }}] 
 + 
 +=== UV Map === 
 + 
 +UV Mapping is a common trick in texture departments and is often used in video games because it's fast to render. They are also fairly fast to create since a UV map contains no 3d data itself; it's actually a 2d image "​projected"​ onto a 3d object. This is why, if you play any 3d games, you might notice that while an old well-worn wooden cabin door looks very realistic when it is far away, if you get too close to it, it starts to look very pixelated and 2 dimensional. 
 + 
 +UV mapping can get very detailed, because you can project 2d images onto very complex 3d surfaces, and you can even use colour information within the projected image to provide pseudo-3d depth. 
 + 
 +To perform simple UV mapping, make sure you are still in the **Texture** tab on the **Properties** panel. 
 + 
 +In the Texture tab, deactivate the texture that is currently on your cube, and then click the **New** button to create an empty texture slot. 
 + 
 +To assign an image to the texture, click on the **Type** pop-up menu and select **Image or Movie**. 
 + 
 +[{{ blender_uvimage.png | Create an image texture. }}] 
 + 
 +Scroll down as needed to the **Image** section of the **Properties** panel and click the **Open** button. 
 + 
 +[{{ blender_uv.png | Assign an image to the texture slot. }}] 
 + 
 +Upon clicking **Open**, the main panel of Blender becomes a file browser. Find an image and select it. There are many sites online that feature free textures, so you may find some nice images that way, but for now any image will do. 
 + 
 +You can adjust the mapping of your image in the Mapping section of **Properties** but for now, do a render and notice how the image has been stretched around the cube.  
 + 
 +[{{ blender_uvrender.png | Simple render of a textured object. }}] 
 + 
 +There are far more detailed methods of doing a UV Map, whereby a 3d object is split at the "​seam"​ and the image is designed to wrap gracefully around the object. But for now, let's leave this as is and continue with the crash course.  
 + 
 + 
 +==== Rendering Multiple Frames ==== 
 + 
 +So far, we have only rendered a single frame. You may be a single-frame artist but frequently when working in Blender it's to do animation. Let's do a simple animation and then render out the array of rendered images. 
 + 
 +First, make sure you are on frame 1 (by default, you are). You can enter a frame manually in the number field at the bottom of the screen (just to the right of the **End** field), or drag the playhead to frame 1. 
 + 
 +[{{ blender_frame1.png | Move to frame 1 in the Blender timeline. }}] 
 + 
 +**Right-click** on the cube object and then press the **i** button on your keyboard to insert a keyframe. Choose the **Rotation** keyframe from the contextual menu that appears.  
 + 
 +[{{ blender_framerotation.png | Insert a rotation keyframe. }}] 
 + 
 +Using the **Timeline** panel, advance 99 frames ahead.  
 + 
 +[{{ blender_frame1.png | Move to frame 1 in the Blender timeline. }}] 
 + 
 +Using the Timeline panel, advance 99 frames ahead.  
 + 
 +Rotate the cube as close to 360 degrees as convenient. To rotate an object, right-click the object to select it, and then press **r** and then **z** (remember, the **z** constrains the rotation to the z-axis). 
 + 
 +Press **i** again to insert a second rotation keyframe. 
 + 
 +[{{ blender_framerotation.png | Insert a second rotation keyframe. }}] 
 + 
 +After you have rotated the cube, change the **End** value in the **Timeline** panel to 99. This will make it so that you are only rendering the 99 frames you actually need for your complete animation, rather than the default 250. 
 + 
 +[{{ blender_frameEnd.png | Set the end of the animation to 99. }}] 
 + 
 +If you were to press **F12** at this point, you would only get a single frame rendered. Rendering an animation is, essentially,​ doing *that* 99 times; the end result is 99 still images. That is the default method of animation and VFX; still images are rendered to disk, and then imported into a video editor (which usually see image sequences as makeshift movie files). 
 + 
 +The default location for rendered frames is **/tmp** which is fine for temporary work but it's better to change the destination location to a directory in an actual working directory.  
 + 
 +To set your render attributes, click the **Render** tab in the **Properties** panel. 
 + 
 +[{{ blender_frameOutput.png | Setting render attributes. }}] 
 + 
 +Scroll down to the **Output** section of the **Render** tab and click the **folder** icon to define a location for your rendered frames. 
 + 
 +Navigate to the **Render** menu in the top menu of the Blender window and select **Render Animation**. 
 + 
 +Once the animation has rendered, find the rendered images in the directory you defined as the target destination for your animated sequence. You might use [[ffmpeg]] to string these together or play them back, but Blender has an inbuilt animation player. 
 + 
 +Click the **Render** menu at the top of the Blender window and select **Play Rendered Animation** or just press **Control+F11** on your keyboard. 
 + 
 + 
 +That's the basics of a mere subset of the features in Blender. While everything covered has been very basic, this workflow is close, in a very simplified form, to the usual 3d workflow; model, texture, animate, render. Practise those steps and develop each one as you learn more and become more skilled, and you will be making great 3d animations and rigs in no time.