Archive for April 2009

Combined RenderSan and monthly CG/Film/Game/HCI party

Keep your calendars open for 20th May 7pm
You may know I run a bunch of events for people in our field every 5-8 weeks in Tokyo. I will be combining 2 of them on the same day for next month.

RenderSan: the RenderMan user community of Japan (
RenderMan
is a registered trademark of Pixar)

and

Bernies monthly Tokyo film/CG/Game/(etc) makers dinner.
(I gotta get a name for that).
see examples: here here and here

The way I will work it is we will do the ultra geeky RenderSan session at 7pm. For those of you who just want to mingle and don't want to listen to RenderMan related things can attend the post RenderSan dinner at 9pm.
Like always I have special guests from overseas lined up one is from Pixar (no not last weeks GOD of RenderMan Tony) but someone who may have some Pixar goodies to share. The second guest is a wonderful Brit post genius (Apple silhouette CM) who survived Hollywood.
I am organizing the venue now. Those on my mailing list should receive an email within the week, if you are not on my mailing list you better get in touch.
Why am I doing it this way? So the 3d and post/CM people can meet new faces.

Trawlers

Been up the last 26 hours studying trawling boats, winches, what part of the mast ropes are fastened to (blah blah). Its funny being an animator you sometimes have to learn the weirdest stuff, how it moves looks etc.
Going over videos of some guys on the high seas with waves bigger than houses - man are they off their nut! I am gonna appreciate the next piece of sushi.
The current shot I have is of a trawling boat, so when I do the shot I want it to be slightly believable. Of course I'm gonna break the visual rules (hey its animation) but its good to know what rules I am breaking.

simple Japanese text fixes using python

I promised a mate Philip I would put this one up on the web, so I will try and make the code as painless as possible, sans pipes unixy stuff etc.
If you have ever handled Japanese text you may know that there are more than a few ways to interpret the code. One of my favorite ways to convert text is using python.
The following is a really simple way to convert from one bytecode to another, trust me there are a million ways to do this and you can easily adapt it to your server side web scripts or even add a nice gui. The main code is only one line the rest is just file IO.
Lets say I want to send out mail in iso-2022-jp format (one that most keitai seems to be able to read) and I have written the text on (god forbid) winblows and have copied it to my tmp dir as "source.tmp". well usually winblows will use shift-jis.
So the source is shift-jis and target is in iso-2022-jp.
open a command prompt (here I am using mac)
vi ./myprogname.py

#!/usr/bin/python
# open the files
In = open ( '/tmp/source.tmp' )
Out = open ( '/tmp/target.tmp', 'w' )
# do our stuff this should
Out.write(unicode(In.read(), 'shift-jis').encode('iso-2022-jp'))
# close the files
In.close()
Out.close()

then make the file executable:
chmod +x ./myprogname.py
run the bugger:
./myprogname.py
it should spit out the code to the file "target.tmp"

lets do the same for utf-8 to shift-jis (say mac to winblows)
same deal just different encodings:
#!/usr/bin/python
# open the files
In = open ( '/tmp/source.tmp' )
Out = open ( '/tmp/target.tmp', 'w' )
# do our stuff
Out.write(unicode(In.read(), 'utf-8').encode('shift-jis'))
# close the files
In.close()
Out.close()


I do recommend trying a few and mail them to different machines and phones so you can see what is happening. You can drop the file in a browser and choose the encodings to see whats happening.
And yes it does work for other languages, give it a go!

spring in Japan

After the cherry blossoms Japan becomes a flower paradise. It was a drizzly day yesterday working from home and I drove just up my street to the Post Office. I had to stop and take these pics.







night out in a treehouse

Spent a night out with Tomonori (interactive artist) and Alex the famous iPod sillhouette CM creator.



The place is called Hideaway it's in Harajuku! Alex chose such a cool spot.

php fclose and godaddy

I had some problems yonks ago with godaddy and fopen/close
I should have blogged about it then so I hope its still relevant:
lets say we want to source our website:

$website = "http://contact.nexusinternational.jp";

// The following fopen() to fclose() is restricted by godaddy, no problem
require 'HTTP/Request.php';
$r = new HTTP_Request($website);
$r->sendRequest();
$page = $r->getResponseBody();

$c = curl_init($website);
curl_setopt($c, CURLOPT_RETURNTRANSFER, 1);
$page = curl_exec($c);
curl_close($c);
$page = '';
$fh = fopen($website, 'r') or die($php_errormsg);
while (! feof($fh)) {
$page .= fread($fh,1048576);
}
fclose($fh);

That just wont work with some security on places like godaddy (like always there is always a workaround).
What is much prettier AND actually works on godaddy is:

// here is our replacement
function getPage($page)
{
$cinit = curl_init();
curl_setopt ($cinit, CURLOPT_URL, $page);
curl_setopt ($cinit, CURLOPT_HEADER, 0);
ob_start();
curl_exec ($cinit);
curl_close ($cinit);
$ret = ob_get_contents();
ob_end_clean();
return $ret;
}
$page = getPage ($website);

Farewell dinner for Bill Baxter

You may know I sometimes do R&D with OLM (CG for Pokemon, Yatterman etc) they were incredibly kind to invite me to Bills farewell party. Okuno San ( OLMs boss) who is as funny as any Japanese comedian and the brilliant Anjo San (invented CG hair) are just way too kind to me.
Bill is leaving to go to develop for Microsoft, which shows the calibur of OLM.
This was truly amazing sashimi, Okuno San and OLM fantastico!!










Friends dinner

I had dinner with some Chinese Malay friends tonight.


later cute coffee art at a coffee house.

heart


bunny


Lazy ferret

My fat ferret "Lucky" is one lazy bastard!

He lies on the sofa 20 hours a day in these porno poses!
When he is awake it's Mr DESTructo!


Sakura time

Even at my home the Sakura are blossoming.



Backyard in front of my car park.

Tokyo boat cruise

You may have heard I am on this years Siggraph Asia courses committee. To kick things we had a meeting yesterday. Courses chair Tony Apodaca from Pixar flew out here to join us. Afterwords I had organized a bus and harbor cruise for us. Although our meeting was for four I had another 36 over for our boat cruise. Too be honest the food was so so but the party was a hit and everyone got to meet the Lord of RenderMan.
These shots are by Eric Seaholm (with his permission)


more from him here and video from here.

These snaps were taken by Tanaka and Shimamura san, used with their permission.