Thursday, May 31, 2012

Dope Sheet

This is an intro to the Dope Sheet.  Although it can be brought up in any view, the Dope Sheet is commonly found in the Animation view [CTRL+LEFT].

This view plays a key role in editing animations. From my observations and uses of it, the primary functions of the view include:

  • Deleting Keyframes [X]
  • Moving Keyframes [G]
This tool can be worked with in conjunction with the Graph Editor for complete control of animations.

Curl Animation

This entry shows how to perform a mesh curling animation using a Lattice. In this example we will simply be curling a Grid which will be referred to in the scene as Paper.

In the starting scene we have a number of items, the Paper, the Lattice and an Empty (Lattice Origin).  The Paper is going to be deformed, and the Lattice will be used to do the deforming, but the Empty is a little more obscure.  The Empty has two functions.  First it is set as the Parent of the Lattice, to control the orientation of the bending (when we get there).  Second, the Empty acts as the origin from which the bending begins.


To set this up, on the Lattice change its settings to match the mesh, giving it a flat height, only two lengths but several widths for the deformation of the curling.

Next on the Paper, apply the Lattice Modifier and set the Object to the Lattice so that it can be affected by the Lattice.

Finally back on the Lattice, add a SimpleDeform Modifier, and set the type to Bend.  You'll notice that on first application, the Bend with neither be in the desired direction for curling, nor will it start the bend at the Empty.  This is where assigning the Empty to the Origin field and checking Relative will help.  Also turning the empty 90 degrees will turn the bend into the right direction.

At this point, all that's left is to Keyframe [I] the Deform>Factor by holding the mouse over the field and hitting [I], and you can create the following animation:


Quick Mesh Mirror

This is a quick tip on how to mirror a mesh very easily.  Sometimes mirroring is needed with meshes, and a rotation won't suffice.  In this case, I have the left half of suzannes face, but suppose I need the right side.  I could use a Mirror Modifier, and then apply and delete the old half, but a simpler and cleaner method is to Scale to -1.  

You can even use this method with restricted axis.  So I simply Scaled [S], restricted to the x-axis [X], and entered -1.  This produced a perfect mirror of the mesh while maintaining the original mesh origin.  No deleting necessary.

Object Transforms

This entry is a summary of the object level transform functions.

To perform standard operations on a mesh in the Object Mode.

[G] to translate
[R] to rotate
[S] to scale

All of these can be restricted to the standard Cartesian Axis with [X], [Y] and [Z] respectively.

Specific values can be entered for more precise deltas.

Conversely dual axis changes can be applied with [SHIFT+X], [SHIFT+Y] and [SHIFT+Z]. Where the axis selected is the one that is omitted from the transform.

All transform changes can be viewed in the properties panel [N].
In this panel specific values can be set, or values can be Locked.

All transforms can be reset:

[ALT+G] to reset translate
[ALT+R] to reset rotation
[ALT+S] to reset scale

All transforms can be applied (keep but reset references) with: [CTRL+A]

Outliner

This is a quick entry on some features of the Outliner--the view that displays the hierarchy of the objects in the scene.  The first concept is the visibility filter.  The combo box at the bottom which defaults to All Scenes, can be changed to any of the different filtering views.  

One that would be very helpful would be to set Visible Layers which helps make the Outliner more relevant if moving irrelevant (but needed) objects to other layers.

The next feature which is relatively new (probably 2.6) is the ability to drag and drop objects in the Outliner to achieve parenting.  The icons must be grabbed for this to work, not the name.  As well parenting can also be achieved with [CTRL+P] with the parent object being selected last.

Finally, it's worth mentioning the three icons on the right of every listed object.  These icons toggle visiblity in the scene (eye), selectability (arrow), and visibility in render (camera) respectively.

Friday, May 25, 2012

Specular Texture

This entry covers the topic of Specular Textures.  Essentially it is applying a grayscale texture as a specular map, to give an object a non-uniform specularity.  To demonstrate, I have a model of a hex bit that has a single material that is a solid gray with the standard uniform specularity.  I'll be adding a stretched cloud texture to give the bit a more brushed metal look.


