Showing posts with label light. Show all posts
Showing posts with label light. Show all posts

Sunday, November 7, 2010

Liquid Glass

Did you ever see the movie The Abyss? It came out in 1989, was directed by James Cameron (of Avatar fame), and starred Ed Harris and Mary Elizabeth Mastrantonio. It had a cool liquid effect of a creature that was pure water, and could form the water into any shape it desired, even mimicing Mary Elizabeth's face.

Blender has a very useful object called lattices. They are just a 3D array of points, in an empty cube. You can move any of the points around, which deforms the overall shape so its not a cube anymore. The tricky part is you can take any other object, and modify it with the lattice, which deforms the shape of that object in the same way the lattice is deformed. If you look at the animation below, you will see a sphere that changes shape, being deformed by the invisible lattice. The lattice is not actually changing shape, its just moving through and around the sphere.

Plus I was able to make the sphere semi-transparent. As it stretches, you can see the back of the sphere visible through the middle. It gives a really cool watery, glassy effect.

Click to see video

The animation took 37 minutes to render, but quite a bit longer to get just the right material. It has 3 textures on it, clouds, a blend, and marble. And of course I had to turn on ray-tracing to get the transparency. It can also be viewed as a looping video. James Cameron would be happy to see the progress I am making in my lessons.

Wednesday, October 20, 2010

Seawater

