Archive for the ‘Projects’ Category

I Am Mug

Tuesday, October 7th, 2008

At work we are supposed to have private mugs so the general ones can be used by guests. I used a blue Christmas mug at first, but now I have one which is truly mine… me! Surely nobody will mistake it for theirs!

The process to generate this mug includes an eight year old idea, sawing, video recording, LEGO and custom software.

Read on if you want the full story behind the creation of the mug(s)!

Background

In 2000 I found photos made by Andrew Davidhazy, a professor in imaging and photographic technology, but by then I didn’t know how they were made or who had made them. Six months ago or so I found the files on my computer and could via Google Image search find where they came from!

Andrew Davidhazy utilized a scrolling film with a slit that exposes a beam of light over time, creating weird photos which fascinated me; especially those of people. As I didn’t know about this technique at the time, I came up with my own way of how to create similar images.

As depicted in the crude 3D animation above (from 2000-02-25) my idea was to use a video camera to record imagery, and then I would extract a column of pixels from each frame in the video to create my images. At the time I only speculated in what kind of apparatus I would need to rotate a camera perfectly around objects (like my own head) to create unwrapping pictures, but I never got to constructing anything as I was not very resourceful back then.

The image to the left is from 2001, generated by sitting on a rotating office chair while recording with a webcam. The software used in this case was a VB application which saved columns of actual screen pixels, made by a school classmate. Not especially practical but it worked, the entire thing was experimental.

In 2003 I begun to use parts of my thought out method with a static camera which rotated to create standard panoramas in Halo, a videogame for the Xbox. To do this I had my cousin create a specialized software to process the videos after my specifications. This is the same application I used for this project, five years later.

Creation Process

Now, in 2008, the concept sparked to life in my mind again when I got the pressure on me to find a private mug to use at work, and I decided it was about time to realize the old idea of unwrapping my head. Many of the things I would need this time around were readily available, or could be acquired cheaply. Here is what I needed.

  • Video-capable camera with lockable ISO/exposure setting.
  • A construction that would rotate the camera around my head.
  • Custom software to process the video with.

The Camera

The camera I used was my beloved Canon Ixus 75 bought in January prior to a skiing trip. It’s a cheap ultra compact camera but it’s the best video capture device I currently own, and it’s physically small enough to simplify the next step of the project. It captures a compressed video stream in 640×480 pixels at 30 frames per second, which had to make do. A feature I found after about 15 face scans was a way to lock the exposure/ISO setting during recording which generates a much better image. Too bad I didn’t find that earlier!

In accordance with my old idea of how to scan a head I decided I would create a device that carried the camera on around my head, looking inwards all the time. The easiest way to construct this was to use my old LEGO bricks.

The LEGO

First I created a vehicle with different speeds on the inner and outer wheels, which caused it to move in a circle. It ended up being way too hard to align it correctly for a perfect circle and it had to travel at a very slow speed to not vibrate or shake too noticeably.

My second concept was a whole frame that would rotate around my head. I experimented with different wheels and constructions. Wide tires would have too much sideways grip so they would only gradually follow the circular track, causing it all to wobble. I ended up using the thinnest tires I could find.

For propulsion I started using two motors facing each other on the construction, but as the motors got different speeds even though they were of the same model I used one large motor instead. I ordered the extra motor and extension cables to reach the battery pack from the LEGO store. In addition I bought additional tires off of eBay as I only had five of them from the beginning.

The final construction is supported by 16 wheels that is in contact with the surface, four of which are driven by the motor via gears, axles, screws and two differentials. The larger tires were added to counter some of the weight and to add grip. The camera hangs outside the outer supporting wheel which caused the inner to slip, causing the rig to travel outside the edge of the table.

The Table

First I got a second hand table which was one meter in diameter, sawing a hole in the center. This table was round and nice, but it could be extended; which meant the board was split in two. This caused the LEGO construction to jump as it crossed the seam to the other board. I went back to the second hand store again to find a table with a whole board. Finally I got a smaller table, square, and precisely the right size.

The Software

