Blockland tutorial

It’s an experiment – that is, nothing special. No story, no real composition, several details I left out or never got finished. But, that’s the best way to learn. Ignore all that and try something new; in this case, UV mapping and mass replicating some cubes.

I was playing with the GLSL shaders in Minecraft and came across this video:

which inspired the sort of orange glowing misty cube world thing. I would add trees and some particle grass if I were to continue, but I don’t think I’ll bother.

The cube is pretty much the easiest thing you could UV unwrap, and although I could have used only three patterns for the image (top, bottom and side) it was just as much work to copy and paste the side image three more times in the Photoshop image I made than map the other sides to the same coordinates on the UV. Is any one more efficient? I’m not sure. The former way makes it easier to make changes to specific sides, if the case ever arose. Perhaps each side is slightly different so you could add variation by turning the cube 90 degrees. Project needs, I guess.

There’s three materials there: grass, rock and water. I realize that Minecraft actually runs a forth for the rock that becomes cobblestone, but the cliffs were only barely tall enough to need it so I didn’t bother. The grass and rock are done in virtually the same way, save for the image used as the UV, and the water is just a reflective blue with a proc. cloud bump map.

Mist is generated in the world settings, starting at 85 BUs. Oh, note: change the camera clip to more than 100 for these larger scenes. It takes very little extra render power, so don’t be afraid to crank it up – mine’s 300 here and the geometry ends at 150 or so.

The node setup is where you get all the cloud shine effects:

The cloud parts are drawn in Photoshop.

Blender Scanner miniTutorial

Scanner Tutorial Example from Brennan L. on Vimeo.

Just a brief experiment that I thought I’d share. The goal was a sort of stylized xray laser scanner that could be moved around to ‘scan’ things in the scene. Ideally, it could be configured to have some sort of spinning design, perhaps, or just a simple straight line. For the purposes of this mini-tut I’m just going with a simple square outline. It’s pretty flexible, so I think it could be modified easily enough to suit anything you’d like.

The 3D Setup:

Originally I was playing with a texture that could be projected onto the geometry from the top down, and while it’s possible, it runs into aesthetic issues when combined with shading and such. That lead to this solution, using lights themselves. Since I didn’t want any shadows cast by the geometry to give it that xray piercing effect I had to tweak the material settings a bit. Easy enough:

This panel is found near the bottom of the material settings, you might have to expose it with the little triangle on the left. The two in yellow should be unchecked, most importantly the left one. The right only matters if you’re using buffer shadows on the spot lights. The material itself is just straight white, nothing fancy. You’ll probably want to keep that “Cast Approximate” checked on, depending on your ambient occlusion type (or if you’re using it at all).

The spot lights themselves are pretty much default:

On the left is the main spotlight, with the red colour the scanner will be. Then, physically under it is another spotlight with “negative” checked, which creates a physically impossible (but handy for cheating!) negative light. It’s calculated just like real light, but it’s used to cancel out the real light in the final render. Note that they both have to be of equal power to cancel each other perfectly, creating that gap in light space. They’re both square since that’s what I was trying to make, but that can vary depending on your design.

Notes on the negative light: Could you just use a plane and use it’s ray-traced shadow to create the inside shape? Yes. But this seems faster for reasons I can’t quite understand. It’s ray-tracing the negative light (which should be the same speed as RT a positive light) but somehow that’s better than one positive RT a shadow past geometry. I know that the render math is just doing a luminance check and subtracting the positive values, but I would have thought that running two traces and subtracting one from the other would have been more time than just one, more complex trace.

Anyway, there’s the viewport view of the two spots, both tracking to an empty, which will be the part driven around in the animation to aim the light.

I have a regular render -> glare node -> DoF -> RGB curves -> composite node setup, but it’s really not required. In fact, looking back on it, it’s a wee bit over exposed this way. Do what looks good, as always. That’s not really the point of these experiments.