Not long ago I visited the Hamptons, and had a great day at the beach with some fun people. The water was a bit too rough on the sea itself, so we went to a beach on the other side in the bay. Much smaller waves, and not so windy. Charlotte had to chase the giant goose as it was blown down the beach (I didn't say not windy at all). You are probably wondering what a giant goose is doing on the beach - it was a blow up one, and we floated on it on the water. Not your first guess I imagine.

Everyone enjoyed themselves. Ari got a bit of a shock when he woke up and found himself nose to claw with a spider crab. He likes fish and turtles, but is not so fond of crabs. We had a nice lunch, got a little too much sun, and heard a fun story from Emily about her first visit to the States, how she was stranded, and how everyone in a strange town looked after her so well.

The water was perfect shades of blue, as you can see in the photo below. Perhaps though after looking at this you realize there is something wrong with this picture. Can't put your finger on exactly what it is? Or maybe you have guessed already.

Actually, its not a photo at all. It is of course another pic generated by Blender. It is 3 separate layers, each one perfectly flat, but transparent, and with procedural textures added to them to create the illusion of waves. Large waves, and medium and small waves. And affecting the way the light reflects off it. It is amazing what some random numbers and the right algorithm can do.

That evening we met a lovely couple that lived in the area, and went out to a seafood place that served the freshest fish I have had in a long time. It had probably just jumped out of the sea that afternoon. I could render some fish next, but they just won't be the same as the real thing.

Thursday, October 14, 2010

Stained Glass Windows

Imagine standing at an old wrought iron gate, rusted and partially open, beckoning you in. Beyond is a garden, winding around to the side and behind the massive ancient church to your left. Its stones look like they have been standing their patiently forever, watching the world as it passes them by. You step through the squeaky gate, along the garden, unkempt and overgrown, patches of thistles scattered amongst daffodils that looked like they flew in from the neighbor over the fence. The breeze softly rustles them, adding to the muted sounds of an organ coming from inside.

As you come around to the back corner, you see a small cemetery hiding behind, a few tilted tombstones fading in the sun. An angel with its wings covering its eyes leans over the largest of the stone slabs, protecting the inhabitant beneath from all who might defile it. The sun is diagonally opposite, on the other side of the church, and shines brightly right through two sets of stained glass windows, in the process dappling and refracting in a kaleidoscope of color. The gravestones take on a patchwork quilt appearance, each a collection of oddly shaped reds, greens and blues.

If only I could take that image in your mind, and visualize it for you, in a stunning panorama of each of the elements in perfect detail. Instead, all I have for you is a ghostly shadow of a play on words. Not the stained glass windows you were thinking of, but colored glass windows, soiled by splotches of dried mud thrown up by a virtual thunderstorm. The light shining from behind, illuminating the grubbiness as much as the windows, casting stained shadows on the ground, a tinge of their original colors projected horizontally.

Luckily your imaginations far exceed anything I could do, and you can even hear the chirp of the bright red cardinal as it sits on top of the angel's wingtip, searching for a juicy beetle or grasshopper in the long grass between the plots.

Monday, October 11, 2010

Total Eclipse of the Blender

Space. The Final Frontier. No, scratch that, Star Trek is too clinical and pristine. For all the inspiration it has given inventors the world over, it does not have the grittiness or real-life-ness to make it in any way believable as a possible future. Need something more like Firefly.

Blender provides an automatic star background, so that part was easy. And the planet is just a simple sphere with bit of a texture on it to look like it has land and sea. The fun part is the star. It has the ability to show a set of vertices as halos, spots of light. And each spot can have lots of additional features, such as flares, rings surrounding the spot, lines emanating from it, star shapes around it, and several other fancier things. Plus of course varying the size and brightness of the spot itself. In combination it gives a large space of different effects, from ghostly wisps of light through sun sized nuclear burn-outs like this one. Which look like its about to engulf this planet which is getting way too close. That water won't be there for much longer.

Once I learn how to do animation, I am going to see if I can get this sun spinning, and see whether I can actually make it look active and dynamic, and not just a static model. Twenty more chapters to get through before we get to animation, so don't hold your breath just yet. Not that you had any attention of doing so anyway.

Saturday, October 9, 2010

Jelly

Imagine if you held this strange rock in your hand. Or perhaps its not a rock, but a wobbling blue blob of jelly. Or maybe its a freeze frame of a large drop of colored mercury floating in free space. We get a lot of information from sight, but the sense of touch can make all the difference in identifying something.

I learnt two things to make this unidentified non-flying object. The first was meta-balls, an old technology in the graphics world, where you place balls in 3D space that "bleed" into each other when they come close. And then you sculpt them by smoothing, inflating, and shrinking their vertices. And end up with really strange looking shapes.

Secondly, I am finally starting to learn how to do textures in Blender. This object has a cloud texture affecting the colors, and a ''stucci'' texture affecting the normals, which means that it creates fake shadows and highlights over its surface. They may be fake, but they convincingly fool the eye into seeing indentations and folds where none actually exist.

So pick up this blob, and feel the lovely wobbly jelly all over your fingers. Then taste it - its blueberry. Yum.

Sunday, October 3, 2010

Pipe Organ

Have you seen those movies where they have an evil overlord villain, who spends much of his time directing his minions from his massive lair in some remote location. For some reason he nearly always seems to have a huge pipe organ, and loves playing scary dramatic music in a theatrical way. I'm not sure where he get minions with pipe organ building skills. Perhaps he outsources it.

Making pipes in Blender, and joining them together, is done simply, once you know how. The yellow one is a simple T-joint, although I haven't yet worked out how to get the edges round. The cyan one I did next, starting with a cube, and extruding in all 6 directions at the same time.The magenta one is the same, but just in 3 directions instead of 6. And the green one is a small tube coming out of a larger tube, nearly twice the diameter, using a totally different technique called retopology.

They looked pretty bland, so I made them all shiny. Who doesn't like shiny? No-one, that's who.

Notice how at the joins, some of them come together very sharply (the yellow one), some very smoothly (the magenta one), and some half way in-between (the cyan one). You can easily control the smoothness of the intersection edges to get the effect you want. Just like the smooth and handsome hero (or beautiful heroine) that always controls the evil villain in the end.

Friday, October 1, 2010

Jeep Redux

Ok, so I went back and added a spare tire and tail-lights. And a steering wheel. But they were pretty quick. And the jeep needed a view from the back anyways.

Unfortunately when I render the image, it displays on a black background (which is actually alpha, i.e. not there at all). So when you see it on a white background, it looks a bit strange, especially the glow from the tail-lights. Once I design a whole ground and road and bushes and things around the jeep, this problem will go away. For now it just looks weird. (Check out the wonky right-hand tail-light.)

In Blender you can make one object the parent of the other, so that if you move the parent, the child object moves too. But if you move the child, the parent does not move. And you can set the center or pivot point of any object. So I was easily able to spin the rocket launcher around on the tripod to point in a different direction. Much easier than spinning the whole jeep around to shoot at your enemy.

Sunday, September 26, 2010

Glass Goblet

If a piglet is a small pig, and a droplet is a small drop, I guess a goblet is a small gob. Which is British and Australian slang for "mouth". So maybe you need a small mouth to drink from a goblet.

Amazingly, you can start with a cube in Blender, and end up with no straight lines anywhere. It has this thing called sub-surfaces. You give it a cube with 6 faces, tell it to sub-surface, and it turns each face into 4 faces. Which arrange themselves to halve the angles between the faces, so you end up with something rounder. Which sounds like the result after eating at McDonalds for too long.

If you sub-surface to level 2, you get each of the sub-surfaced faces sub-surfaced as well, so the 4 faces then becomes 16 faces. And you can sub-surface to level 3, 4, 5, etc. Each time the result is smoother than before.

Each part of this goblet was a cube, or something vaguely cubish (not cubist, that's those crazy painters from last century like Picaso). The stem and part you drink from was a very tall tube (or a "skinny" one if you don't mind being politically incorrect).

Ray-tracing comes in handy here again, not this time for reflections but for refractions. Like when you throw a spear into a lake to catch the fish but it misses by six inches cause the light has been bent. Until you adapt and aim 6 inches away from the fish. Clever human.

The base looks a bit too small, but I think that's an optical illusion from the perspective. In Blender you can view the scene in Orthogonal (straight-on) or Perspective mode, where things closer to you look bigger. Like that exam you haven't studied for tomorrow.

Saturday, September 25, 2010

Rolling

Not stones. I wasn't thinking of moss, and neither were you. Although both of us are now I guess. Let's stop.

I took the die from yesterday, modified it a bit, duplicated it (Shift-D in Blender, nearly everything has a keyboard shortcut (designed for power users, remember?)), and rotated them all around a bit, in different directions, so they looked like they had just been rolled out on to a table. With some of them still falling, and spinning.

A very shiny table. In fact one that makes a good impersonation of a mirror. Without the "mirror, mirror on the wall" banter. To do this you have to turn on ray-tracing, which is trick for getting light to bounce of mirrors, and do other things that light does. And give somewhat realistic effects.

The modifications were making the single pip twice as large as the others, and pushing each of the six faces in a little to make the corners tighter. Better for rolling. Not that these virtual dice will ever touch a real table. Or moss for that matter. Sorry, I shouldn't have reminded you.

Friday, September 24, 2010

Die Another Day

James Bond is pretty cool. And it was a good movie. But I'm not really talking about that.

I promised a brighter (and hopefully better) version of the Die from yesterday. This one is a nice soothing red. The color of blood. Notice there is never much blood in Bond movies? Funny that, considering how much violence they have.

Anyways, this one has nice white pips. That are much rounder than the previous one (those were a bit squarish). Ok, not exactly white, more sort of a bluish tinge. Like the blue lips on a corpse. Very soothing.

Must be made of something very shiny, cause the light seems to bounce right off it. I forgot to mention, you can place one or more lamps anywhere you like in the scene, and get all sorts of light effects. Sunlight, spotlights, area lights, whatever. Intense, pale, colored, your preference. You can make that corpse look nice and shiny too, and show off those blue lips really well. Or not.