loading

Archive for July, 2006

Alison

Okay, there are 4 pieces of Unreal script required to make everything work…
I want to:-

1. monitor which keys are pressed in unreal
2. make an object move based on the keypress
3. constantly be sending the positions of the players out via udp

okay, lets start with send the positions of the players out via udp.
a class is needed Ive called it “udptest”.

—————————————

class udptest extends UdpLink;

event prebeginplay()
{
local UdpLink.ipaddr dest;

Log(”ullo charlie”);
BindPort(9001, true);
StringToIpAddr(”192.168.2.8″, dest);
dest.port = 9000;

SendText(dest , “imtext”); //this is the first message to be sent via UDP
}

defaultproperties {}

—————————————

Then we need a mutator to actually do stuff… its called “watcher”

—————————————

class Watcher extends mutator;

var() int counter;
var UdpLink myudp;

event PreBeginPlay()
{
SetTimer(1.0,true);
myudp=Spawn(class’udptest’); //ensure the class we just made runs
}

function Timer()
{

local UdpLink.ipaddr dest;
local Controller C;

myudp.StringtoIpAddr(”192.168.2.8″,dest);
dest.port=9000;

for (C = Level.ControllerList; C != None; C = C.NextController)
{
if(C.Pawn != None) {
myudp.SendText(dest , “nextthree”);
myudp.SendText(dest , C.Pawn.Location.X);
myudp.SendText(dest , C.Pawn.Location.Y);
myudp.SendText(dest , C.Pawn.Location.Z);
}
}
}

DefaultProperties
{
FriendlyName=”Watcher”
Description=”I log the positions of the players every second and send this informaton to ip:192.168.2.8 , port:9000″
}

—————————————

Now then, monitoring keypresses… a mutator which starts an interaction, the mutator is called “keyinteract_mut”
note: I dont understand most of this code, I pretty much copied it off the wiki other than the bit that refrences keyinteract_inter, which is my final class

—————————————

class keyinteract_mut extends Mutator;

var bool bAffectSpectators; // If this is set to true, an interaction will be created for spectators
var bool bAffectPlayers; // If this is set to true, an interaction will be created for players
var bool bHasInteraction;

function PreBeginPlay()
{
Log(”key interact Mutator Started”);
}

simulated function Tick(float DeltaTime)
{
local PlayerController PC;

// If the player has an interaction already, exit function.
if (bHasInteraction)
Return;
PC = Level.GetLocalPlayerController();

// Run a check to see whether this mutator should create an interaction for the player
if ( PC != None && ((PC.PlayerReplicationInfo.bIsSpectator && bAffectSpectators) || (bAffectPlayers && !PC.PlayerReplicationInfo.bIsSpectator)) )
{
PC.Player.InteractionMaster.AddInteraction(”keyinteract_inter.keyinteract_inter”, PC.Player); // Create the interaction/ run my class
bHasInteraction = True; // Set the variable so this lot isn’t called again
}
}

DefaultProperties
{
FriendlyName=”interaction creator”
Description=”I do something that starts let interactions happen, apparently im needed if you want triggers to go off with key presses”
bAffectSpectators=false
bAffectPlayers=true
RemoteRole=ROLE_SimulatedProxy
bAlwaysRelevant=true
}

—————————————

and finally what to do with keypresses, a class called “keyinteract_inter”
note: for this I have a series of movers in my map waiting to certain triggers eg.
a mover with the tag “move1″ will activate (accordin to the code) when Numpad0 is pressed.

—————————————

Class keyinteract_inter extends Interaction;

Function Initialize()
{
Log(”Interaction Initialized”);

}