As I mentioned before I used the old application my cousin made for me when I created the Halo panoramas. One limitation it has is that it can only handle raw AVI files which cannot be larger than 1GB. To work around this I cropped the video to a small stripe and exported that without sound. A side benefit is that it saves disk space as well as making it lighter to work with.

The Scanning

I tried several different ways of positioning the table and myself before I got to the final scan session. This is how I ended up doing it.

  • I put the table on four stools to increase the height; so I could fit a chair underneath.
  • I bought a cheap lawn chair that fits under the table.
  • I using my Wii Balance Board (which I don’t use very much anymore, sadly!) to gain height from the chair, as I didn’t get high enough up as it was.
  • I hanged an Xbox Live Vision camera in the ceiling, hooked up to my Xbox 360 displaying a picture on the TV so I could align my head correctly.
  • I used a universal remote to deactivate the screensaver on the 360 when it activated.

I began with setting the camera to video mode, macro and fixed ISO value. Then I focused it on my hand which I put where my head would be, turned on the recording and inserted it into the LEGO construction and turned on the LEGO motor. Next I climbed into the setup, which almost always resulted in a sour shoulder or other muscle pain, and tried to align my head while the LEGO traveled around the table.

For a successful capture I need to sit still for about two minutes with the same face. Your face can relax when the camera has traveled past it, but the risk is that you change your posture if you relax too much. Some of the faces were hard to keep for two minutes, as well as not blinking when the camera passed!

Other considerations where lighting, angles and distance. I noticed that I got blue strikes through some images, and that was due to my wall mounted lamps getting into the video image. As for positioning, whatever you have closer to the camera will take up less horizontal room in the generated image, so to get a result that is as proportional as possible I needed to center my head. As you can see in the collection of scans keeping your head straight is also important. When you angle the head a whole lot of distortions enter the picture. If you lean your head to the side the whole image will be heavily distorted, but that was easy to control. It was harder to remember to look straight forward, if you do not your ears will be rotated and moved, getting different proportions compared to when you keep your head level.

The Mug

After several face scanning sessions across several months I finally decided I had images I was happy with. I cut them up in Photoshop and adjusted scales so my ears would be in the right places on the mug. After that I ordered three panorama mugs from Emmagjort.se, I found their price was very acceptable and even had phone contact to arrange the details, very nice!

This concludes the eight year old idea… fantasticly relieving! Of course I have ideas of how to make a much better construction from engineered metal parts, but that is 20 years off.

Flumen Formula: Level Creation

Monday, September 15th, 2008

Flumen Formula is one of my many spare time hobby Flash projects which is unfinished. This one I’ve spent a fair amount of brain-juice to create, so I better complete it or the waste would be terrible! The game is fully functional, but what it lacks is levels, and some polish.

Development grinded to a halt when it was time to design the 144 levels the game can handle, but after several months I got the suggestion that I should open up level creation for anyone who would dare, which is now what I’m doing.

So here you have it, your chance to make a contribution to this project!

The Game
Water flows from the blue block. Your mission is to move and rotate the colored blocks so the water uses all canals in the entire level, without any leaks, including canals that are immobile.

How to Play
To lift a block, click it and hold the button down. To rotate the block, use the scroll-wheel or the left and right arrow keys. To drop the block, simply let go of the mouse button. Give it a test spin to understand what it’s all about, use the link at the top or click the game logo.

Level Creation
I’ve written a description of how to create and test levels for Flumen Formula, and I present it here in Word, PDF or HTML format. Also available are reference material in PDF, PNG and Flash (in HTML) formats for the game board, the various blocks available and a sample paper conversion.

As mentioned above, levels can be pasted into the game and tested, right now! How to is described in the documentation!

Submission
To contribute your level to the project, please paste it in an email, or attach a .txt file with the level data, and send it to submit@7708.net. You decide yourself what personal information you want to disclose, but any type of name will do. It’s all that is needed for the credits. There is no deadline, but I will post a message when I have gathered enough acceptable levels!

Ownership
If you submit a level you grant me the ownership to the level data if you don’t specify otherwise. This is to simplify the process if someone wants to purchase a license for the game or the source code. If you do not want to grant me the ownership please note that in your email submission. In an eventual business transaction those levels will be removed from the game.

