Using Google Blocks with Blender

Welcome! So you want to jazz up your Google Blocks pieces using this “Blender” thing everyone keeps going on about. You’re in the right place! Here, I’ll cover how to navigate Blender, import a Blocks piece, apply some nice textures, add some lights, and render a final piece. Note this this would work with any .obj file. I’ll only be doing the most basic steps today, without any advanced mapping or stuff like that. Let’s get started!

Syllabus

Installing and Navigating Blender

  • Download blender
  • Making the interface less overwhelming
  • Moving the camera

Importing your Blocks object

  • Finding your Blocks .obj
  • Importing the .obj
  • Render test
  • Saving

Texturing

  • UV unwrap
  • Explaining materials, shaders, and textures
  • Applying materials

Lighting and setting

  • Background images
  • Positioning camera
  • Adding lights
  • Adding a nice object platform
  • Bonus: applying an advanced texture

Rendering

  • Dimensions & Samples

Other resources

Installing & Navigating Blender

You can get the latest release of Blender free from their download page. Go ahead and install that, and open it up. Note that if you already know the basic of Blender and how to navigate, you can skip to the next section: “Importing your Blocks object”

1

Above is the start screen. Blender’s interface is notoriously cluttered, so let’s just take a minute make that less of a problem. Start by taking away the Timeline (very bottom) section, we don’t need that.

Just right click on the border between the two views and select “Join”. A grey arrow will appear, showing which panel will be closed, use your mouse to point it towards the Timeline view.

Alternatively, find the small grey icon that looks like three diagonal stripes in a corner (Circled in red above), and drag it from the panel you want to keep, to the panel you want to close. This can be finicky, though.

Note that you can also close menu bars (in green above). To get those back, look for the panel’s small grey “+” icon. To split a panel into 2, drag the diagonal corner icon inwards instead. To set a panel’s type, click the button circled in yellow, and select from the drop-down box.  Finally, go and collapse all the sub-menus around (Like the ones in Blue above). I also like to right-click on the very bottom menu bar, and select “Flip to Top”. Hopefully you’ll get something like this:

2

That’s not so bad, right? Let’s do a really quick render test. At the very top select “Cycles render” (Red circle). This is to say that we’re using Blender’s “Cycles” render engine, which will give us some great features later. Hit your F12 key, and an image of the cube should appear. Nice, your first render! To exit the result back to the previous view (3D View), press your escape key.

Next, right-click on the cube to select it, and press your Delete key to delete. This gives us a nice blank slate to work with. (Quick note: for the next few screenshots I have “Blender Render” selected. It should be “Cycles Render”. My bad!)

Real quick note on moving the view: You can set a central focus point by left-clicking anywhere. To rotate around that point, hold your middle mouse button and move. To pan around, hold your shift key while holding the middle button and moving. If you accidentally grab and move something with right-click, just right-click again, and it’ll bound back to where it was. Zoom with the scroll wheel. Undo an action with Ctrl-Z, and undo the undo with Shift-Ctrl-Z.

OK, that’s pretty much all you need to know to get started!

Importing your Blocks object

It’s always best to make a copy of the piece you’re working on, and using that, so that the original is safe. To find your piece, go to /user/Documents/Blocks, and either Models or OfflineModels, depending on whether it’s saved locally, or in the cloud. In the folder, there’s a lot of randomly generated folder names. You’re going to have to search through every single one to find the one you want. Sorting by date can make this easier. Each folder has a thumbnail inside, so you can see which piece it is. Once you’ve found it, just copy the entire folder to your desktop. (Mine was called “zanxfs”!)

Next, go to File -> Import -> Wavefront(.obj), navigate to your desktop, and into the folder you just copied. Hit “Import” in the top right of the screen, and you should see your model in the 3D view.

3

Your model might not be facing the right way, so we’ll just adjust it to face the camera. Find the area circled in red below, and click on the curved arrow, which is rotation. The first straight arrow just moves the object around.

Note the “Global” option. This means that the movement guides (Seen below on the model) will stay orientated relataive to the main world, no matter which way the object points. There is also Local, which is opposite of that. For now, we’ll use Global.