function bool KeyEvent(EInputKey Key, EInputAction Action, FLOAT Delta )
{

if ((Action == IST_Press) && (Key == IK_NumPad0))
{
ViewportOwner.Actor.TriggerEvent(’move1′,ViewportOwner.Actor,None);
}

if ((Action == IST_Press) && (Key == IK_NumPad1))
{
ViewportOwner.Actor.TriggerEvent(’move2′,ViewportOwner.Actor,None);
}

if ((Action == IST_Press) && (Key == IK_NumPad2))
{
ViewportOwner.Actor.TriggerEvent(’move3′,ViewportOwner.Actor,None);
}
if ((Action == IST_Press) && (Key == IK_Y))
{
ViewportOwner.Actor.TriggerEvent(’move35′,ViewportOwner.Actor,None);
}

if ((Action == IST_Press) && (Key == IK_Z))
{
ViewportOwner.Actor.TriggerEvent(’move36′,ViewportOwner.Actor,None);
}

return false;
}

DefaultProperties
{
bActive=True
}


—————————————

Chris OShea

Hacking an LED tile

Daniel Shiffman

Daniel Shiffman has been hacking a Color Kinetics LED tile and documenting the process.

By packet sniffing the data from Color Kinetics software to the tile enabled Daniel to figure out how it worked. He has now created a Processing library that reads the pixels of the display window, converts them to a 12×12 matrix, and writes them out as UDP packets to the data/power supply for the LEDs.

I imagine that the Color Kinetics software and hardware is closed source, so I hope that if they see this work they will encourage such use of their products.

Video 1, Video 2, Video 3 (requires latest Quicktime player). Photos on Flickr.

Related posts: Lightspace Corporation, DIY disco dancefloor, Kabarets Prophecy.

Chris OShea

How to build a (camera tracking) multi-touch

Jens Wunderling

Ok my last multi-touch post for a while. Jens Wunderling, a student of digital media class UDK Berlin, had also been creating a multi-touch surface for a community noticeboard project.

Jens began his project quite some time ago, but has had to put it on hold to complete other university work. The whole process has been documented on his blog, from buying the right cameras, hooking up the infrared LEDs and vision tracking software.

Whilst there are no examples of interaction techniques, the technology works and Jens has provided all Processing source code, Eyesweb and VVVV patches. If anyone else out there is working on multi-touch interaction, let me know.

Okay, there are 4 pieces of Unreal script required to make everything work…
I want to:-

1. monitor which keys are pressed in unreal
2. make an object move based on the keypress
3. constantly be sending the positions of the players out via udp

okay, lets start with send the positions of the players out via udp.
a class is needed Ive called it “udptest”.

—————————————

class udptest extends UdpLink;

event prebeginplay()
{
local UdpLink.ipaddr dest;

Log(”ullo charlie”);
BindPort(9001, true);
StringToIpAddr(”192.168.2.8″, dest);
dest.port = 9000;

SendText(dest , “imtext”); //this is the first message to be sent via UDP
}

defaultproperties {}

—————————————

Then we need a mutator to actually do stuff… its called “watcher”

—————————————

class Watcher extends mutator;

var() int counter;
var UdpLink myudp;

event PreBeginPlay()
{
SetTimer(1.0,true);
myudp=Spawn(class’udptest’); //ensure the class we just made runs
}

function Timer()
{

local UdpLink.ipaddr dest;
local Controller C;

myudp.StringtoIpAddr(”192.168.2.8″,dest);
dest.port=9000;

for (C = Level.ControllerList; C != None; C = C.NextController)
{
if(C.Pawn != None) {
myudp.SendText(dest , “nextthree”);
myudp.SendText(dest , C.Pawn.Location.X);
myudp.SendText(dest , C.Pawn.Location.Y);
myudp.SendText(dest , C.Pawn.Location.Z);
}
}
}

DefaultProperties
{
FriendlyName=”Watcher”
Description=”I log the positions of the players every second and send this informaton to ip:192.168.2.8 , port:9000″
}

—————————————

Now then, monitoring keypresses… a mutator which starts an interaction, the mutator is called “keyinteract_mut”
note: I dont understand most of this code, I pretty much copied it off the wiki other than the bit that refrences keyinteract_inter, which is my final class

