Earth. Our one and only planet. At least for now.
Am learning about UV Mapping. Its a technique that lets you take a picture and define exactly how to wrap it around an object.
First you take the object and "unwrap" it. For a sphere for example, you first need to create a seam around the equator, then when you unwrap you get two circles full of triangles. You take the image and lay it over the triangles. Then you adjust them to completely cover the image. When you wrap it again, it places the image onto the same spots on the 3D where the triangles originally came from. Ok, so its hard to describe - you have to see it to understand it. Or get someone who is better at describing it.
I took Google Maps, satellite view, grabbed a partial screen shot, and brought that into Blender. I wrapped it around the sphere. Not entirely successfully, you can see Africa looks a bit distorted. The image I had to Photoshop a bit, to remove the Google text and stuff. Although in my case its not Photoshop but a similar program called Pixelmator.
I also took another left and right pic to get 3D view. Doesn't work so well with stars in the background - they look very 2D.
This technique can be applied to much more complex shapes than a sphere. The most common one it is applied to is the human body. You can buy whole male and female body skins to wrap around your models. The better ones can be upwards of several hundred dollars, available at websites like TurboSquid. With amazing skin details, up to things like fingerprints.
Friday, October 29, 2010
Earth
Tuesday, October 26, 2010
True 3D
Ok, all these 3D pics, are not really. They are just 2D pics. All pictures are 2D effectively, so I guess we can't blame them for not living up to their name. They are called 3D of course because they are designed and generated in 3D, and as you have seen before, you can take two pics (or as many as you want) from different angles. As opposed to being designed in 2D, or drawn, or painted or a 2D canvas.
I decided to jump ahead a bit, and make some actual, real, 3D pics. Since you don't have a 3D computer screen yet, I found another way to show it to you. Maybe. If you can hack your eyeballs a little.
I took the 12 pipey thingy from last time, and took 2 pics of it from very slightly different angles, and put them side by side. The left one is from a spot corresponding to your left eyeball, and the right one your right eyeball. If you look closely you can see the images are just very slightly different.
Now, all you have to do is look at the left image with your left eyeball, and the right one with your right eyeball. What's the matter, you can't do that? Yeah, its not immediately obvious how to, but it can be done. Try the following - if it doesn't work, just pretend you can see it anyway.
Start by making sure no-one is watching you. This is going to look pretty silly. Bring your face right up close to the screen. Put your nose just about touching a spot between the two images. It will be very blurry, since no-one can focus that close, but don't worry. Now, let your eyes relax. Each image is directly in front of each eye. They both will sort of blur together into one image, but nothing you can make out very well. Stare straight ahead, right through the screen to a point several feet behind. Tricky to do with a screen in your face. It is still burry. Just ignore that. Keep your head level.
Now, very slowly, I mean really slowly, move your face backwards. Or the screen forwards, your choice. Keep staring in the distance. If at any point the two images that are blurry in the middle together start to spread apart, stop, and go back a bit again until they remerge. Keep relaxing. Come back out again and repeat until you are about 10 inches away. Relax. The central image will slowly un-blur, and become clear. Suddenly you will see the object in full 3D. And the surprise will make your eyes revert back to focusing on the screen, and you will have to start all over again.
Once you get it it really does look quite cool. And with a bit of practice you will be able to do it more and more easily. I can do it now without even moving my head. Since you liked that pic, I created a second one for you to practice on, based on the first, a sort of clubby thing that you might knock people on the head with who look at you funny. With eyeballs staring right through you.
Saturday, October 23, 2010
Pipes Redux
What is brown, lies on the ground, and is sticky? Answer at the end. Don't peek.
Three weeks ago I showed you four shiny pipes, each one actually a join of several pipes together. But all the joins were at right angles. And based off a cube (a pipe coming out of two or more faces of the cube). Ever since I have wanted to revisit them, and do a much better job.
Remember back in school when you learnt the five platonic solids. Everything from the simple cube to the complex icosahedron. And you probably thought you would never need them again. And you probably never did. Just like most of the stuff you learn in school. Well, I took each of them, and created pipes coming out of each face. You can see them below, 4 pipes for the tetrahedron, 6 for the cube, 8 for the octahedron, 12 for the dodecahedron, and 20 for the icosahedron. I know, I'm such a dork.
I smoothed them all, and then added some textures, and color blending, and various things so they didn't look so flat. The red cube based one is nice, looks like its very hot in the center and cooler toward the edges. But my favorite is the orangey dodecahedron one, the pipes are round and fat, with just the perfect amount of unevenness to the surface so you know it would feel nice under your fingertips. And something about it just looks nicer that all the ones based on triangles.
Generally I think they all came out pretty well. The blue one looks like it has zillions of glass shards embedded in it. And the green one is sort of barky. Not that bark usually comes in green. And the cyan one's surface is like a whole tube of spearmint toothpaste was smeared all over it. So I guess you could say it is sticky.
Which reminds me of the sticky question I posed at the beginning. So what is it that is brown, lies on the ground, and is sticky? Did you think of the answer? Clever you. A stick of course. I hope you weren't thinking of something else.
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.
Sunday, October 17, 2010
Texture Maps
This is a perfectly flat square. In 2D. With a single flat color. It has a texture applied to modify the "normals", which means light falling on it will behave as if its not flat at all, but modified to the shape of the texture. A wonderful little trick that is used all the time to speed up rendering by keeping the number of vertices and faces low.
If you look carefully at the "stones" above any of the lights, you can see the highlights at the bottom of the stones, and shadows at the top. And if you look at the stones directly under the lights, you can see no shadows at all. Just as if the stones were actually protruding from the flat surface of the wall.
Blender also lets you apply the texture directly to make the vertices on the surface actually be displaced. Which you need if you are going to look at the texture side on, and see the actual silhouettes of the bumps, for example, a mountain range. But for this you need a lot of vertices. Thousands of them. Millions. And if you want to animate that you need a whole stack of computers, which is called a "render farm". All the CGI movies you see have large render farms working for months creating all the final frames. So there are definite limits to what you can do with just one computer. Once I push this computer to the limit it will be time to buy a newer, faster one. But that will not be for a while yet. At least I hope so, my wallet isn't very fat at the moment.
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.
Thursday, October 7, 2010
Curvy
What is it about curves that people are attracted to, so much more than straight lines. We live in a world of blocky buildings and flat surfaces. And yet we seem to be instinctively drawn to the exact opposite. The fluidity of long wavy hair, the curvaceousness of a SHB, the smooth streamlined flow on a Porsche Carrera.
Some things in Blender are surprisingly easy. You can make quite complex looking shapes sometimes very simply. Make a simple wavy curve, like a triangle but wobbly. Then make another simple closed curve, again a bit wobbly. Then apply the 2nd curve to the 1st curve as a Bevel Object, and you end up with the shape below. Even after applying it, you can continue to modify one or both curves to get just the shape you want.
You could use this for practical things like crown molding (the bits of wood between walls and ceilings), gutters, doorways, anywhere where the same cross-section applies along the whole length of the shape. Or just for strange looking shapes like this one.
Tuesday, October 5, 2010
Logo
What's your favorite logo? Think about it for a second and choose one. Now, I'm going to read your mind, and guess something about it? Ready? It's blue. Or at least, it's mostly blue. Am I psychic? Yes.
No, actually, its just that most logos are blue, or have a lot of blue in them. Someone made a single pic of the top one million logos on the internet, scaled by web traffic. It looks like the sea, with bits of other colors floating like flotsam and jetsam on the cool blue waters. Must be something deep in our psyches.
Am learning in Blender about Bezier Curves. You can basically trace any flat shape you like as a series of curves. A series of points actually, and controlling the points lets you control the curves. So the lesson today was to recreate a random logo they found on a piece of flotsam somewhere, washed up on the beach of internet culture.
The yellow bit I made with a Bezier curve, and added a little thickness to it. The red bit i made as a cylinder with 20 segments, then joined a couple from one side with a couple from the other to form the slash in the middle. Had to raise it up in the middle to go over the yellow bit, which is why it has some unusual highlights on it.
Not really happy with this one. The bezier curve is not smooth enough, you can still see the straight edges to it in places. And the slash doesn't quite look right.
And worst of all? It's not blue.
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.