To rotate the model, click and drag the blue circle. You can also rotate using theother two axis if you want. We need it to face the camera (That black square cone with the triangle above it). To make sure the orientation is now fine, just hit F12 for another render.

4

The result will be an OK image, but pretty dim, and with no real other imporvment over the original. But it’s a start! Exit the preview with your Escape key when you’re ready. If you want to save a render, click on the bottom left “Image” text, and “Save a Copy”.

5

Now’s a great time to save your project. So go File-> Save As, and navigate to your desktop. It’s a good idea to make a new folder for it, to keep everything like textures organized. Give it a name, and click “Save as Blender file”. If the top bar of the Blender window shows a path to your project, you’re good. To test this, close Blender, go to the .blend file in your desktop folder, and click it. Note that you might still be in render view when it opens, so if all you see is a grey blank space, just hit Escape to exit back to the 3D View.

Texturing

Here’s the interesting part. Blocks saves the .obj with a “materials.mtl” file, which tells Blender which colours various parts of the model should be. If you’re happy with that, and don’t want to add any textures or other materials, you can skip ahead to the “Lighting” section. It’s really not always necessary to use textures, you can just throw on some emissives or glossy surfaces, add some light, and it’ll still look phenomenal. In fact, a lot of low-poly stuff does look a lot better without image textures! Check out Sideline Media’s logo, for example. No image textures, just some lights and glows. But that’s not what this guide is all about!

Since we’re going to be using custom texture images, we have to “UV unwrap” the model. This is super easy:

  1. In 3D view, select the model with right-click (It’ll get a orange outline), and select Edit mode. This will open up a different sidepanel.
  2. Look at the left tabs, and select “Shading/UVs”. Under UVs, click “Unwrap”, and select “Smart UV Project”. Keep the default settings in the pop-up, and hit OK. You can now apply image textures.

6

Right, time to change our layout a bit. I’ve removed the side menu we just used by dragging its border all the way to the left, and then duplicated the 3D view (Orange) by grabbing the three-diagonal lines icon in it’s top right corner downwards. Then make the resulting top view (Green) a “Node editor” by clicking on the view’s type button (Circled in purple) and selecting Node View from there. Note that the button to press will actually be along the top first, then move to the bottom, like in the picture, when the view is changed.

Finally, I dragged the side panel to the right a bit larger. I clicked on “Model 001” (light blue) and then selected the “Materials” tab (also circled in blue, looks like a black and orange circle).

7

Here’s how textures and materials work. (And this gets a bit long, but bear with me!)

Any of the faces on a model can be assigned a material. A material will generally contain a shader of some sort. A shader is basically an effect you apply to the face. An emissive shader will glow, and a glass shader will be transparent.

There are many shaders, but the most common one is a diffuse shader. This is a basic effect you can apply to a surface, that simply realistically reflects some light. You can set it’s roughness to chane the look. The nice thing about a diffuse shader is that it can link to images, like a brick texture, and it’ll automatically apply the texture to a surface, and appropriatly take care of  interaction with light.

Overwhelmed? Let’s look at creating an example texture:

  1. Create a new blank material by clicking the “+” symbol next to the materials list. If there’s any materials already there, they came with the .obj from Blocks. Just ignore them.
  2. Click on the “new” button that appears. This will actually apply a material, and assign a standard diffuse shader.
  3. Give this material a name. Call it “Example Material”.

8

The node view we opened just now will have two nodes loaded (By the way, you can zoom in and out in this view, pan around by holding the mouse scroll wheel, and move nodes around). The material output is the final result, but it needs something to show on its surface. So Blender linked a default diffuse shader. This one is white, but it can be any colour, and you can change the roughness of the material (how it reflects light) by either clicking on the bar and dragging sideways, or typing a value yourself. That’s it, if you apply this material to a face (next), that face is going to be a white, fairly reflective surface!

9

But we want more. Notice the flow: The diffuse’s BSDF (light refraction value) exit point plugs into the “surface” entry point. Anything with a coloured dot can be changed with a node. Here, we change the output’s surface to whatever is in the diffuse. (Generally only dots of the same colour can plug together, with some exceptions)