Which should turn up with something like this:

and from there, animate!

Scanner Tutorial Example from Brennan L. on Vimeo.

Console – minitutorial

I made this a while ago and it recently came up again, so I’m going to do the detailed discussion of it that I always meant to do.

For the record, this was made with Blender 1.5x but anything more recent will work. Even since making this I’m already onto 2.60 which was just released the other day.

Break it down:

So we’ve got two things going on here – the basic render and then the compositing over that done internally with the nodes. It depends on the look I’m going for but this second step can usually replace Photoshop for post-render colouring and touching up so take the time to learn it. I’m not sure why I ignored it for so long and in hindsight I think it could have really helped my renders back then.

Part 1 – the render:

So you can see how important that post/node work is – the pure render is really drab and lifeless.

The geometry is really simple, it’s just a text (Futura) with another text behind it at a 0.094 bevel and some extrude to give it that really thick pillow look. Remember to up the bevel resolution to make it a curved fillet instead of just a chamfer. The inside text is the glowing green and the pillow part is the reflective black part.

The ground is just a giant plane with the same piano black finish that the pillow text has.

There’s the two materials. Pretty self explanatory, I think. We’ve got the black with a bright, sharp specular and a nice reflection (which you’ll notice isn’t doing blurred samples – we’ll come back to that) and the green with is just a green with an emit value to it for that extra zest. The speculars and such don’t really matter there since it’s rendering pretty much shadeless and specs won’t show up at all there. There is one light but it’s pretty irrelevant since the green glows more or less by itself and the black just reflects it. There are slight speculars on the black, I guess. It’s up to you. (Note, you still need the light for the emit to work, it just multiplies the natural surface illumination by a ton)

Which should give you that first render there. It works but isn’t very exciting at this point. Let’s spice that up, shall we?

Part 2 – node work:

Here’s the end result (click for fullscreen as always):

It breaks down into nice chunks.

Starting on the left we have the render layer as normal which then branches into the glare node up top (the major render) and into the overlay node to it’s right. This overlay uses a little bit of the render and mixes it with a scanline texture I had laying around. Basically it’s just horizontal lines that can be easily Googled or made in PS. That texture is scaled to fit the render dimensions and all of that is sent through the RGB curves to really intensify the bright parts, giving it tons of contrast. If you were to render from the tail of that RGB curve, this is what it would look like:

Which is sent through the glare, which just brightens it further and gives those side to side streaks (note the “Streaks: 2″ in there @ 0 angle offset). The color modifier is actually important here as it creates that sort of jittered spotty pattern to the streaks.

That whole things works basically as an overlay to the original render layer (and it’s glare node for the text’s neon look)) – those two run through the Lens Distortion which has a tiny bit of dispersion (the glitched out red/green/blue tinges on the far sides of the lettering) and a lens-barrel distortion for that fisheye curve the whole thing’s got.

The defocus does the ground blur and it’s actually a bit of a bug in the renderer itself. Since it’s not doing any real light physics, it’s not smart enough to know that reflected things exist in the same place as real objects and therefore should exhibit the same DoF as the physical object does (as real life would) so the blur is actually controlled by the bokeh as if it’s out of focus, although our knowledge dictates it isn’t. It’s usually annoying but it’s really handy here since it’s blur is far faster than doing actual sampled glossiness on the ground material itself. If we were making an animation that would have really nice time savings.

That should give us the completed image!

Which you can see again if you’d forgotten since the top. Click for full to appreciate those little details. I’m really quite fond with how that dispersion turned out and mixed with the scanlines.

Questions, comments, critique? Feel free to send a message my way!

The Two Types of Goals

I’m not sure if this is an actual thing or not. It seems like a subject that should already have a book about it or something. If there is, I’d love to find and read it so let me know but in the meantime the following is entirely off the top of my head as I was thinking about it the other day.

Goal Type 1: The Absolute End