The first step is to remove the material specularity.  This can be done by dropping the Intensity to 0.  The Hardness should me maintained however, or possibly increased.

Next create a new texture for this material.  Regardless of what you use for the texture, be it an image or a built-in Blender texture, essentially the main parameters to change are in the Influence section.  Uncheck the Color in Diffuse and check the Intensity in the Specular.  Now the light values of the texture will provide high specularity while the dark parts will provide less.

From here, the nature of the specularity is up to your creativity.  I used the following settings with the built-in cloud texture to produce the brushed metal look in the final render below.

Final render with the specular map applied.  The metal almost seems to have a normal map feel, but it's purely just specular map reflection.

Monday, May 21, 2012

Alternate Input

This entry covers some quick tips about using Blender in the less than ideal configuration.

So the ideal configuration is using a 2-button mouse with a scroll wheel, and as well as a keyboard with a dedicated number pad or NUMPAD.

There are many scenarios where this ideal configuration isn't available (i.e. ergo mice, laptop, track pad, mac etc).  So here are some quick tips for working with these configurations:

If you have a middle mouse button, and therefore can't middle click, you can emulate the 3rd button by checking the Emulate 3 Button Mouse in the User Preferences window under the Input tab.  What this does is allow you to [ALT+LEFT-CLICK] to perform a middle mouse click.

In the same window, to mitigate a keyboard that has no dedicated numpad, you can also Emulate Numpad by checking that respective box.  What this will do is override your regular number keys which would normally control your layers, and apply the NUMPAD views instead.

There are two scenarios where having a scroll wheel is very handy.  One is adjusting how many ring-loops are applied when you [CTRL+R] to insert an edge loop.  Changing the number of rings can also be achieved by [PAGE UP] and [PAGE DOWN].

This is the same as the ring loops, when working with Proportional Editing [O], Paint Select [C] or any tool that has a radius control, you would normally use the scroll wheel to adjust the size of affect.  You can also use the [PAGE UP] and [PAGE DOWN] here as well.

Note that there are known issues with Logitech Mice not functioning correctly upon first connection.  In these cases, open the Logitech driver/software, and set the Scroll Wheel button to be either Middle Button or Middle Click instead of its standard Zoom or AutoScroll.

Sunday, May 20, 2012

Texture Atlas



This entry will cover a very important technique for providing improved texture detail on meshes for gaming purposes while minimizing the number of materials needed.  In gaming it is very important to have as few materials as possible, as every unique material in a mesh requires a separate 'Draw Call'.  So if possible you want to combine your materials into one single map (or Texture Atlas).  

In our example I've started with a sphere that has been UV unwrapped via a seam [CTRL+E] around the equator. 
I applied two different materials, one a brick image and one a rug image.  So to begin, we have a single mesh wit two materials, each with their own image texture UV mapped onto the sphere.  The goal is to combine these two materials into one.

To combine the two, we will essentially be baking the rendered textures onto a new UV map on the sphere. So on the mesh tab, press the [+] button on the UV Maps panel, and name the new map.  In this image I named it 'BakedUVs' but later I'll refer to it as just 'Baked'.

Note: For the baking to work be sure that the new UV map 'BakedUVs' is selected.

At this point, go to the UV Editor [CTRL+LEFT] view, you can view the UV unwrapping for this new UV map.  You can change it, but I've had the most success just leaving it the same as the original.  However, you do need to create a new image.  This should appear as a black square behind your map.

Also note that the mesh must be selected (highlighted orange) while in this view (as shown below).


Next is the baking, but before you move onto this step, in the case of a sphere, to make the texture looking cleaner and smoother, I applied a subsurf and smooth shading to it.  The baked textured will be based on the render, so any of these features will be applied by the bake.

Go to the Render Tab, and at the very bottom you'll find the Bake section.  You don't need to change any parameters just hit Bake.




If you return to the UV Editor window you should now be able to see your new texture baked onto the new image.  This now has both materials on one texture, and the lighting from the rendered scene can now be seen (most obviously on the brick side of the texture).  

Note: Make sure to save this new image.


The following steps will simply show how to reduce your materials down to one to be transferred into a gaming engine such as Unity.  You may want to save as a different filename to preserve the original two-materials in case you want to change it and re-bake.