Notice the yellow dot next to the colour option on diffuse. That means that the colour can be substituted for something from another node. So let’s replace the white colour with an image. Click Add -> Texture -> Image Texture. The new node is attached to your mouse, so move it to the left of the Diffuse node, and let go.

10

Use the “Open” button to navigate to a texture you’ve saved. There are great websites where you can get free textures, like here: https://www.poliigon.com/search/recent/narrow/list/free%20textures or here https://www.textures.com/ . If you’re using google, it helps to search for “Repeating texture”, those tend to wrap around objects pretty well. High resolutions ones are good for large objects, but small objects tend to shrink the texture down to fit, meaning you’ll lose detail. Play around with different image sizes.

Once you’ve found your file, simply drag from the yellow colour slot on the image node to the yellow colour slot on the diffuse node, and that’s now the texture you’ll see if you apply it to a surface. So let’s do that next!

11

Applying textures

First, we’re going to select the surface to apply a material to. Go to your 3D view, right-click to select your model, switch from Object Mode to Edit mode, and activate “Face select”, as opposed to point or edge select (circled in red). Once you’re here, you can select a face with right-click, and it’ll turn orange. To select multiple faces, you can hold Ctrl while clicking, or hold Ctrl while clicking on a selected face to unselect it. You can still freely rotate the camera while selecting. Be sure to set the focus point with left-click on the area you’re going to be selecting to make rotation easier.

Tip: If you select a face, you can select adjacent faces with “Ctrl num+”, or unselect adjacent faces with “Ctrl Num-“. Blocks is really good with this, as it’ll save info about individual shapes in a model with the .obj. This is very useful for selecting an entire section, like the entire top half of my robot (Which you might remember was one single piece in Blocks):

12

With everything still selected, go to the materials tab, select our example material, and click “Assign”. (By the way, expand the “Preview” option under the assign button to see what your texture will look like) To see your texture on the model, click on the icon that looks like a white ball in the menu bar, and select “Material”. You should now see the texture on your selected faces:

13

Here’s something cool: Split one of the panels (I selected the far right one), and make the new bottoms one a 3D view. Then press Shift-Z, and it’ll show you a live preview of what your render will look like! Then press 0 on your numpad to get the camera’s view. This is useful to have around, as it’ll reflect changes to your final render as you make them. You can see the render preview view in the next image.

Hmm… that’s not a very nice texture, so I can change it by selecting a different image. I chose a red pattern instead, and renamed the material accordingly.

As a sidenote, if you want the render to be a bit brighter, go to Lamp in the explorer, then the Lamp tab, then the Nodes property, click the “Use Nodes” button, and you can then change the lamp’s intensity. More on that later, but for now, it’s a way to see progress better.

14

OK, so now you just move through your model, selecting the faces you want to texture, and making/assigning good materials! Here’s some more material examples you can use:

Emissive – These are great for atmosphere. They shine light, which gets cast onto other parts of the model. Just replace the defuse shader with an emissive shader (from Add Node) in a new material, and play with the intensity until the preview window shows what you want. Don’t worry if it’s grainy, that’s normal, because it’s not simulating the entire render, just a basic preview. The image I have below is a full render, just so you can see the effect it has:

17

Glossy – Make a new material. Add a node, look under Shaders for “Glossy BDSF”. Plug that into the Materials Output node, and you have a glossy surface, with tunable roughness. Make it more interesting by adding an image texture, see below how it reflects the emissive and the surrounding red material:

16

There are a lot of materials to play with, and a lot of ways different nodes can interact and enhance each other. For example, I haven’t even gone into Maps, which are easy to use, but hard to explain. Check out this excellent video by BlenderGuru for more details.

OK, I’m done texturing! Next, we’ll set up the scene.

18

Lighting and setting

Final stretch! Let’s set up a nice shot, and finish up the atmosphere. First, a background. The very best thing to use is a high quality HDR 360 image, but those are hard to find. You can use any image, but know that it’ll be zoomed a lot, and might be stretched, so you’ll have to compensate (i.e. by using a really high resolution image). Here’s how:

First, navigate to the World properties to the right. Go to Surface, and click on the Use Nodes button. This will let you select “Background” for a surface, and use an environment texture just like an Image texture. Check out the render preview, and position your piece so that you like it. Then, see if there are any light sources in the image, and if there are, try to emulate that with your main lamp by going into Object Mode, selecting it with right-click, and then moving it around like you would a model. Below was my first try:

19

But this looked a bit off. So I changed it up:

20

Better! Above are some of the camera settings. We don’t really use these here, except for the focal length (how zoomed it is) and toggling a line to show where it’s pointed.

There are two main types of light. There’s a Spotlight, which shines in a specific direction only, and a Sun, which shines in every direction. To place a light, bring up the sidebar from a 3D view, and look down in the “Create” tab (See yellow circles below). These are bright, so you only have to set the brightness up a small amount (4, in my case) in the “Light” properties tab, circled in dark blue. You can move suns like anything else, using the positioning tools (Red circle).

Below are the settings for a sun I positioned be behind the droid, emulating that big blue window.

21

I also have two spotlights to the droid’s sides, that’s just to provide some fill for the shadows. However, spotlights are a lot dimmer, so I set their strengths to around 4000 and 6500. Check out the circles areas to see the difference, the droid is more central, and the midsections isn’t lost to the background as much:

22

Go and mess around with adding lights, tweaking their brightnesses and positions, and see what happens! Tip: It helps to set the positioning tool to “Local” instead of “Global” for this.

OK, one last thing. I don’t like that random green cube, so I’ve went to the 3D view’s sidebar’s, and added a cylinder under the create tab. I moved that into position under the droid, selected the droid, went into edit mode, selected all the cube’s faces, and hit the delete key.

23

Then I made it a cone, applied a basic glossy shader with a scratched bronze image texture, and hit render:

24

Bonus – Super quick bit on advanced textures

It looked super flat to me, so I’m taking this opportunity to quickly show you what real texturing looks like (Although bear in mind I didn’t play around with this much, so it’s still pretty low-res and unrefined):

25

That’s more like it. Basically, instead of just adding the one image texture, I use three. The original image gives colours, sure, but it’s just a flat, smooth image, not at all the old metal look I was going for. So I made two copies, and fired up Paint.NET.

The first image below is the normal image, providing the colour info.

The second is the bump map. It’s in greyscale, because blender will interpret black as a dents or cervices, and white as raised bumps. So the dark cuts will give the surface actual definition.

The third is the reflection map (or specularity map), this tells Blender which parts are shiny, and which parts are not. So I tweaked the image some more, because here, the light values will mean reflection, and the dark values no reflections (there are no reflections in a small dark dent, after all).

Again, I would absolutely recommend this video on the topic.

scratchedALL

Rendering

This is it! Let’s take a look at the Rendering tab (In yellow):

27

The dimensions are pretty simple. You can select from a bunch of presets, like 1080 or 720, or you can make your own. You should also turn on border, it’ll stop the preview from rendering anything outside the camera zone, saving on CPU power.

The important part is found under Sampling. There are two render Samples values (Orange): The higher one will be used for the final render, and the lower one for the previews. Lower values are quicker, but not as clean, you’ll notice a lot more light artifacts, or “fireflies”. I like to set it to 720p and 50 samples, and when I render the final piece, 1080p and around 1500 samples, but if your PC is not designed for that, start at 500, and work your way up if you think you need to. However, if you reach about 1000 and still see artifacts, try setting the “Clamp Indirect” value to 3, that should help.

When you’re done texturing, positioning lights, and tweaking the rendering settings, go ahead and press F12! It’ll automatically render in the biggest open view, and if you used a large samples value, it’ll take a few minutes, so get up and stretch your legs. When it’s done, don’t forget to save the image! Below is a 2K render.

final2K

You’re done!

Good job, you’ve completed your first Blender to Blocks render! There’s a real rabbit hole of things to learn about, and it’s pretty addictive. For example:

  • Check out nice atmospheric lighting, with volumetric fog and visible light rays here.
  • Experiment with ambient occlusion.
  • Mixing shaders (Called PBR textures) for really cool effects.

And here are some resources to go check out:

 

Thanks for sticking it out, and go have some fun rendering!

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s