Tag Archives: Blender

How to export all Shape Keys as OBJ files in Blender

To export a single Shape Key as OBJ file, all we have to do is set the desired Shape Key to 1 (or whatever value we like) and use the File – Export dialogue to create an OBJ with the shape/morph applied.

However, if you have several dozen Shape Keys that need to be exported, repeating the above several dozen times can be tedious and error prone. Blender hasn’t got an built-in option for such a batch-export operation, but thanks to a lovely man named TLousky, we can use a handy Python Script to do the job.

Here it is, with minor amendments by yours truly:

Excellent… what exactly does it do?

This script will iterate over each Shape Key of the currently selected object, set each shape key to a value of 1, and export it to the desired path as OBJ file. Feel free to change the scale upon export if you like, and don’t forget to set a valid path for where you’d like your OBJs to be saved.

Awesome… how do we run this thing, Cap’m?

To run a script in Blender, open a Text Editor window (NOT the Python Console). I like using the Timeline Window for that. Click the New button to create a new text file. Now copy the entire code from above into the otherwise empty window inside Blender and hit the Run Script button at the bottom of the window.

Blender will go to work and do its thing. With a bit of luck, no error message will be displayed. Your destination folder should now contain the desired OBJ files.

I’ve explained how to do it all step-by-step in the above video.

Enjoy!





How to import an object as Shape Key in Blender

Blender stores Morph Targets as Shape Keys. Those can be accessed and created in the palette that resembles the Flux Capacitor icon (it reads Data when you hover over it). 

To store one object’s shape in another one as a Shape Key, do the following:

  • import both objects into Blender
  • SHIFT-select both objects
  • make sure that the object you’d like to store the Shape Key in is selected last
  • using the Specials Menu under Shape Keys, select “Join as shapes”

The Specials Menu is hiding under the little triangle, underneath the plus/minus icon. Note that your master object needs to have a Basis Shape Key defined (you can do that by clicking the plus icon in the same menu).

Now you can delete the second object from your scene and use the slider to morph your master object into your second object.

And finally, both objects need to have the exact same amount of vertex points, otherwise the operation isn’t going to work.





How to setup a Height Shader in Blender

While we were discussing how to generate a terrain in my previous post, the next question is of course how to we give our terrain different colour values depending on its height.

For example, at the very top of our terrain we may have snow covered mountains. Slightly further down we have yellowish rocks on the steep walls, followed by green grassy planes, and more earthy brown tones further down.

Blender does not have a specific heigh shader like Carrara does, but we can use a Texture Coordinate node, extracting the Z axis value from it and feeding that into a colour ramp node. The result is something like the render above.

Here’s what the Cycles shader looks like:

There are other approaches, and this does not cover how to give each height a distinct image texture, but perhaps we’ll cover how to do that in another article (when I figure out how it works).





How to generate terrains from heigh maps in Blender

Did you know that Blender can create fabulous terrains from nothing but a greyscale height map? Of course it can!

In this article I’ll show you how to do it step by step. Grab your height map, fire up Blender and let’s get started.

Continue reading How to generate terrains from heigh maps in Blender





How to apply textures in ZBrush

I was trying to import a texture into ZBrush from an object I had created and UV mapped in Blender. The above shows an example of such an object, looking all nice and dandy in Blender.

However, when I imported it into ZBrush (after figuring out how to do that), I was shocked to see how ZBrush displayed my texture. Take a look:

That’s neither funny nor necessary. I’ve tested the same principle in DAZ Studio, Carrara and Poser and they all played ball, displaying the texture without a hitch. Only Hexagon wanted the texture flipped vertically, but – just like Carrara – offered handy tick boxes as to which direction an imported texture needed to be mirrored.

Zbrush also has such an option, but it’s not next to where you select the texture.

In this article I’ll show you how to import and apply a texture in ZBrush, to an object that has been created and UV mapped in another application. Let’s do this step by step:

Continue reading How to apply textures in ZBrush





How to map a keyboard shortcut for Local View in Blender

I’ve just learned that Blender has a wonderfully helpful function called Local View. This will isolate a selection, zoom in on it, and hide all other items in the scene. Using Local View again will bring back all items as they were seen before.

Thanks to Darrin Lile for this tip!

We can execute Local View with the default keyboard shortcut “Numpad /” (the division operator on your numpad) – but of course that only works if you have a numpad. On my Windows system I have one, but sadly on my Mac and my laptop I do not.

In this article I’ll show you how to map this shortcut to another key. Let’s get started!

Continue reading How to map a keyboard shortcut for Local View in Blender





How to select every other vertex in Blender

Hexagon had a really nice nth-selection tool (1 over n it was called). With it you could select every other vertex or edge or face, creating things like the star shaped pattern above. You’ll be pleased to hear that Blender can do this too!

Rather than select every other point though, Blender likes to deselect instead. Here’s how to do it:

  • enter Edit Mode
  • select a whole edge loop
  • head over to Select – Checker Deselect

Blender will deselect your vertices according to the options in the tool shelf (on the left):

Works with vertices, edges and faces. Go crazy!





How to render “Manuel Bastioni LAB” characters without purple skin in Blender

I recently discovered the Manuel Bastioni LAB add-on for Blender. Judging it only by the title you’d never guess it’s an extravagant people generator of the highest caliber! Bastioni was working with the folks from MakeHuman for many years, but The LAB is his own project.

In a nutshell, it creates ready-to-use characters, complete with poses and morphs, as well as many other complex goodies. And as with many complex things, rendering can take a while. I tend to prepare a scene on one machine, transfer it to a faster system and let it render while I setup the next scene.

This workflow usually works a treat with .blend files, but not necessarily with those containing Manuel Bastioni characters. Turns out the skin has a good chance of looking alien purple. Quite a nice effect, but perhaps not all the time.

Lucky for us, knowing why this happens will help us understand how to fix the problem. It’s not a bug, just a question of which box to tick when saving those files. Let me show you which box that is and how to avoid the purple skin effect.

The Purple Skin Phenomenon

Continue reading How to render “Manuel Bastioni LAB” characters without purple skin in Blender





How to combine an Image Sequence into a video file with Blender

Did you know that Blender has a built-in video editor? We can use that to turn an image sequence into a movie file. I’ve described how to do this Photoshop here, but I thought it would be fun to try the same thing in Blender.

Here’s how to do it: Continue reading How to combine an Image Sequence into a video file with Blender





How to display a movie on a plane in Blender (Blender Render)

To show an animated video clip on a plane inside our scene, we can texture our plane object accordingly. Here’s how to do it using the Blender Render. engine (this won’t work in Cycles).

  • select the plane object and create a new Material on it (in the Materials Tab on the Properties Palette)
  • under the Shading Tab, select shadeless
  • leave all the other settings alone here

screen-shot-2016-12-06-at-13-58-23

Head over to the Textures Tab next to the Materials Tab and create a new texture. Set it to Image or Movie and select your video. You can also pic a single image or an Image Sequence here.

Under Image you can select at which frame your movie should start. Hit Match Movie Length to choose all frames in your movie (because we can’t tell how long it is, but Blender needs to know).

screen-shot-2016-12-06-at-13-59-53

Peek at the Preview section to see our video show up. Never mind the repetition or distortion for now.

In our final render, the background will probably look a little washed out. To combat that, head over to the World Tab and set the Horizon Colour to black.