Credit
Everyone who gets their level(s) in the final version of the game will be mentioned as level designers in the credits and on any eventual site/page that accompanies it. If you go by a moniker, it shouldn’t be perverse, politically incorrect or anything else I wouldn’t want to say in public.

Genereal Feedback
Of course I also appreciate feedback on anything surrounding the game. Be it user interface, graphics design or anything. Feel free to send your feedback to feedback@7708.net or post a comment right here!

Thanks!

Note: The game itself is hosted on my private server, and not the server that hosts this blog, which is why it’s located on the 7708.net domain.

Update: My initial plan was to have this ready two weeks ago, but as I was finalizing the public release I came up with new features that changed how levels were constructed and other things that needed polish, so I’ve been postponing it several times. Two times the post managed to pop up on my front page as my social life kept me so distracted I forgot about when the post was going live, as well as denying me the time to finish the small details I myself thought necessary, sorry about this.

Trampoline + Water = ?

Monday, August 18th, 2008

Earlier I posted that I had acquired a trampoline to put in my parents garden, as I myself live in an apartment. Shortly afterward I got curious of how well it would work in water, if at all. It was quite a strange idea, but it got stuck in my head, so I had to try it out.

To make it possible to launch off of the trampoline into the water I wanted to increase the height by extending the legs. I checked if it was possible to order more leg parts, as they were stackable, but that was only possible if you actually had a broken part to replace. Then I checked the price for manufacturing extensions, which was more than half the price of a completely new trampoline! So I ended up buying a second one and used those legs for the extension.

For the trampoline not to sink in the sand on the lake bottom I prepared boards to have as feet on the legs. These were then attached with a rope to stabilize the structure somewhat.

To test the rig out I brought together a number of friends and headed out to a beach belonging to the second largest lake in the country. It was in my first week of vacation so it was cold in the water, a friend guesstimated 14°C, but it was the only weekend this summer that this amount of my friends were available!

To see the process and the end result, watch the video below! Enjoy!

Renovating My Apartment

Thursday, March 27th, 2008

Last summer I began renovating my new apartment. My lovely parents helped me out, or else I would still be doing it.

During the process I had a laptop with an Xbox Live Vision camera connected that captured a frame every odd second or so. After a whole lot of editing I’ve managed to distill the >10GB worth of data, 143067 VGA frames, into a video displaying the actions causing the most visible differences over time.

I managed to not take any pictures with a normal camera, so I have nothing else to show of the final result, but I will be posting a few things about my living space sometime in the future.

By the way, I am not one of the guys installing the carpet, we just look very much alike in this video.

2007-07-21 - 2007-09-06

Furnishing: Table top hack

Wednesday, March 19th, 2008

My current apartment got a fairly narrow kitchen, so when I moved in I begun thinking of how to put a kitchen table in there, someplace to eat, without blocking off half the room. After throwing away many ideas I picked up a kitchen table top, six brackets, a set of mirrors and a series of spots from IKEA and a fiber board, wooden strips at the hardware store. To this I use three bar stools also from IKEA, and actually the wall clock and timer as well.

I started by getting the table top sawed in half. Something we had missed was that the table top had ridges on the underside, but we filled those with putty, and since we mounted everything I haven’t noticed them a single time. Me and my father prepared the top half by mounting the spots (required some drilling). We first attached a bracket to the corner, where it was screwed into the side wall as well. Then we fused a fiber board to the bottom half of the table top and mounted all that to the wall, resting on top of the bracket. More brackets were added.

The fiber board was required as the wall wasn’t entirely flat, and we needed a flat surface to put the mirrors on. We put the top half of the table top on top of the fiber board (lots of top there!), like a shelve with the brackets on the wrong side, and then screwed wooden strips to the fiber board before mounting the mirrors with double-sided wide adhesive tape. The description might make more sense if you check out the images below.

My eating area. A bit cramped, but it doesn’t get in the way.

Voilà!

I use the top shelve for electronics, like the microwave oven, receiver, old 5.1 system, toaster and radio. Some people that visit me thinks it’s really freaky if you meet their eyes in the mirrors instead of person to person when we eat, which can be fun… but it does indeed feel a bit weird!