This type of goal has an ending point that we would want to achieve. It’s usually finite and quantifiable such as “I want to have a million dollars when I’m 50.” The reasonableness of the goal is irrelevant here, it’s just that the goal has some ending point that can be achieved by any means. So, that million might come from working hard as an accountant and slowly building it up, perhaps investing wisely along the way. It might come from a well-though out vault job to drill under and steal the money from the inside. It might be from becoming a drug lord. It might be inherited from a great uncle who was one of those three things previously. These sorts of goals don’t inherently have ethics within them. The person making the goals might impose that on themselves, but it’s not part of the goal as it’s written. Likewise, the written goal might mean different things to different people, especially when they become less specific but still finite like “I want to get married.” where the end is marriage. That could mean at 23 or 80 – sometime before you die, you want to be married.

 

Goal Type 2: The Absolute Means

You’ve probably guessed it, this is the type where the goal is specifying a part of the journey itself. The end may or may not be in the goal, such as “I want to marry Jimmy.” including the end ‘marriage’ and the means ‘Jimmy’ in one statement v. “I want to be a drug lord.”  being an active, ongoing thing with no defined end to it. The ethics are usually unavoidable here (with actions relating to an ethical standpoint), since the means are actions which can be defined by viewpoint. Is being a drug lord unethical? That’s an entirely different debate for an entirely different time, but the fact that there is some question would imply that there is a moral weight to the action. You could argue things like marriage being ethical or unethical, but for the most part it’s generally agreed upon and therefore unnecessary to further consider.

 

Why Does it Matter?

This is a question that’s been in the back of my mind for a few days now, and it’s curious to work through various ramifications.

Absolute end goals can become ruthless on a slippery slope, especially when applied to business. Is using this virtually slave labour factory a good way to make money as a business? Anarchocapitalism says so, but where does that weigh against your personal beliefs? And, can those beliefs be turned blind eye when achieving absolute end goals?

Absolute mean goals can become short sighted and misdirected when applied to personal things. Sometimes we have these goals in our minds so long that we forget why we had them in the first place; “I want to marry Jimmy” might be entirely reasonable, but is Jimmy actually the best choice? Why did we want to marry him anyway? and as we chase these goals they become more ingrained into us via repetition, which loops back and questions why were were doing it to begin with. This is where an end goal or ‘marriage’ might be more accurate, if that’s what you were going for. Maybe, even broader, it could be end goal of ‘happiness’ which might end up an entirely different way. Does Jimmy = happiness? Maybe. But inherently? Not really, no.

So, both types are important to have, and ideally, link together.

“I want to make a million dollars before I’m 50 by selling bamboo bikes.” would combine the end ‘million’ with the means ‘bamboo bikes’ which, for personal reasons, you believe to be the best for the environment and you’ll do because you want to be an eco-friendly citizen. That’s sort of meta-ethics, but it shows up nonetheless.

In this way you can make sure you’re on the right track by having the end goal to keep your means in check and you have the means to keep your personal ideals in check.

 

Questions, comments or critique? Feel free to start a conversation.

Cheese and crackers – a tutorial

I had no idea this was such a rampant problem, but it came to my attention today and I really wanted to address it.

The main thing that surprised me is that people don’t seem to know that you can make two smaller squares by cutting one big square twice. I guess a lot of people missed that day in kindergarten or something, I’m not sure.

So you’ve got your cheese, which is comes in an extruded square brick slightly larger than the cracker. When eaten together, this has way too much cheese-cracker ratio. We could cut off the corners, but this creates awkward little bits that can’t be efficiently recycled into the snack manufacturing process. No good.

Instead, use the double cut method to make two smaller squares:

Fairly straight forward. Then, take those triangles and flip them so the longest end faces inward, creating a square:

Which creates two crackers worth of perfectly ratio’d cheese with no excess scraps or ill-fitting remains. Since household sized cheese forges aren’t very common, we can’t just remelt scraps like we would with aluminum.

