Strict Standards: Redefining already defined constructor for class WP_Dependencies in /home/public/blog/wp-includes/class.wp-dependencies.php on line 15
maximile.net
Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/public/blog/wp-includes/kses.php on line 934

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/public/blog/wp-includes/kses.php on line 935

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/public/blog/wp-includes/kses.php on line 934

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/public/blog/wp-includes/kses.php on line 935

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/public/blog/wp-includes/kses.php on line 934

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/public/blog/wp-includes/kses.php on line 935

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/public/blog/wp-includes/kses.php on line 934

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/public/blog/wp-includes/kses.php on line 935

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/public/blog/wp-includes/kses.php on line 934

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/public/blog/wp-includes/kses.php on line 935

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/public/blog/wp-includes/kses.php on line 934

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/public/blog/wp-includes/kses.php on line 935

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/public/blog/wp-includes/kses.php on line 934

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/public/blog/wp-includes/kses.php on line 935

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/public/blog/wp-includes/kses.php on line 934

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/public/blog/wp-includes/kses.php on line 935

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/public/blog/wp-includes/kses.php on line 934

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/public/blog/wp-includes/kses.php on line 935

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/public/blog/wp-includes/kses.php on line 934

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/public/blog/wp-includes/kses.php on line 935

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/public/blog/wp-includes/kses.php on line 934

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/public/blog/wp-includes/kses.php on line 935

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/public/blog/wp-includes/kses.php on line 934

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/public/blog/wp-includes/kses.php on line 935

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/public/blog/wp-includes/kses.php on line 934

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/public/blog/wp-includes/kses.php on line 935

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/public/blog/wp-includes/kses.php on line 934

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/public/blog/wp-includes/kses.php on line 935

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/public/blog/wp-includes/kses.php on line 934

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/public/blog/wp-includes/kses.php on line 935

Topics

Particle Effects

I had a few particle-based effects to work on for The Muse. Feathers, confetti, falling flowers and floating and bursting bubbles are all too complicated to make using keyframe-based animation, but can be approximated using particles.

Flowers

Flowers Edit

Flowers Rendered

The flowers were easy enough. Textured planes oriented to face the camera, given a small random starting velocity and a constant downward acceleration.

Confetti

Confetti Edit

Confetti Rendered

The confetti was achieved in a similar manner, but using complex models instead of a plane. The models had a random rotation speed and initial orientation.

Feathers

Feathers Edit

Feathers Rendered

The feathers were more challenging because they had to move realistically in three dimensions. They have to move quickly at first because they explode outwards, then slow down quickly under the effects of air resistance. I had tried mixing keyframe- and particle-based animation to achieve the characteristic wafting motion, but in the end the best effect was reached by having most of them particles and a couple of explicitly animated ones (notice the motion path).

Bubble burst

Bubble Burst Edit

Bubble Burst Rendered

The bubble had to burst. Photo-realism was out of the question with the amount of time left, but a stylised particle animation was sufficient to convey the concept. By spawning particles all across the surface of a sphere, giving them a small initial velocity and letting them react to gravity and Brownian motion, I could render out something reasonable.

It’s worth knowing the basics of particle animation, because it can save a lot of time when correctly applied.

Filed under: , on June 12, 2008 at 5:00 pm

Adding Stitching to Textures