—————————————

class keyinteract_mut extends Mutator;

var bool bAffectSpectators; // If this is set to true, an interaction will be created for spectators
var bool bAffectPlayers; // If this is set to true, an interaction will be created for players
var bool bHasInteraction;

function PreBeginPlay()
{
Log(”key interact Mutator Started”);
}

simulated function Tick(float DeltaTime)
{
local PlayerController PC;

// If the player has an interaction already, exit function.
if (bHasInteraction)
Return;
PC = Level.GetLocalPlayerController();

// Run a check to see whether this mutator should create an interaction for the player
if ( PC != None && ((PC.PlayerReplicationInfo.bIsSpectator && bAffectSpectators) || (bAffectPlayers && !PC.PlayerReplicationInfo.bIsSpectator)) )
{
PC.Player.InteractionMaster.AddInteraction(”keyinteract_inter.keyinteract_inter”, PC.Player); // Create the interaction/ run my class
bHasInteraction = True; // Set the variable so this lot isn’t called again
}
}

DefaultProperties
{
FriendlyName=”interaction creator”
Description=”I do something that starts let interactions happen, apparently im needed if you want triggers to go off with key presses”
bAffectSpectators=false
bAffectPlayers=true
RemoteRole=ROLE_SimulatedProxy
bAlwaysRelevant=true
}

—————————————

and finally what to do with keypresses, a class called “keyinteract_inter”
note: for this I have a series of movers in my map waiting to certain triggers eg.
a mover with the tag “move1″ will activate (accordin to the code) when Numpad0 is pressed.

—————————————

Class keyinteract_inter extends Interaction;

Function Initialize()
{
Log(”Interaction Initialized”);

}

function bool KeyEvent(EInputKey Key, EInputAction Action, FLOAT Delta )
{

if ((Action == IST_Press) && (Key == IK_NumPad0))
{
ViewportOwner.Actor.TriggerEvent(’move1′,ViewportOwner.Actor,None);
}

if ((Action == IST_Press) && (Key == IK_NumPad1))
{
ViewportOwner.Actor.TriggerEvent(’move2′,ViewportOwner.Actor,None);
}

if ((Action == IST_Press) && (Key == IK_NumPad2))
{
ViewportOwner.Actor.TriggerEvent(’move3′,ViewportOwner.Actor,None);
}
if ((Action == IST_Press) && (Key == IK_Y))
{
ViewportOwner.Actor.TriggerEvent(’move35′,ViewportOwner.Actor,None);
}

if ((Action == IST_Press) && (Key == IK_Z))
{
ViewportOwner.Actor.TriggerEvent(’move36′,ViewportOwner.Actor,None);
}

return false;
}

DefaultProperties
{
bActive=True
}


—————————————

Daniel

The Nature of Code, Hong Kong Edition!

The Nature of Code, Hong Kong Edition!

Originally uploaded by shiffman.

I’m a little jetlagged, but ready to go!

TomC

Merged Weblog and P5 Sketchbook

I’ve moved my blogs over to Wordpress, merged my Processing sketchbook with my regular weblog Random Etc. and dropped everything down to the homepage of www.tom-carden.co.uk for simplicity.

Your feed reader should pick up the changes automatically, and your browser should be redirected. I’ve done my best not to break any permalinks - fingers crossed!

If you’re only interested in my Processing stuff (previously TomC’s Processing Sketchbook) then you should stay subscribed to the Processing category feed, but you might want to switch to the full feed for more variety.

Please email me or add a comment if something you’re looking for is no longer working and I’ll do my best to fix it - thanks!

Next up, a customised less bloggy front page template, and more content…

watz

Websites as graphs

060708_websitesasgraphs.jpg

Websites as graphs: Code & Form HTML structure