The first step is to remove the other (original) UV map and just keep the new baked UV map.

The next step is to create a new single material, so the other two can now be removed.

Finally, on the new material, add a new texture and assign the new Texture Atlas which was created from the bake, and make sure the new UV Map is selected.

 Now when rendered, you have both textures/materials applied while using only one material.

The ultimate benefit now is if you export the file to an FBX and transfer the model with its texture into Unity, you can get the same texture detail, now with one UV map and one material.  Note in the stats window that the draw call is only 1.

Friday, May 18, 2012

Camera Track Object

This entry is just a simple demonstration of enabling camera tracking on an object.  This is not the camera tracking related to video footage, but forcing the in scene camera to point at an object in your scene.

This video shows a quick demo of it.  To enable the feature, select the Camera first, then select the target object.  Then enter [CTRL+T], and select Damped Track Constraint.  At this point, if you move the camera with [G], the camera will always point at the selected object.  

Also, note that if you rotate [R], the camera will always rotate according to the vector of the camera.  This feature is very similar to the idea of a Quaternion.



Wednesday, May 9, 2012

Edge Functions

This entry will cover most of the functions defined in the Edge menu which can be brought up in Edit Mode, with the [CTRL + E].

Edge Loops
The first and most important edge tool is the adding edge loops [CTRL + R].  This is the primary method of adding vertex detail while maintaining quads in your topology.

An edge loop can also easily be selected by [ALT + RightClick] an edge in the loop.

An edge loop can be easily deleted by selecting the loop and pressing [X] then selecting Delete Edge Loop.

An edge lop can be easily moved along its edges using the Edge Slide function.

Edge Creases
When using the Subsurf Modifier, it is common to use extra ring-loops to tighten up the corners.  A better method which does not require more vertices is to select the edges desired to be tightened and to adjust the Mean Crease found in the properties bar [N].  This is the same function as the Edge Crease in the edge menu.  Mean creased edges are identifiable on the mesh with a magenta color.

Marking Seams
The function of marking seams in your mesh is to isolate particular faces for UV unwrapping.  In the example
I marked the top circular edge of the cylinder, so that when I UV unwrapped it, it's its own island in the UV map.  UV marks are highlighted as magenta colored edges (which is ambiguous with the mean creased edges).

  


Marking Sharps
The function of marking sharps is the same as marking seams, except that the purpose for marking sharps is to give you more control of a smooth shaded surface.  For example, this simple extruded box shape is smooth shaded, and has the typical weird shadowing (as would be expected).

This weird shading can be mitigated by applying an Edge Split Modifier, which essentially, breaks apart the faces so they are separate (meaning duplicated vertices), so the vertex-normal-interpolation that is performed is isolate to the normal of the face to which it is attached (still with me?).  Empirically, this just makes all the edges sharp again (and the faces look flat).

The modifier gives you some control in the form of the Split Angle, but in some cases that is not enough control.  In some cases you may want to specify which edges/faces exactly that you want excluded from the rest of the smooth calculation.

This is where Mark Sharp comes in.  It works in tandem with the Edge Split Modifier.  For all faces (or set of edges creating faces) selected, when you apply Mark Sharp, the Edge Split modifier automatically assumes it to be split rather than relying on the split angle test for the edge.

In this example I marked the sides as sharp, so the side faces now look nice and crisp and flat, and the top faces are still smoothed together.
This same function can be achieved without the Edge Split Modifier by simply selecting the faces and choosing Edge Split in the edge menu.

Bevel (Reference)
Info on this can be found here: Bevel

Bridge Two Edge Loops (Reference)
Info on this can be found here: Bridge

Monday, May 7, 2012

Animation Blur

This entry covers the function of adding blur to animations.  This can be done by enabling the Sampled Motion Blur box in the Render tab.  There are two parameters that can be adjusted, Motion Samples increases the fidelity of the blur, while Shutter determines the length of the streak as it pertains to a camera shutter speed.

The use of this can add realism to your movie as most cinema is not recorded in high-speed shutter, so some blur occurs.  A comparison of a single frame of no blur versus blur shows the obvious difference, though in motion it's subtle.  The first image shows a transition of words without blur.