So rest assured, you know how to make cheese and crackers properly!

Also, if someone ever comes up and asks you to create two perfect squares by cutting one perfect square, now you know!

Take care out there.

Sketching with Spencer Nugent

IDSKETCHING.COM: Camera sketch Part 1 from Industrial Design Sketching on Vimeo.

I get quite a few emails asking about tutorials for sketching and so while I hope to make a few of my own eventually, I’ll post other great resources I’ve found over the years. Today: Spencer Nugent of IDSketching.com.

Check him out. I will append that his reflection tutorial is actually wrong, and I will make a post about that too. But everything is really awesome and a great place to start. The contour lines / bottle tutorial would be a great first video if you’re completely new to sketching.

Vintage Film Colouring – Blender or Photoshop

I’ve been getting a lot of hits lately for Google searches relating to Blender, nodes and vintage film colours. I haven’t covered that topic yet, but I’m guessing the traffic is finding some of my other tutorials.

And, since it’s super simple, here’s the lowdown:

By the way, this works with Photoshop too. It’s basically all in the RGB curves, so most programs (Photo apps like Aperture, as well as video like Vegas or Premier) should be able to use this. I’ll cover a bit about Blender specifically first, so just skip to the RGB part.

Basic Light Physics

This is a render specific thing. If you’ve already got a photo or video taken from real life, skip to the RGB curves below.

Light, by itself in the 3D world, is pretty silly. It’s usually perfectly white and so colours are represented fairly. The above image might look like this:

Which works for a lot of renders; it’s desired for a lot of things. However, I’m assuming for this tutorial you’re wanting something for realistic to how real life light behaves, and from there we’ll talk about how film behaves to capture that light.

As a rule of thumb, sunlight at high noon is not white but warm – it’s slightly yellow. As you approach sunset, it gets increasingly orange-red due to the bouncing and scattering in the atmosphere. The physics aren’t terribly important since new Blender has provided a handy part of the sun lamp: it can do the sky for you, and this includes light colour. It even has a few presets so you don’t have to fuss with any numbers if you don’t want to.

Turning that on “desert” we get this render: (remember, before we’ve even touched any nodes or anything) (Also notice how long the shadows are, the sun is quite low on the horizon – quite sunset-y – quite orange.)

Which gives the light a nice warmth.

But light tends to get cool in the shadows. It actually becomes more blue as it gets darker. We’ll go into the nodes for that. There are a few points to consider, though. It’s the same process, but how much you do it will define how stylized the outcome is. If you’re going for straight photorealism with a modern hypothetical camera, you’ll want a very subtle effect. Film just amplifies it.

RGB Curves

First, an overview of what the curve actually does.

I highly encourage you to open Photoshop / Blender / Other and have some image to play with. It’ll make more sense when you can play with it. These screenshots are from Photoshop CS3, but it’s the same idea everywhere.

The curve from bottom left to top right represents the lightness of the existing pixels. If you were to, say, nudge a point 3/4s in the top right and bring it up a bit, the light parts of the image would brighten further. If you brought the bottom left point up, the dark bits would lighten up. You can combine points and create a curve that would increase contrast (make bright parts brighter and dark parts lower) or do the opposite.

This effects the full RGB spectrum equally. But, there are really four independent graphs: RGB, R, G and B. They all work the same, but the last three effect only their specific channels. In this way, you could make all the highlights redder and all the low bits bluer by making the graphs something like this:

Which is exactly how vintage film (and most Instagram effects) behaves. The lows move into the blue-purple range while the lights go into either the yellow or red ranges.

And, depending on the film type, this will vary. For maximum effect, look at actual samples from a specific film type (Polaroid, Lomo, Kodachrome etc) and try to recreate it. There are lots of bad, bad, attempts with no basis on any one film and it comes out looking really cheesy and obvious fake. So, just be aware.

