Saturday, August 16, 2008

New Adventure in New Zealand

sorry, just for italians ;)
Ehi!!!! beh, dopo un po di problemi (alcuni ancora da risolvere) riesco a scrivere nuovamente sul blog... ma stavolta a testa in giu!
Mi trovo a Wellington, per questa esperienza di un anno in Weta come Scientific Coder... che parolona... ma chi e' uno scientific coder?!?! non lo so... quando lo capiro' ve lo diro, promesso!
qui e' tutto abbastanza diverso da come ho vissuto finora, nel senso che si potrebbe definire una capitale ma non c'e' caos, non c'e' disordine...sembra tutto molto pacato. Poce persone, abbastanza gentili tutti... ma sembra una citta' pronta ed organizzata al meglio per ospitare milioni di persone!
ci sono piu ristoranti di quanti la popolazione possa riempirne... piu spazio di quanto la popolazione possa occuparne... piu strade di quante le macchine posso riempirne... piu grattacieli di quanti i lavoratori possano riempirne.
beh, si sta bene, decisamente, per chi ama la vita tranquilla. anche se... dopo piu di una settimana, conoscendo gli "italiani locali" (altri wetani immigrati in NZ) abbiamo scoperto alcuni localetti niente male e strano ma vero... pieni di gente ubriaca!!
devo dirlo, dentro questi locali sembrava di stare a Londra... ma nei giorni precedenti ci eravamo abbastanza demoralizzati, anche perche' forse ci aspettavamo un po londra (non proprio lo stesso casino, ma diciamo una Nettuno in estate).
poi, piano piano, realizzando che effettivamente qui e' inverno adesso, ci siamo un po rassegnati alla situazione... poi, grazie ancora a maruzzella e marco, abbiamo scovato la vita notturna di wellington! :)
aaahhhh..... dopo una giornata di lavoro, trovare un localetto con musica, gente che balla ubriaca, birra e amici, ci sta tutto! :)
ah, in tutto questo una bella gallery su picasa, nuova nuova, ci stava tutta, e piano piano la stiamo riempiendo. http://picasaweb.google.com/jelena.slider
ma parliamo del lavoro... sono emozionato, devo dirlo! poi una volta entrato e come aver conosciuto brad pitt e vedere che la mattina anche lui corre in bagno per aver mangiato troppo la sera e lo trovi a spremersi brufoli davanti allo specchio ;)
il mio desk da coder sta in mezzo ai compositor... immagino non ci siano altri posti, ma i compositor sono simpatici, l'unico problema e' che stanno al buio!!!!!!!! argh!
io devo vedere la tastiera... a loro basta la tavoletta grafica e una manina sulla tastiera per premere ognitanto F1, F2 o altri tastini a caso ;)
cmq, e' mooolto fico il tutto.
dovevo completare un programmino per luca... ok, luca, non l'ho completato ancora ma sta ad un ottimo punto, come hai letto dalla mail :P
questa settimana abbiamo avuto molti grattacapo per trovare casa.
l'avevamo trovata, poi abbiamo scoperto che sara' disponibile solo dal 21 settembre, quindi abbiamo visto altre case, pero' nessuna come quella..e quindi alla fine la decisione e' aspettiamo il 21 settembre e nel frattempo ci buttiamo un lodge dove troviamo spero un appartamentino a 100dollari al giorno.
pero', la futura casa li vale tutti!! :)

vabbeh, per adesso stacco... un salutone a tutti a testa in giu :)

Saturday, May 31, 2008

CityGenerator v0.80601 for XSI 6.02 (32bit)

This new version needs no more installation step, just execute the citygenerator_interface.js from your XSI editor.
Take a look at the new video and some screenshots.






NOTE: after unit creation, remember to change the BMP file with a render fo your view. I'm working to make it automatically. Maybe on the next release.

Download from here.

Friday, May 23, 2008

CityGenerator v0.80523 for XSI 6.02(download)