A while back I blogged Websites as Graphs on Generator.x. It's a nice visualization of the structure of HTML documents. Since a well-formed HTML document has a logical hierarchy of tag containers, it is possible to visualize it as a strict graph. The results are both informative and beautiful, revealing the strategies used for structuring the document's content. It will also reveal whether the document holds up to that most essential of post-CSS web principles: A tableless design.

The original post by Sala shows some examples, and also provides a live applet that you can try out on your own site. Be sure to have a look at all the pictures tagged 'websitesasgraphs' on Flickr.

Sala has generously provided the Processing source code for the application. It requires the HTMLParser and Traer Physics libraries to run. HTMLParser is a standard Java library and hence does not come with instructions for Processing. According to the project home page, all you should need to do is download the latest version of the library, and then copy the file htmlparser.jar from the /lib folder to your sketch's "code" folder. I haven't tested this, so if you find otherwise let me know.

wnugroho

Floating Boxes / OpenGL Powered

More images…

wnugroho

Poster 4 USDI @ ITB OpenHouse 2006

Download PDF [size A0]:

Poster 1 [308kb]
Poster 2 [204kb]
Poster 3 [300kb]
Poster 4 [212kb]

blog.blprnt.com - Processing

It came from the 10th dimension!

If you're looking for some Friday afternoon mind-expansion, look no further than this site, Imagining the Tenth Dimension.

In string theory, physicists tell us that the subatomic particles that make up our universe are created within ten spatial dimensions (plus an eleventh dimension of "time") by the vibrations of exquisitely small "superstrings". The average person has barely gotten used to the idea of there being four dimensions: how can we possibly imagine the tenth? 

Pretty heavy stuff. To help us imagine this very abstract concept, there is a neat-o flash narration which walks you through the progression from a line in the first dimenstion to a point in the tenth. 

toxi

“I am a consciousness, a strange creature which resides nowhere and can be everywhere present in intention.”

Ever since I started working with computers I’ve developed a somewhat latent, yet nevertheless recurrent interest in philosophy and psychology. I always found asking questions (and reading them) about the nature of the mind most inspiring and helpful creatively, as well as for finding and questioning my own personal way(s). For the past few weeks I’ve been feeling the need to satisfy my appetite once more and finally got hold again of a book which I simply had to put down after the first few pages when studying Philosophy at A-levels, some 14 years ago.

The book is “Phenomenology of Perception” by Maurice Merleau-Ponty. Written in 1945, it starts with an incredibly dense cross-examination of the definitions and supposed acts of perception, the role of reflection, as seen by different schools of philosophy — before developing a radical definition of perception around the “embodied mind”, by using (amongst others) studies of brain damaged survivors of WW1 (which did remind me of similar experiences reported in Oliver Sacks‘ books).

In any way, I’m still only near the beginning and this is not a review of the book (due to lack of qualifications), but I did already find some very inspiring quotes, which also do prove the fact the text is still timely and relevant today.

Even though the below quote is slightly taken out of context (from a much wider definition of “data”), yet I think there’s some truth in there in respect to developments in information/data visualization:

“It would follow… the mind runs over isolated impressions and gradually discovers the meaning of the whole as the scientist discovers the unknown factors in virtue of the data of the problem. Now here the data of the problem are not prior to its solution, and perception is just the act which creates at a stroke, along with the cluster of data, the meaning which unites them — indeed which not only discovers the meaning which they have, but moreover sees to it that they have a meaning.” (p. 42, not my emphasis)

I find that last statement certainly fitting for some of my own work and also to art in general. We can create anything and our minds will always find ways to project some meaning onto (into?) it… We construct meaning, and not “aquire” it from data directly.

Here’re some more of his thoughts for your perusal:

“Pure sensation, defined as the action of stimuli on our body, is the ‘last effect’ of knowledge, particularly of scientific knowledge, and it is an illusion (a not unnatural one, moreover) that causes us to put it at the beginning and to believe that it precedes knowledge. It is the necessary, and necessarily misleading way in which a mind see its own history.” (p.43)