For the people using both Blender and Photoshop, I will point out that the curves are on different scales between the programs. Although they behave exactly the same, Blender seems to be more sensitive, so move the points in smaller amounts.

As always, if you have any comments, questions, changes or suggestions feel free to let me know.

 

Blender and HDRi Reflections

I’ve received a few emails in response to the Dues Ex post wanting futher elaboration on the point of HDRi and what it truly is, so although I’ve answered their questions personally, I felt like it’s a good topic for public tutorial as well.

So, here goes!

HDRi, without getting too technical, is an image that holds more information than a normal photo. High Dynamic Range image, which in photography equates to generating information from multiple exposures several stops apart. If you’re not a photographer and just want to use premade ones, you really don’t need to know those sorts of details.

The idea is that normal images only store three values for each pixel: Red, Green and Blue. The extra information could be called intensity or brightness. If you take a [normal] photo of the sun the only information you have that it’s white: 255, 255, 255. But what if there is another white object in the photo? It might also be 255, 255, 255 but it’s not creating it’s own light energy, it’s just a white object reflecting the light. The extra information accounts for that intensity.

Now, in the 3D usage, there are two major usages. The image above is IBL lit, which Blender internal doesn’t (yet) do. That’s a Yaf(a)ray feature that takes the intensity information of a HDRi map and lights the scene with it, instead of using lights in the traditional method.

Compare the lighting and shadows on these two images. Nothing in the scene has changed except the world texture (HDRi) used. Drastically different results, right? So that’s one way: easy scene setup. No need to make lights or reflectors or anything. For this reason, renderers like Hypershot don’t need light abilities, it’s all baked into the map. This has it’s own limitations, of course, but I won’t go there in this tutorial.

Okay, back to Blender

So, that’s all fine for Yafaray users, but what about the Blender internal?

Well, it’s used slightly differently.

Reflection Maps

A reflection map is what I was doing in the DX:HR tutorial. The extra HDR information isn’t really used, but the HDRi maps make for ideal seamless environment textures for our object to reflect.

Basically, you’ve got an item and it would be ridiculous to ray-trace all the reflections for every frame in the animation. But, you want it to have some shiny, reflective properties. This is a great way of doing it without killing your render time.

Normal, default texture is light grey. AO is raytraced @ 7 samples. No lights, just environment lighting > white. 4.04 second render.

Same default texture, but added this basic HDRi map on ‘mix’ – I’ll get into the specifics further down. Same render settings, 4.23 seconds.