UPDATE (IMPORTANT): to install, put the folder into your Softimage-User folder, usually is something like "C:\users\username\Softimage\SoftimageVersion\"
Here there are others folders like Applications and Plugins.
Final folder for the installation has to be:
"C:\users\username\Softimage\SoftimageVersion\builder"
where "builder" contains all the CityGenerator files and folders


Finally, a downloadable version for XSI 6.02
This is a very rough version. So, sorry about any bugs ;)
http://www.paoloemilioselva.it/blogimgs/mydownloads/citygenerator_v0.80523.zip

Wednesday, May 21, 2008

City Generator (blobDetection + buildings_generator)

Finally, I mixed my two plugins to create this CityGenerator in XSI: by a blob detection on a map (plus an elevation map in b&w) it's possible to create the layout for the buildings and with my buildings_generator it's possible to create any kind of building using a library of "units" (a unit is the smaller part of a building) or creating from scratch.
Take a look at this video.
http://www.paoloemilioselva.it/blogimgs/mycodes/citygenerator.mov

soon a downloadable version and a version also for Maya and 3dsmax.

Tuesday, May 13, 2008

blob detection in XSI with C++ and JScript - UPDATE

UPDATE VIDEO: http://www.paoloemilioselva.it/blogimgs/mycodes/detection2.mov

Ok, I changed the core of this plugin.
All the detection now is done with C++ (a custom command to detect blobs from an image) and the interface to use it is done in JScript in XSI.
Take a look at this video
http://www.paoloemilioselva.it/blogimgs/mycodes/detection.mov

this is the first step to locate buildings directly from a google map (blob detection, edge, some filter to correct and clean image, etc, etc) or just a simple motion capture into XSI or what ever you want with a plugin like this. :)

enjoy

Friday, May 9, 2008

blobDetection in XSI with JScript

A tool to detect a color in an image directly into XSI with JScript.
I want to use this to locate buildings on a map (a googlemap maybe).

enjoy

http://www.paoloemilioselva.it/blogimgs/mycodes/blobdetection.mov

Thursday, May 8, 2008

Tuesday, April 15, 2008

modelling wip - Keira

Saturday, March 29, 2008

Friday, March 28, 2008

How to make your own motion-capture-video in Maya

What we are about to do is: create a jmyron blob detection, sending data with oscP5 to a server (localhost or other IP address), reading these data with my sliBase plugin to move object in realtime into Maya.
To make it easy, we are about to create an home-made low-cost motion-capture-video system for Maya.
Take a look at this video
http://www.youtube.com/watch?v=GtxATrZCIYg
I used my motion-capture-video I developed in Java but you can do the same think using JMyron, oscP5 and Processing.

Go to www.processing.org

  • download Processing for your operating system
  • install processing
  • try to load an example to see if it works
Go to http://webcamxtra.sourceforge.net/
  • download the library for Procesing
  • install it following the instructions
  • if your are running Processing on a mac-intel you have to change a file
    • download and replace libJMyron.jnilib
Go to http://www.sojamo.de/libraries/oscP5/
  • download the library
  • install it
Open Processing.
Go to examples and try to load JMyron_simpleCamera to check it it works
if you see your webcam-video all it's ok! good! ^_^
otherwise, mail me what happens... ;)
Create a new project in Processing and save as "oscP5sendReceive" and copy this example:

/**
* oscP5sendreceive by andreas schlegel
* example shows how to send and receive osc messages.
* oscP5 website at http://www.sojamo.de/oscP5
*/

import oscP5.*;
import netP5.*;

OscP5 oscP5;
NetAddress myRemoteLocation;

