Warm-up assignment: blender internal
Warm-up assignment: blender internal
Blender is a free, Open Source 3D modeling, rendering and animation software package. It runs in a variety of operating systems (Windows, Mac OSX, Linux, IRIX, Solaris, etc.) Its feature set is comparable to those found in other high-end, commercial software packages such as Maya, 3ds Max, Cinema 4D and SoftImage|XSI .
Blender supports a wide variety of tasks such as 3D modeling, UV unwrapping, texturing, texturing, rendering, animation (including character, keyframed and skeletal animation), particle systems, rigid body dynamics, fluid simulation, node-based material and post-processing compositing, among others. Also, its functionality is easily extensible through Python scripting.
Blender comes bundled with two renderers: the Blender Game Engine, which allows the user to make an entire videogame based on scripting through XML files and Python; and the Blender Internal renderer, which will described in the next section. Alternatively, Blender comes preconfigured and ready for integration with Yafray, another Open Source ray tracer.
Blender has been used in several commercial productions (including some of the effects in Spiderman 2). Blender’s most impressive short film up to date is Elephants Dream, a 10-min Open Source movie (all the production assets are available for free).
Tutorials and documentations can be found in the official site as well as in other sites in the Internet. Particularly, the online wikibook Blender 3D: Noob to Pro is a great learning resource.
Introduction to Blender
The pictures on the far left, top and middle left are scenes form the short film “Elephants Dream”, one of the strongest elements in Blender Internal’s portfolio.
The image on the right is an example of edge rendering.
overview of Blender internal
Blender Internal is the offline renderer that comes bundled with Blender. It was the renderer used in the production of Elephants Dream.
Blender Internal supports several rendering techniques:
•Scan conversion
•Ray tracing
•Radiosity
Additionally, it supports the following effects as part of one of the above mention rendering techniques:
•Render layers (for node-based compositing)
•Environment maps
•Shadows
•Ambient Occlusion
•Anti-aliasing through oversampling, with several filters for reconstruction (box, tent, quad, cubic, Gaussian, Catmull-Rom, Mitchell-Netravali)
•Edge rendering (cartoon stylization)
•Motion blur (images are rendered more than once and averaged out)
•Vector blur (objects have velocities defined, which are used for blurring)
•Panoramic rendering
•Texture baking
•Multiple output and compression formats for still images (JPEG, PNG, BMP, Targa) and video (Quicktime, AVI, etc.)
•Preset resolutions (NTSC, PAL, HD, etc.), besides custom resolutions.
Blender Internal supports all the primitives available to Blender:
•Polygon meshes (planes, cubes, circles, UV spheres, icospheres, cylinders, cones, torii)
•Bezier curves and circles
•NURBS curves, circles, surfaces, tubes, spheres and donuts
•Meta elements (balls, tubes, planes, ellipsoids and cubes)
•Subdivision surfaces
•Digital sculptures
Description of the controls
For purposes of this explanation, we will assume there is a scene already defined in the application (explaining how to add geometry and other content falls outside of the scope of the presentation of the renderer).
The following screen shows Blender’s user interface, with the rendering button set shown:
The panels at the bottom show the controls that determine how Blender Internal will render the scene. Each one of them will be explained individually.
The Output panel determines settings with regards to storage management, multithreading and other logistical characteristics of the rendering process.
•The first file dialog determines where the final result of the rendering is stored. The file name can be specified here as well.
NOTE: Alternatively, after the rendering is done in the Render window, it is possible to press F3 and save the resulting still image.
•The second file dialog and the Backbuf button allow the user to turn on and specify a background image for the render.
•The third file dialog allows the user to specify a file with a colormap (RGB or RGBA values are then used to index into this colormap).
•The Edge and Edge Settings buttons turn on and manage edge rendering, a kind of cartoon stylization for the rendering process. An example is shown in the images at the top of this webpage.
•The Threads slider sets the number of system threads to be used in the rendering. In multicore machines, each core is assigned a specific number of threads as to balance the workload.
•The Disable Tex allows to quickly disable the use of texture in the rendering (for debugging purposes)
•The Free Tex Images preemptively deallocates texture form memory in order to free up RAM for the rendering. This is useful in texture-heavy scenes.
•The Save Buffers button determines whether intermediate frames should be saved to disk while rendering. This is especially useful when rendering very large images, although taking a rendering speed hit.
•The Render Location button grid (lower left corner) allows to specify the default location to place the Render window (with respect to Blender’s main window). This is used to avoid window cluttering in the screen.
•The Render Window drop-down menu determines whether the rendering will be done in a pop-up window (Render window), a full-screen window or if it will be piped-up into Blender’s image editor.
•The Extensions checkbox determines whether Blender will automatically add the extension to the filenames of the rendered images.
•The Dithering input field determines the amount of noise to add to the rendered image.
The Render Layers panel determines how scene layers and render layers will be used in the rendering. Blender allows the objects in the scene to be organized into different scene layers that can be turned on and off, both when displaying them in the 3D view or in the final render. Also, there exist different render layers, which act as render targets. Mappings between scene layers and render layers can be specified. This is useful for visualizing how individual objects in the scene would be rendered without bothering with rendering all the objects in the scene.
Also, each render layer can have specific settings indicating what kind of passes (specular, diffuse, shadows, occlusion, etc) and what kind of effects (halo, edge rendering, etc) will be used.
The panel includes the following controls:
•The first set of 20 buttons show the scene layers currently displayed in the 3D view.
•The drop-down menu shows the name of the current render layer, and it also allows to create new ones or delete existing ones.
•The second set of 20 buttons determines which scene layers will be used for the rendering of the current render layer.
•The state buttons under “Layer:” determine which rendering effects will be included in the current render layer. These are applied one on top of the other one in the following order (left-to-right): AllZ (enables Z buffering for all faces, including non-visible ones, for masking purposes), Solid (displaying of faces with procedural materials), Halo, Ztra (Z-transparency), Sky (displaying background image) and Edge (cartoon rendering).
•The Light input field allows to specify a specific group of lights to be used in this render layer. If none is specified, all lights in the selected scene layers will be employed.
•The Material input field allows to specify override the materials for the objects in the render layer with one. This is also done for debugging and preview purposes.
•The next row of buttons allows to specify which passes will be part of this render layer.
The passes that can take part in the rendering of a render layer are the following:
•Combined: all RGBA values
•Z: Z-buffer
•Vec: velocity vectors, used for vector blurring
•Nor: normal map, useful for bump mapping
•UV: UV mapping for textures
•IndexOb: object index, used for masking
•Col: shade-less color pass
•Diff: diffuse pass
•Spec: specular pass
•Sha: shadow casting
•AO: ambient occlusion, only useful with ray tracing
•Refl: reflective pass
•Ref: refractive pass
•Rad: radiosity pass
The use of passes allows the definition of arbitrary pipes of data among all the different buffers. This is done with the Node Editor (shown in the following picture), which allows to map different properties of the objects and the rendering.
The Render panel sets the settings that define the rendering process itself.
•The RENDER button starts the process of producing one still image.
•The drop-down menu below the RENDER button allows to set which renderer will be used. In our case, this is set to Blender Internal, but Yafray can be used if installed on the system.
•The set of buttons on the top-right corner determine which techniques will be applied on top of scan conversion: shadow casting, use of environment map, panoramic rendering, ray tracing (for reflection, refraction and shadow casting purposed) and radiosity (for soft shadows and texture baking).
•OSA stands for oversampling, and these buttons turn it on and also determine how many samples per pixel to use (5, 8, 11 or 16). Note: the oversampling is not done randomly, the samples have a uniform distribution over the pixels. The drop-down menu and the slider close to the lower-right corner of the panel allows to define which reconstruction filter to use.
•MBLUR: Motion blur, the slider specifies the blur factor.
•The Fields button turns field rendering, which produces generates pairs of images with interlaces scan-lines (useful when the output will be displayed on an interlaced display, such as a TV). The Odd button ensures the odd scanlines are rendered first, as it is the case with NTSC.
•The buttons in the middle-right allow to quickly modify the size of the current render as percentage.
•Xparts and Yparts allows us to determine in how many individual pieces the rendering will be split into. A larger number allows the user to see the progression of the rendering better, and also the rendering would require less system memory, but it also undermines data caching and speed. The default is splitting the rendering into a 4x4 grid.
•The Border button renders only a small cut-out of the image.
•The buttons on the lower left corner determine some miscellaneous options, such as using the background image (Sky), multiplying the alpha channel in advance (Premu) and leaving RGBA colors intact (Key).
The Anim panel controls the rendering of an animation.
•The ANIM button starts the process.
•The Do Sequence button turns on video sequencing, which allows to combine several images into a video for doing effects such as cross-fading. It is necessary to use a screen in the Blender UI called Video Sequence Editor to specify how sequencing is to be done.
•The Do Composite button turns on compositing. This allows the output of one rendering pass to be used as an input for a subsequent rendering pass. It is necessary to use a screen in the Blender UI called Node Editor to specify how compositing is to be done.
•The PLAY button displays the last rendered video clip or still image rendered.
•The Sta and End sliders specify the frame numbers for the first and last frame of the videoclip to be rendered.
•The rt slider is a hack added by Blender developers to easily test features being debugged. They simply decided to leave it in the final release in order to enable easier debugging in future versions of the software.
The Bake panel is used to specify parameters for texture baking.
NOTE: this texture baking simply uses scan conversion. It is possible to use radiosity in Blender Internal for better texture baking results (soft shadows, etc), but this is done in a different manner.
•The BAKE button starts the texture baking. This swaps the UV-mapped texture for the result of this baking pass.
•The buttons in the upper-right corner form a radiobutton group (only one can be selected). The options are Full Render (the output is the RGBA colors), Ambient Occlussion (AO map), Normals (normal map) and Textures (material and texture color, no shading).
•The Clear button changes the color of the pixels of the texture to the background color before baking it (enabled by default).
•The Margin slider specifies how many pixels beyond the limit of the UV “islands” should the baking render.
The Format panel specifies the parameters of the resulting file.
•The Game framing settings button opens a dialog that allows to specify parameters for exporting a videogame for the Blender Game Engine. This falls outside of the scope of this presentation.
•The sliders in the middle allow to specify the image resolution and aspect ratio for the resulting still image or the frames of the resulting video.
•The buttons on the right contains several resolution preconfigurations.
•The drop-down menu determines what kind of output format the rendering will be saved in.
•The crop button tells the renderer to crop the resulting image when the Border option is enabled.
•The Quality slider specifies the quality of some of the compression schemes that can be selected in the drop-down menu. When required, this slider turns into a toggle button that opens the appropriate codec configuration dialog.
•The next slider specifies the framerate of the resulting video clip.
•The radiobuttons at the bottom determine if the image will be black & white, RGB or RGBA.
Once all of the desired parameters have been set, simply press the RENDER button (for still images) or ANIM button (for video) and Blender Internal will start the rendering process.
Example renderings of scenes from the community
I rendered the following scenes I obtained from the Internet:
Spider: 3.71 seconds
For my own scene, I used a scene with an animation of a juggling act. I created it about a year ago as part of an assignment for the animation class.
In order to make it more interesting, I modified the materials of some of the objects in order to show some of Blender Internal’s capabilities. I made the animated figure of a refractive material, the floor of a reflective one, and I added halo and ringing effects to the juggling pins. I also added ray tracing to the scene in order to achieve these effects. Also, I added a backbuffer, and motion blur has been turned on. The entire scene took 1 hour to render.
Evil Monkey: 4.35 seconds
Faces: 1.15 seconds
Bouncing ball (example of vector blurring): 8 minutes 10 seconds
Ship: 5 minutes 48 seconds
Fairy Castle (example of particle system): 1 minutes 17 seconds
Plastic shader: 7.92 seconds
My rendered scene
The files needed to render the animation are the following:
Make sure the .jpg file is placed in the path for the backbuffer as specified in the Output panel.
The scene was fairly easy to set up once the user has become familiar with Blender’s user interface (which has been reported to have a steep learning curve, especial to those already familiar with other DCC tools). I simply created the polygon meshes, modified them to the shapes I wanted, subdivided the faces, smoothed the normals, specified the material properties and defined the rendering parameters as explained earlier in this page.
The things I liked about Blender Internal are:
•Its tight integration with Blender. Rendering becomes a much more coherent step in the pipeline, since there is no need to recur to external tools for it. Since Blender can import objects and scenes from many different formats, its tight integration does not become a burden.
•The wide range of parameters that can be specified for the rendering. Also, most of the parameters were very self-descriptive.
•The large number of features supported (oversampling, ray tracing, radiosity, blurring, etc.)
•The in-context help available (through tool-tips).
The things I did not like about Blender Internal are:
•The arrangement of the controls. Blender’s UI has been harshly criticized by people migrating from other tools, and this may be simply due to the unfamiliarity with the UI paradigm. Blender’s UI paradigm allegedly allows for a more efficient workflow (and I agree to this), but some of the decisions with regards to the layout of the controls seems arbitrary or counter-intuitive at times.
•The lack of documentation for advanced features.
•The lack of freely available 3D content (this is surprising for an Open Source tool).
Overall, I am very satisfied with this renderer, and I would recommend it to others. The only thing to keep in mind is that Blender is not an industry standard, so learning Blender and Blender Internal may not be a good option if one wants to go into the animation industry. Otherwise, It is an excellent option, as demonstrated by the movie Elephant Dream.
Assessment and conclusion