I have had to make a few leather bags recently, and adding stitching to them seems like it should be difficult. But by using Photoshop’s brush features, it’s surprisingly easy.

  1. Muse Stitching 1Create a single stitch in a new document. Create a new document (about 500px × 500px) with the background set to white. Make sure the foreground colour is black by pressing ‘d’. Using the rounded rectangle tool with the radius set to something large, draw a box about the right shape for your stitch.
  2. Muse Stitching 2Define the stitch as a brush. Use the marquee tool to select the stitch. It doesn’t have to be accurate; Photoshop will ignore any white space so leave a comfortable margin. Then choose “Define Brush Preset…” from the Edit menu. Give it a useful name, like “Stitching”.
  3. Muse Stitching 3Set up the brush. Open or create your texture map in Photoshop, and open the brush palette. Select your new brush shape.
    1. In the “Brush Tip Shape” panel, you will probably need to set the angle to 90°.
    2. Adjust the spacing until it looks about right.
    3. Under “Shape Dynamics”, set “Control” under “Angle Jitter” to “Direction”.
    4. If the preview doesn’t look right, make sure that all the other jitters and pen controls are turned off. Muse Stitching 4At this point, you can draw in your document with the brush tool (’b'). Set it to the correct size and colour for your thread. If you have a steady enough hand, you might be happy with this, and can skip to the end. If not, keep reading.
  4. Muse Stitching 5Draw the stitching paths. Choose the pen tool, and make sure it is set to draw paths rather than shapes or pixels. Trace along where you want your stitching to go. Remember you can edit the paths as much as you like once you have drawn them.Muse Stitching 6
  5. Muse Stitching 7Trace the paths with the brush. Once you have your path perfected, it’s a good idea to duplicate it in the Paths palette. Name it, then click the “Stroke path with brush” button at the bottom of the palette.
  6. Muse Stitching 8Add realism to the stitching. Bevel and Emboss, Drop Shadow, Outer Glow or Pattern Overlay can all be useful here. Play with the layer style until you are happy with the way it looks.

If you need to, you can easily create a bump or height map from the mask.

The advanced features of the Brush tool often go unused in situations like this, because people think that they need to have a very steady hand to be this precise. But by making it follow a path, you can perfect the stroke before you are committed, and this allows it to become very useful.

Filed under: , on June 10, 2008 at 5:42 pm

Wunderland’s Compositing Explained

Exterior Composition

There’s a War in Wunderland has an unmistakable style. This is down to a few things - the texture work, the simple characters, the animation, the rendering and post-processing and the presentation. I was responsible for a lot of the look and feel of the finished frame, and here’s a quick explanation of how it goes together.

There’s a strong dichotomy between the realism of the rendering and the cartoonish subject and art style. This is intentional, and found in another popular animation technique - stop motion. It’s important that the audience realises that they’re watching paper models, but that can’t get in the way of the stylised world that the texture artists and modellers spent so much effort on making. This conflict was responsible for a lot of the decisions that had to be made in the compositing process.

Colour and Ambient

The first example of this is in the bottom two passes (refer to the diagram) - the colour and the ambient. The colour is a strongly-lit scene, with stark contrast between the shadows and the highlights - the sort of setup you might use to demonstrate a model. The ambient pass has just one neutral ambient light illuminating everything. This has the important effect of making every rendered pixel identical to its corresponding texel - everything is the same colour as it is on the texture map. By balancing the two (varying the opacity of the upper one) you can choose how much effect the lighting has.

Of course, the same effect could be achieved by altering the lighting setup before you render, but having both passes allows much more immediate control over the setup. Small changes can be made with no additional render time or loss of quality. While it’s good to reduce your render time as much as possible, when rendering out another pass gives allows you to be intuitive, impulsive and artistic it’s usually worth it.

Ambient Occlusion

I could not imagine doing a film like this without ambient occlusion. The flat colours in the textures would make the film look dull if it were lit with hard lights. Raytraced and area lights would overcome this, but with a big hit on render time. They are also harder to balance and to maintain uniformity across all the shots.

Ambient occlusion allows us to generate those tones, and adds a lot to the realism of the scene. For the exterior shots I used two AO passes, which surprised some people. It’s certainly hard on render time, but I think it was justified. The narrow pass contains everything in the scene, and results in the effect you’re used to. The broad AO pass contains only the environment. Because the exterior shots are set in a city, complex lighting is needed to darken alleyways, lighten parks and burn out rooftops. An ambient occlusion setup to register occlusion at a high distance is an excellent way to fake this, and is much faster than an equivalent raytraced light.

It would have been nice to bake the broad AO into the textures, but for speed reasons I advised against this. The UV maps had a lot of shared space, which can be overcome but not too easily.

Ambient occlusion presents a special problem when dealing with decals - planes with an alpha channel defining the shape. The AO shader would ignore the alpha channel, leaving an unsightly border around it. So we omitted decals from the AO pass, and if necessary rendered them into their own layer.

Character

The character had his own pass so that he could be made to stand out from his surroundings. While it’s usually better to achieve this with texturing, lighting, shot composition and so on, this additional technique can be effective when used subtly.

The character pass was also used to mask out the broad ambient occlusion - when compositing an AO pass it’s important to be careful that everything visible in the AO is also visible in the other passes, otherwise ghostlike effects occur.

Depth

Finally, a depth pass was rendered to make it easy to add a depth of field effect. After Effects and Photoshop have a Lens Blur filter which can read a depth map and accurately simulate depth of field. By sampling form the depth channel you can accurately set the focal distance to the character, and even animate this for focus pulls.

Depth of field is important for adding to the realism of a scene, and can also be used to convey a sense of scale - by carefully mimicking the camera used in miniature work, you can subtly suggest that these are models.

Others

One effect we particularly wanted to avoid was motion blur. Though it’s often an important tool used to make a scene realistic, in this case it would be entirely inappropriate. Stop motion is only ever sampling still scenes, and so there is no motion blur. There are exceptions when it can be added manually for fast moving objects, but most professional stop motion studios would prefer to use traditional animation techniques such as squash and stretch to convey this.

A shadow pass was also rendered in some exterior scenes. It’s useful to ground distant characters, present a time of day and, in one shot, add dramatic effect.

Skies and clouds were imported separately, which made it easier to control but introduced extra difficulties in camera moves.

So that’s how it was done.

Exterior Final

Filed under: , on June 10, 2008 at 5:14 pm

Cooking in 3D

Café de Beignet takes place in a French pätisserie, and I was charged with making some appropriate-looking pastries to decorate it. Here’s a render of some of them:

Cool, no? Here’s a look at how a few of them were made.

Danish Pastry

The model for this was particularly easy. It looked great at 64 quads, but I made a more detailed version at 336 quads in case it was going to be in the foreground at all.

Danish Wire 1Danish Wire 2

The fun was in the texturing. Here’s how it was done, step-by-step.

  1. Danish Step 1Bake an ambient occlusion pass to use as a guide and to generate initial texture and lighting. AO is a raytraced effect, and as such is noisy by nature. This is a great way to add a little randomness to your image right from the start.
  2. Danish Step 2Add some colour. I chose two suitable colours, used the clouds filter and set the layer mode to Color.
  3. Danish Step 3Paint in the twist marks. The markings that give it its distinctive shape are caused by twists made when the dough was still soft. This has two effects - it introduces relief, meaning you have to consider shadows and highlights, and it leaves thin bits of pastry that cook more quickly and end up darker than the rest. I created a custom brush for the burnt bits and used the burn tool to add shadows.
  4. Danish Step 4Icing sugar / highlights. On my reference photo, highlights and icing sugar were indistinguishable. This seemed a bit odd, but I decided to copy the effect. Using a brush that looked suitably sugary, I painted in white where highlights would be appropriate.
  5. Danish Step 5Add custard. A speckled layer mask and the Bevel and Emboss layer style were all that was needed for the glossy, uneven look of the custard.
  6. Danish Step 6Dribble over icing. Icing on Danish pastries is far more liquid when applied than usual, so it’s dribbled over rather than piped. Bear this in mind as you paint the layer mask for it - smooth, pendulous strokes are needed. Again the Bevel and Emboss style comes in handy for showing off the shape. Remember that it’s not entirely opaque.

Croissant

Wireframe Texture yes

Photos aren’t always enough when you’re researching for a model. I felt I needed to understand how a croissant was made before I could model an accurate representation of it. (A more dedicated team might have sent me to France to study a master croissant-maker at work for a week, but apparently Café de Beignet’s budget didn’t stretch that far.) Once you understand the initial shape, and how it’s rolled up, and how it expands in the oven, it becomes much more mysterious. And the main concept you have to convey is how the rolled up layers create the final shape.

This made it surprisingly difficult to model. If you trace one of the edge loops, you’ll realise that it’s actually a long spiral. Lining these up and filling the polygons without distortion was challenging. But I’m pleased with the result.

Painting the texture was a similar process as used on the Danish pastry, but this one had an added “flaky” effect. This was achieved using the following filters: Clouds, Stained Glass and Find Edges. This generated a layer mask, which could then be used to apply a layer style suitable to reveal the flakes.

Cupcakes

The cupcakes were nice to model. The crimped paper wrapping meant that I had to use lots of polygons (the final model was about 950 quads), and it was an interesting enough shape to make unwrapping the UVs a challenge.

Cupcake UV Map

Painting the texture was easy in comparison. I started with a baked ambient occlusion layer, and added solid colours with layer masks restricting their effect to the correct area. This isn’t the easiest way to do it, but it meant that when I had to create different coloured versions, I just had to change the colour of one layer, which was handy.

Notice the outside of the paper case is in two sections. This made it tough to line up the heights of where the icing shows through. But by painting onto the textures in 3D mode, and by a bit of trial and error, the join is not visible.

Filed under: , on June 10, 2008 at 5:04 pm

Early Lighting

Here’s some lighting tests. The first one shows the bare minimum setup: directional lights for the sun and the bounced light. Initial

Here’s the same thing but adapted into a more standard three-point setup. Using warmer tones to try to indicate the sun’s position. The softer shadows make it less cartoony, but it still has a very stylised nature. KFB

One more; an attempt at making it more realistic. KFB Tweaked

The setup needs some work; at the moment the near hills blend into the far hills too smoothly.

Also, shadows need to be addressed. Everything has very soft shadows at the moment, which is suitable for an occluded daytime scene, but the bike needs something to ground it. One idea I had was to render the bike from above and create a projecting ‘gobo’ parented to it. This could project a shadow directly beneath it, which could be soft in the right places.

Filed under: , on April 11, 2008 at 9:02 am

Rigging

The Duck, with his happy handles: The duck with handles

He’s quite bendy: Bendy Duck

Filed under: , on April 11, 2008 at 8:54 am

Ducking and Diving

Progress on the duck; more modelled and a start on texturing.

Ugly Duckface Texture Pun

Filed under: , on April 11, 2008 at 3:17 am

Starting to Duck

An early duck screenshot.

The early duck catches the bread.

Early Duck

Filed under: , on April 11, 2008 at 3:08 am

Some More Models

I made some more models for this film thingy. You can look at some of them.

Scoop Render Logo Render Fountain Render Bread Render

Filed under: , on April 11, 2008 at 2:45 am

The Basics of Normals

I didn’t understand vertex normals until I started learning about 3D programming. But you can’t be a good polygon modeller without them, and they’re very simple. Looking at my previous work, every model I had made before I understood normals was messy and inefficient in comparison to my later ones. And you need to understand vertex normals before you can move on to more advanced concepts such as normal mapping.

There’s not too much complicated theory behind vertex normals. Here are the basics. For each vertex, an ‘imaginary line’ projects outwards. It’s invisible, but it affects the lighting. When you create a flat shape - for example, a simple ground plane - the normals all point at right angles to the face. Because they are all parallel, they all affect the light in the same way, and the plane appears flat.


NorTheory

But when you have two polygons joining, there is a choice about what to do at the shared edge. You can either treat them as two separate flat surfaces, giving the vertices at the shared edge normals that point away from each other. Or you can take the average of the normals, making the normals point in the same direction. If you do this, the normals for the polygons are not parallel, and the 3D renderer will interpolate the lighting between the polygon’s vertices. This gives the impression that there is a smooth bend in the surface, rather than a sharp crease. This is referred to as ‘softening edges’ in Maya, or ‘smoothing’ in Blender.


NorWire

Looking at the following example, we can see how this technique can be applied to a model.


NorSolid

By default, the polygons are ‘flat’; they have parallel normals. When rendered, the polygon boundaries are obvious; the model looks blocky.


Smooth all Over

But simply averaging all of the normals results in this horrible monster. Definitely not what we want.

The problem is that lots of the edges are obviously meant to be sharp. When the renderer tries to average the lighting over a sharp edge, it is very likely to give undesirable results. Softening an edge is never a substitute for rounding or bevelling.


Sharp

We need to split only some of the normals; the ones along the sharp edges. It would be very difficult to do this manually, but all modelling applications have a tool for doing this. Just select the edges that should be sharp, and mark them as sharp using the ‘Harden Edge’ tool in Maya or the ‘Mark Sharp’ tool in Blender.

Most applications also have a tool for selecting sharp edges automatically, which can be very useful, but on many models you will need to tweak the results by hand.


Good Smooth

And here’s the final result. The curved areas are lit smoothly, but the polygon count is still low. Notice that the silhouette reveals where the polygons meet. The only way to get past that is to use more polygons.

Understanding normals allows you to achieve effects that would otherwise require you to add a lot of polygons. This is vital when modelling for games, but still important when working towards prerendered video. It allows you to simplify your meshes, making it less likely that you will introduce errors in rendering or animating.

Filed under: , on April 11, 2008 at 2:37 am
Next Page »

Powered by WordPress