void setup() {
size(400,400);
frameRate(25);
/* start oscP5, listening for incoming messages at port 12000 */
oscP5 = new OscP5(this,12000);

/* myRemoteLocation is a NetAddress. a NetAddress takes 2 parameters,
* an ip address and a port number. myRemoteLocation is used as parameter in
* oscP5.send() when sending osc packets to another computer, device,
* application. usage see below. for testing purposes the listening port
* and the port of the remote location address are the same, hence you will
* send messages back to this sketch.
*/
myRemoteLocation = new NetAddress("127.0.0.1",12000);
}


void draw() {
background(0);
}

void mousePressed() {
/* in the following different ways of creating osc messages are shown by example */
OscMessage myMessage = new OscMessage("/test");

myMessage.add(123); /* add an int to the osc message */

/* send the message */
oscP5.send(myMessage, myRemoteLocation);
}


/* incoming osc message are forwarded to the oscEvent method. */
void oscEvent(OscMessage theOscMessage) {
/* print the address pattern and the typetag of the received OscMessage */
print("### received an osc message.");
print(" addrpattern: "+theOscMessage.addrPattern());
println(" typetag: "+theOscMessage.typetag());
}


Execute it and when you click on the black window you can see the received message into the output-console in the Processing window.
Now, close Processing.
Go to http://slidertime.blogspot.com/search/label/_my%20downloads
  • download my latest sliBase plugin for maya (only for Windows)
  • install it
This plugin is only for Windows, but you can capture data from a macosx and send to windows through ethernet using oscP5 in Processing.

This is the system I have used for this tutorial:
Motion capture video system:
Macbook1,1 Intel black 2GB ram, 2GHz CPU with Leopard and integrated iSight
Processing 0135 BETA for MacOSX
JMyron 0025 for Processing
modded libJMyron.jnilib for mac-intel
oscP5 0.9.3 for Processing
Java version 1.5.0_13 (preinstalled in Leopard, you don't need to install)


Maya receiver videodata system:
Alienware Aurora M77 with 2GB ram, AMD X2 2GHz, Geforce Go 7900GTX with WindowsXP Home edition
Maya 8.5
sliBase plugin


Now connect your two machine with a network cable or a wifi or ensure that are both into the same LAN with the same IP address with the last number changed.
I've used a network cable (not crossed, if you don't have it. actually the net-card can exchange RX and TX automatically).
macbook with 192.168.0.1 and alienware with 192.168.0.2

Then, open Processing and reopen oscP5sendReceive example.

make these changes

BEFORE
myRemoteLocation = new NetAddress("127.0.0.1",12000);
AFTER
myRemoteLocation = new NetAddress("192.168.0.2",57110);

BEFORE
OscMessage myMessage = new OscMessage("/test");
AFTER
OscMessage myMessage = new OscMessage("/slibase");

BEFORE
myMessage.add(123); /* add an int to the osc message */
AFTER
myMessage.add(mouseX + " " + mouseY);

Now, run it.
Open maya, execute sliBase and open the script for OSC, as read on the instructions
Start it.
Try to move mouse on the black window in Processing and take a look in Maya, you can see something received into sliBase plugin.
If you can see your mouse coords changing into sliBase, it's all ok! ^_^ good!!!!
otherwise, mail me..... ;)

REMEMBER to run FIRST Processing, THEN start sliBase in Maya, THEN stop sliBase and THEN close Processing!!

Now, oscP5 works, JMyron works, sliBase works... we have to mix them!

Open Processing and create a new project and save it as "sliBaseJMyronOscP5"
and copy the following code:

import oscP5.*;
import netP5.*;
import JMyron.*;

JMyron m;
OscP5 oscP5;
NetAddress myRemoteLocation;

void setup() {
int w = 320;
int h = 240;
size(w,h);
m = new JMyron();
m.start(w,h);
m.findGlobs(1);
frameRate(25);
oscP5 = new OscP5(this,57110);
myRemoteLocation = new NetAddress("192.168.0.2",57110);
ellipseMode(CENTER);
}