“[But] in reality I would not know that I possess a true idea if my memory did not enable me to relate what is now evident with what was evident a moment ago, and, through the medium of words, correlate my evidence with that of others[…] For never, as Descartes and Pascal realized, can I at one stroke coincide with the pure thought which constitutes even a simple idea. My clear and distinct thought always uses thoughts already formulated by myself or others, and relies on my memory, that is, on the nature of my mind, or else on the memory of the community of thinkers, that is, upon the objective mind. To take for granted that we have a true idea is to believe in uncritical perception.” (p.46)

“I am a consciousness, a strange creature which resides nowhere and can be everywhere present in intention.”

Ever since I started working with computers I’ve developed a somewhat latent, yet nevertheless recurrent interest in philosophy and psychology. I always found asking questions (and reading them) about the nature of the mind most inspiring and helpful creatively, as well as for finding and questioning my own personal way(s). For the past few weeks I’ve been feeling the need to satisfy my appetite once more and finally got hold again of a book which I simply had to put down after the first few pages when studying Philosophy at A-levels, some 14 years ago.

The book is “Phenomenology of Perception” by Maurice Merleau-Ponty. Written in 1945, it starts with an incredibly dense cross-examination of the definitions and supposed acts of perception, the role of reflection, as seen by different schools of philosophy — before developing a radical definition of perception around the “embodied mind”, by using (amongst others) studies of brain damaged survivors of WW1 (which did remind me of similar experiences reported in Oliver Sacks‘ books).

In any way, I’m still only near the beginning and this is not a review of the book (due to lack of qualifications), but I did already find some very inspiring quotes, which also do prove the fact the text is still timely and relevant today.

Even though the below quote is slightly taken out of context (from a much wider definition of “data”), yet I think there’s some truth in there in respect to developments in information/data visualization:

“It would follow… the mind runs over isolated impressions and gradually discovers the meaning of the whole as the scientist discovers the unknown factors in virtue of the data of the problem. Now here the data of the problem are not prior to its solution, and perception is just the act which creates at a stroke, along with the cluster of data, the meaning which unites them — indeed which not only discovers the meaning which they have, but moreover sees to it that they have a meaning.” (p. 42, not my emphasis)

I find that last statement certainly fitting for some of my own work and also to art in general. We can create anything and our minds will always find ways to project some meaning onto (into?) it… We construct meaning, and not “aquire” it from data directly.

Here’re some more of his thoughts for your perusal:

“Pure sensation, defined as the action of stimuli on our body, is the ‘last effect’ of knowledge, particularly of scientific knowledge, and it is an illusion (a not unnatural one, moreover) that causes us to put it at the beginning and to believe that it precedes knowledge. It is the necessary, and necessarily misleading way in which a mind see its own history.” (p.43)

“[But] in reality I would not know that I possess a true idea if my memory did not enable me to relate what is now evident with what was evident a moment ago, and, through the medium of words, correlate my evidence with that of others[…] For never, as Descartes and Pascal realized, can I at one stroke coincide with the pure thought which constitutes even a simple idea. My clear and distinct thought always uses thoughts already formulated by myself or others, and relies on my memory, that is, on the nature of my mind, or else on the memory of the community of thinkers, that is, upon the objective mind. To take for granted that we have a true idea is to believe in uncritical perception.” (p.46)

thinking on digital tools

Today in my inbox

This Spammail. I instantly fell in love with the font. Does someone know the name of this font?

thinking on digital tools

On the fly screenshot tool: captrect

Caprect quickly

Finally I found a tool to very quickly make screenshots on windows machines. It is from a japaneese programmer (Keim?), that’s why I unfortunatelly don’t know his name and only have this beautiful question marks on screen. But nevertheless: this app is that easy to handle, that even my grandma could use it (if she would use email as well).

- start the app
- select your rect (with a fancy zoom feature)
- store it, just store it at your fav place. one click for bmp, png, jpg or clipboard.

Caprect:
Go Japaneese or English.