Here’s to the crazy ones
Oct 06
Uncategorized Comments Off
Seeking The Next Cool Thing
Jul 19
Uncategorized Comments Off
I’ve been waiting to get a chance to play with Ponoko’s manufacturing site for some time now. Just before my summer holidays, I finally found a perfect excuse to give it a go – I’d wanted to have a monitor hood to take out some of the reflections on my display that came through the windows. Now, granted, practicality was only a concern for the project.
It didn’t take long to create Illustrator files to be laser cut in Italy and be shipped at home. Assembly was easy as well, given proper glue and well cut parts. There were also a few mishaps – a glossy acrylic looks really fine, but it’s not optimal for this particular purpose of reducing glossiness. Also, the material was quite expensive compared to, for example, cardboard.
However, it looks rather nice and I plan to give it a spray paint coat to make it matter.
I hope to add the plans for this to my Ponoko Showroom once I finalize the setup and create assembly instructions.
Aug 25
Uncategorized Comments Off
I was tasked with a problem of making particles near camera much larger than those away from the camera. As it turns out, my current employer does have Maya licenses available, and thus was able to do a quick simulation with MEL. Results:
As can be seen from the image, particles that are far away are small and those that hover around the camera are large – just as was wanted. They form sort of a 3D bubble around the camera.
Since the problem itself is not a secret, unique, or even very hard to solve, here’s a MEL script that did the trick. Note that you likely need to adjust a parameter or two to get it just right for yourself.
# Camera-Relative Particle Sizing
#
# Use any way you wish, but do not modify, remove
# or replace this license from the source code.
#
# Janne Kaasalainen
# 25.8. 2010
// Procedure for particle (per particle) size
global proc float distanceDriver( vector $aPosition ) {
vector $camera=`getAttr camera1.translate`;
vector $result=$camera-$aPosition;
$multiplier = 5;
$minSize = 0.1;
$maxSize = 8;
$result2 = pow( $multiplier/mag($result), 2);
if ( $result2 < $minSize ) $result2 = $minSize;
if ( $result2 > $maxSize ) $result2 = $maxSize;
return $result2;
}
// Runtime before dynamics and upon creation
particleShape1.spriteScaleXPP = distanceDriver( position );
particleShape1.spriteScaleYPP = distanceDriver( position );
And this is how it looks like:
Jul 21
Uncategorized Comments Off
Ever watched shows like Top Gear where at times a camera gets zoomed in to change a perspective as if a car would get sucked into the camera because of the speed? The effect is quite an easy to duplicate with animation software by changing focal length of a camera, but a common problem is that as the focal length gets changed, the object seems to shrink or expand as the camera stays still. Way around this is to move the camera forward or backward in relation to the changed focal length.
Turns out that this is terribly easy, at least with Autodesk Maya which I was able to use for a brief moment once again. So here you have a little script to do just that. It’s not a usability marvel, so remember to keyframe the required camera parameters manually or attach the Python function to an animatable attribute.
# L-System Generator # # Use any way you wish, but do not modify, remove # or replace this license from the source code. # # Janne Kaasalainen # 21.7. 2010 import maya.cmds as cmds def changeFocalLength( cameraName, newFocalLength ): focalLength = cmds.camera(cameraName, q=True, fl=True) coiq = cmds.camera(cameraName, q=True, coi=True) dolly = coiq * newFocalLength/focalLength focalLength = cmds.camera(cameraName, e=True, fl=newFocalLength) cmds.dolly(cameraName, abs=True, d=dolly)# Example usage changeFocalLength( 'persp', 150 )
Apr 05
Uncategorized Comments Off
Inspired by Coldplay, I came to think about Lego bricks and how some of our innocent games can have violent undertones.
Click for 1920×1200 pixel wallpaper image.
I’m liking Nevercenter Silo quite a bit, even if I do have some concerns about the longevity and future development of the software. As of now, there are still plenty of bugs, oddities and features at least I’d like to see in it, but it is a nice tool for simple things.
Apr 05
Uncategorized Comments Off
I previously wrote a little uninspiring post about L-systems and how to generate one in Python. To illustrate their use, I took an existing system from Wikipedia and used that to develop and verify that my visualizations would work correctly. So, here is an image that is done based on the post I made earlier and new code that takes the output of the L-system generator and creates curves to render it our on Maya.
And here’s the code, but please note that the blog may do horrible things to it. One could do additional tricks to create leaves by other L-systems, for example.
# L-System Generator
#
# Use any way you wish, but do not modify, remove
# or replace this license from the source code.
#
# Janne Kaasalainen
# 5.4. 2010
import maya.cmds as cmds
import math as math
class LSystem:
ruleDictionary = {}
def __init__(self):
self.ruleDictionary = {}
def setBase( self, aBase ):
self.systemBase = aBase
def addRule( self, aReplace, aWith ):
# Add the rule to tule array
self.ruleDictionary[ aReplace ] = aWith
def iterate( self, aBase, aIterations ):
if aIterations > 0:
replaced = ""
for i in aBase:
replaced = replaced + self.ruleDictionary.get(i,i)
aBase = replaced
return self.iterate( aBase, aIterations-1 )
else:
return aBase
class Point3D():
def __init__(self, field1, field2, field3):
self.x = field1
self.y = field2
self.z = field3
def drawLine( aStartPoint, aEndPoint ):
cmds.curve( d=1, p=[(aStartPoint.x, aStartPoint.y, aStartPoint.z),(aEndPoint.x, aEndPoint.y, aEndPoint.z)] )
return
def calculateVector( aLength, aRotation ):
radians = math.pi * aRotation / 180
return Point3D( math.sin(radians), math.cos(radians), 0.0 )
def visualizeLSystem( aString ):
inputString = aString
index = 0 # Where at the input string we start from
angle = 0 # Degrees, nor radians
turn = 25 # How much we turn
length = 1.0 # Unit length of an advancement
currentPoint = Point3D( 0.0, 0.0, 0.0 ) # Start from origo
coordinateStack = [] # Stack where to store coordinates
angleStack = [] # Stack to store angles
while ( index < len( inputString ) ):
if inputString[index] == 'F':
vector = calculateVector( length, angle )
newPoint = Point3D( currentPoint.x + vector.x, currentPoint.y + vector.y, currentPoint.z + vector.z )
drawLine( currentPoint, newPoint )
currentPoint = newPoint
elif inputString[index] == '-':
angle = angle - turn
elif inputString[index] == '+':
angle = angle + turn
elif inputString[index] == '[':
coordinateStack.append( currentPoint )
angleStack.append( angle )
elif inputString[index] == ']':
currentPoint = coordinateStack.pop()
angle = angleStack.pop()
else:
print inputString[index] + ": ignored"
# Move to the next drawing directive
index = index + 1
return
### Example Usage ###
system = LSystem()
system.addRule( "X", "F-[[X]+X]+F[+FX]-X" )
system.addRule( "F", "FF" )
iterations = 2
axiom = "X"
visualizeLSystem( system.iterate( axiom, iterations ) )
Mar 11
Uncategorized Comments Off
I have random and at times rare access to 3D rendering software these days as I am no longer a student at TAIK. But when I do find a chance, it’s nice to do something nice and at times practical. Here’s a little poster template I made for the kicks of it. Modeled in Nevercenter Silo.
Feb 28
Uncategorized Comments Off
I’ve not played much with electronics, but it has fascinated me for a long time. After high-school I even wanted to study electronics and how to build gadgets and went to study electronics and telecommunications engineering at Helsinki University of Technology. It turned out not to be my thing, but the curiosity has always been there.
In the recent years, prototyping and playing with programmable microcontrollers has become a lot easier. I ran into Arduino at Ars Electronica ‘06 while we at Media Lab (University of Art and Design Helsinki) used Basic Stamp and MAX/MSP at the time. With some exposure to it, I got a board of my own late 2009 to start hacking.
But what, if anything, does this to do with experience and interaction design? Well, quite a bit. While a large part of interaction design work seems to be done for the Web, I personally think there is a much broader category of life we should be looking into. I have done extensive work on mobile context, which takes data and digital interaction to the streets. But even that is only the beginning. We start to have the technology and tools to create parts of what has long been discussed regarding ubiquitous computing. One doesn’t need expensive laboratories anymore, and that is why electronics and Arduino and its kin are relevant for us designers.
To start small and simple I came up with a project of automating ambient lights for my computer desk. Idea is that when you come to a room and sit down in the front of the computer, a dim light fades in so one needs not to be in complete darkness. As I do use Photoshop quite a bit, I don’t always want to have all the lights to be on to better work with the colors. After all, while I do have a neutral grey room and curtains to lock out the light, one does need to actually sit in that dark cave and not go mad. While this does sound very simple, there are some factors that complicate this. For one, the lights should not come on if there is already enough light from the windows or from the ceiling lamps. Its good to be green and save from electricity bill. Second, I don’t want to operate switches, this needs to be fully automatic. So the system needs to understand the surroundings enough to make the right calls. Finally, it does need to shut itself down when I leave the desk.
Programming side of this is very simple and I’ll not bother with the details of it. Sufficient to say it should not take more than a few hours even if one needs to google every API call for Arduino. But, to document the electronics side here is the circuit connection diagram that I used for this (click for larger version):
The above diagram looks much more clean than the prototyping connections in physical world. I chose to use a transistor instead of MOSFET for the simple reason that I had two transistors and only one MOSFET and wanted to have more varying components in the future to play with.
Here is the same thing in an enclosure:
To give a bit more realism to the scenario, here is a comparison shot that shows how the system works in real environment. At the moment I do need to wave my hand to turn it on, but I expect to install this later on so that detecting presence will not require user input. It’s worth noting that by design the light is subtle and the image is very much over exposed here to highlight the effect.
Since I am a designer, it was not quite enough to have the light turn on and off. Such would definitely be workable solution, but with a little bit of extra effort, I also made the light to dim on and off plus have a selectable brightness so that it does not need to be fully on if the light is too bright for one’s needs.
All this needs now is some packaging to make the wire-mess pretty and to be installed under the desk neatly to be out of sight. It’s not just that it works, but the solution does need to be pretty too. But more importantly, this is an example how one can create a simple tangible system try out how it feels and if an idea is good after all.