void draw() {
m.trackColor(255,255,255,255);
m.update();
int[] img = m.image();
loadPixels();
for(int v = 0; v < width*height; v++)
pixels[v] = img[v];
updatePixels();

int[][] a;

a = m.globCenters();
if (a.length >= 2) { // send just first 2 blob
int[] b1 = a[0];
int[] b2 = a[1];
ellipse(b1[0],b1[1],10,10);
ellipse(b2[0],b2[1],10,10);
OscMessage myMessage = new OscMessage("/slibase");
myMessage.add(b1[0]+" "+b1[1]+" "+b2[0]+" "+b2[1]);
oscP5.send(myMessage, myRemoteLocation);
} else { // I need this because my sliBase crash if doesn't receive data from OSC
OscMessage myMessage = new OscMessage("/slibase");
myMessage.add("0 0 0 0");
oscP5.send(myMessage, myRemoteLocation);
}

}

public void stop(){
m.stop();
super.stop();
}




Now, run it.
Open Maya and launch the plugin and the OSC-MEL script.
You should see into the message four zeros.
Take 2 white little pieces of paper and try to show to your webcam.
You should see two little circles in Processing and the centers of these circles into the sliBase.
Now all is done.
Assign these values to any object attributes in Maya using sliBase and look what happens... :)

enjoy!



Wednesday, February 27, 2008

WOW!!!!!!!

I think the image needs no comments! :)

Sunday, February 10, 2008

sliBase - v0.2 (with OSC plugin)

In this version I added the OSC (OpenSoundControl) functions to read data from OSC port/address. It requires WinXP and Maya 8.5.
What is possible to do with this plugin?
Take a look at the following video.


Do you want to try this? Ok, firt of all, you need:

  • a wiimote controller (without the console, just the controller)
  • a tool to read data from wiimote and send it in local (or network) usign OSC protocol (I've used GlovePIE for WindowsXP)

How to use it:
  • connect your wiimote to windows by your bluetooth manager application
  • open GlovePIE and use this script:
if (wiimote1.Up = true) var.z = var.z + 1; if (wiimote1.Down = true) var.z = var.z - 1; var.x = var.x + wiimote1.RawAccX; var.y = var.y + wiimote1.RawAccZ; sendOsc("localhost",57110,"/slibase",wiimote1.RawAccX + " " + wiimote1.RawAccZ + " " + var.z + " " + var.x + " " + var.y)

  • click on RUN in GlovePIE
now your wiimote is connected to your pc and it's sending data to your localhost using OSC protocol
  • download sliBase_v0.2
  • extract it on your Desktop (or wherever you want)
  • open Maya 8.5
  • go to Plugin Manager and browse to find sliBase.mll plugin into sliBase_v0.2 folder on your Desktop
  • open the example scene maya_navigation02.mb in the sliBase_v0.2 folder
  • drag&drop the sliBase_getOSC_window.mel into maya
  • click START into the "sliBase - get data from OSC" window and you can see the string data from wiimote
  • put a "space" character in the "separator" textfield and click outside this textfield to update and you can see the data splitted into all tokens
  • now use the following setting:
  • then click on all the CONNECT BUTTONs with the "attribute name" value not null
  • now, move your wiimote to move the "camera1" object into the maya scene in realtime

this is only one example, you can try it usign an audio device or a webcam or something else which communicates with your pc throughthe OSC protocol.

Contact me if you have problem: paoloemilioselva AT gmail.com

Thursday, January 17, 2008

And now.....30

Happy birthday to meeeeeee....happy birthday to meeeeeee! :)

ok, sono passati 30 anni da quando una donna di origini siciliane diede alla luce in quel di Roma un bimbo bellissimo!!!!
c'erano tutti intorno... parenti, amici, pastori, il bue e l'asinello... poi, dopo qualche giorno, arrivano tre strani tipi con dei doni....ehm....no...credo che questa sia un'altra storia....parliamo della mia nascita e del mio compleanno...che è meglio ;)

magari domani...che adesso è tardi ;)