Assuming your scene has lights and things the ‘mix’ might be too out of place (remember, the maps won’t line up to the real environment, but try to match them up as close as possible. Also, if you have coloured materials then mix won’t recognize them, it’ll just plaster over it with the map. The solution is the above photo: ‘add’. It just adds the lights from the HDRi to the material as you’ve created it for a subtle effect.

The Nitty Gritty

“You’ve convinced me, Brennan, this looks great! How do I set it up in Blender?”

It’s super easy.

Simply make a image texture like you normally would and change it to “reflection” and then either ‘mix’ or ‘add’ at the bottom. Render!

I would advise finding some great HDRi maps, but any image will work, and sometimes it’s handy to make your own.

Go forth and make shiny things without sacrificing render time!

 

Questions, comments or concerns? Get in touch.

 

 

 

Blender Futuristic Ornate Material

Screenshots of the game itself, copyright to whomever owns it. It’s one of the first scenes in the game, so I doubt it’s spoiling anything for anyone.

Deus Ex: Human Revolution is a cyberpunk game set in the future and I was really intrigued by the industrial design which is actually very reminiscent of the exile house in Tron, which I keep bringing up. There are lots of ornate things like big Victorian arm chairs with the buttons and the wallpaper has a shimmering that isn’t obvious, but is very celtic knot in the light. I wanted to make something like that. I prefer the floral victorian wallpaper, personally. Also, I’m going to add a bump map to mine to give it some depth. If you notice, their version isn’t raised or lowered, so ignore the ‘normal’ settings for the subtle shine approach.

I also wanted it to be fast which I more or less accomplished. The material itself renders quickly, but I tacked on DoF and glares and such that brought that right back. So, as it stands, for full 1080p HD each frame renders in 33 seconds. Most of that, again, is the post-pro. I’m using Blender 2.57 here, but it’ll be very similar /identical anywhere in the 2.5x series.

I picked up the free texture here and set it up like this:

The check marks are important. The Normal defines how drastic the bump map is (note it’s “best quality” at the bottom) and the two speculars define how shiny it is (making sure there is 0% specular in the actual material panel). The cube projection just makes it wrap better around objects that aren’t flat (such as our Suzanne head).The RGB to intensity and Stencil define the shape of texture 2.

The second texture is a HDRi map that I made, but it could be from anywhere. It goes under the victorian texture and is set in the coordinates to “reflection” to make is behave like the object is reflecting it. This is how to make things shiny without using actual ray traced reflections which are slow. If it’s good enough for video games, it’s good enough for us. Not accurate, sure, but much, much quicker. Also note that in the HDRi texture you can turn on and off the specular intensity and hardness (default 1 works) for an extra shine. It creates a sharper specular, so might be useful for wet things.

And then some glare nodes for that futuristic blurry shine, lots of pentagon DoF and a slight RGB curve to crush the blacks and pop the whites a bit. You might consider mixing it with my Tron or Star Trek node setups.

Also, add lots of different coloured lights. Remember, this is the future! And as we know, the future likes coloured lights.

Cyberpunk is defined by having a predominant colour. The Matrix was green, Final Fantasy 7 was blue and Deus Ex: HR is predominantly orange. But! Use contrasts to those to break it up, it’s not monochromatic, just favours a certain way tone.

It’s not that hard to achieve, you see. It seems like everything in the game has a HDRi reflection map to it, so I do recommend stocking up or making your own. Perhaps that’d be a good topic for a further tutorial. Also, if you’re going for the more stylistic approach, try to use simple shapes in your reflection maps; most of the game’s are just random rectangles of light, which gives it that sort of screen glare they put on cell phone ads. It’s not really reflecting an environment, it’s just showing you that it’s shiny. Remember, rendering is not about making reality, it’s about faking reality. Games cheat a lot graphically, but the trick is convincing the player.

Super easy light flicker in Blender 2.5

Click for fullsize.

The thing I’m appreciating most about Blender 2.5′s ethos is the ability to keyframe absolutely everything. It’s reminiscent of FL Studio and it definitely makes for an easy workflow.

I made a little test scene here, with really basic settings. Basically, a plane, a few cubes and a standard lamp in the very middle. As you can see, it’s softened a bit and I’m running some AO and EL as well. None of this actually matters to the flickering, as that can be applied to any light regardless of settings mentioned prior.

  1. Make a lamp. Again, it doesn’t really matter.
  2. The Energy defines it’s brightness. Think of it like a dimmer lightswitch on the wall. Default is 1, off is 0 and you can go up to 10. Right click this and “Make keyframe” at energy=1 on frame 1.
  3. In the IPO curve viewer, bring up the right side menu with N or that little grey plus sign in the corner. “Add modifier” > “Noise” will make the IPO graph all noisy (mine’s in pink there).
  4. Set noise settings. The defaults were alright, but I wanted more flicker amplitude (range in brightness difference) so I bumped that up a bit. In hindsight, it’s a bit fast compared to real fluorescent bulbs, so I could have used the scaling to slow it down slightly.
  5. You don’t have to apply or anything. The curve that’s there is the curve that will be rendered.
  6. Render.

Ironically, the upload to Vimeo took longer than the render itself did (50 frames @ 11 seconds each).

Video on Vimeo


(c) 2013 ACRYLO | powered by WordPress