This image shows the same exact motion but with blur turned on.

The full video without blur:

The full video with blur:

Sunday, May 6, 2012

BMesh Introduction

BMesh is the overhaul of the mesh system within Blender that was first introduced to the software with version 2.63.  There is a host of features that have been added to the mesh system, mostly which center around the new NGON (polygons with verts greater than 4) capability.  The image below shows an example of an NGON extruded from the cube with 8 vertices.  

This entry is based on a tutorial which can be found here: Blender Cookie Tutorial


Next I'll walk through the main new features related to NGON manipulation. The first is 'filling' two vertices with an edge that splits the NGON.  This is done by selecting the vertices and hitting [J].  Hitting [F] instead will draw a line on top of the NGON instead of splitting it, which in almost all cases is undesirable.
Note that a ring loop of more than 4 vertices can be filled using [F] to create an NGON.

The next feature is the Merge or Dissolve feature.  This will essentially take the selected objects (verts, edges or faces) an dissolve them, but potentially to create an NGON.  The example below shows 4 faces being dissolved to make an NGON.  The dissolve can be performed in the delete menu [X].

Another feature in the delete menu [X] is the Edge Collapse.  This will take the selected edge(s), and collapse it's adjoining vertices to a central point.  This can be seen on a single edge in the image below.

The final delete capability is the Limited Dissolve.  Although it intuitively should be in the delete menu, I could only find it through the generic search [SPACEBAR] and typing in the name.  This basically deletes all the edges between the vertices.

The final new feature is the updated knife tool.  This can be initiated with the [K] key.  In this mode, the cursor marker becomes green, and you can essentially draw a path of cutting new geometry.  You must hit [ENTER] when the drawing is done to keep the drawn path.  This is probably the surgical method for subdividing NGONs since you can't use [w] subdivide across them.

The example below shows how drawing a path with the knife tool creates new face geometry.  Note one trick that if you hold [CTRL] while drawing, the marker will snap to vertices or the midpoint along an edge.

Final thoughts, NGONs are useful for making the workflow of mesh modeling easier, but for most cases with gaming or low-poly models, you'll want your entire model to be only quads (and possibly if absolutely necessary, triangles).

Another warning to note, NGONs behind the scenes may be made up of triangles.  You'll observe this if you try to subsurf an NGON.

Saturday, May 5, 2012

Section View

This short entry shows a simple utility for viewing your mesh, which is the section view (or cutaway view).  To enable this view enter [ALT + B].  This produces an action similar to the box select [CTRL + B], except, what you select will maintain in the view, and everything else will be hidden.

In this example, I selected the right half of suzanne from the top view.

You'll notice that when viewing the mesh from the side, you can now see inside since the left side is hidden.  The section view can be turned off by pressing [ALT + B] again.

Face Projection Snap

This entry covers the capability of snapping a mesh geometry to another, similar to the shrink wrap modifier effect, but projected from your present view.  We'll view this effect with a simple example of projecting a grid to a cylinder. 

To start out, create a cylinder and a grid.  I colored the grid blue to make it easier to see (after the snap) and I scaled [S] it smaller to allow it to fit more easily onto the cylinder.

While in edit mode, with grid selected, set the snap parameters in the bottom toolbar as shown below.  The Snap Element should be set to Face, and the Project button button should be enabled.

Next, move your view (not the camera) to where you want to project.  The mesh will be projected essentially from your view, down your line of site (-z axis) toward the mesh, and will deform the mesh according to the mesh it hits.  In this example, I just did the side view [NUM 3].

To snap, with all vertices selected [A], press [G], then [Ctrl].  Once you click or hit enter it will activate the snap.  If you right-click it will reset.

The snap won't be obvious at first until you change your view.  Upon inspection you'll notice that the grid is now nicely wrapped around the cylinder.  Because this is done very closely, the grid may not cleanly rest on the cylinder, some parts may protrude into the cylinder. I moved the grid slightly away from the cylinder to give it a cleaner look.

The final render with the grid slightly extruded [E] away from the cylinder.