Tuesday, February 23, 2010

Vancouver's Ray Corbett Teaching at Sidefx

Houdini and Nuke Artist
Raymond Corbett
will be in LA this week to teach 2 workshops at Side Effects:

Houdini and Nuke Workflow on Friday the 26th from 2 to 4:30
and
Working with Trail Effects on Saturday the 27th from 9 to 5

Friday, February 12, 2010

Thursday, February 11, 2010

Face tracking with OpenCV, Python, and Houdini

OK, I know I promised you something else in my last post regarding how to animate the real-world data given up by DOPs on the Interceptor, but I got a little sidetracked instead. Today's exercise is how to make strange data talk dirty to Houdini.

I give you the humble PipeIN CHOP. The PipeIn CHOP has been around since before some of you could legally buy a beer, and its primary purpose is to take in data from external apps and sources. Oh great! Awesome! Now I can connect my Lego Mindstorms to Houdini and terrorize the cat! Not so fast, hoss. It's a little like the secret knock to the after-hours rave. Unless you send it exactly the bytes it needs, in exactly the right order, in exactly the right format, you ain't gettin' in. Houdini's PipeIn CHOP likes to get its data in very specific ways. You can't just blow bits at it and expect it to assemble you a pony at the molecular-genetic level.

The PipeIn CHOP gets its data from a named pipe, which is a temp file specifically created and written to for that purpose.

The docs are a bit terse, but what you need to know is this: You poke the PipeIn Chop with commands, the four most useful being 'reset,' 'send current sample,' 'send channel names,' and 'upload.' This is not very far from the ancient Commodore 64 cassette drive. Maybe some of your parents have one in the attic, put there when they had to make room for you.

The point is, once you can make that work for you, the rest is pretty much cake. Watch the video. Afterwards, I'll post some of the code that makes it happen.



Here's the python code for the reset command:

## reset command
def send_reset(fifo):
p = pack('cccc', chr(170), chr(0), chr(170), chr(0))
fifo.write(p)
fifo.flush()

The reset character is 170. We like it so much, we send it twice.

Here's the python code for the 'send current sample'

def send_single_sample(fifo, numchans, val):
cmd_type = 1
num_channels = numchans
vals = val
p = pack('>ii', cmd_type, num_channels )
fifo.write(p)
for i in range(numchans):
v = pack('>f', vals[i])
fifo.write(v)



The '>' character signifies the endian-ness of the data. If any of you have the misfortune to be running Houdini on IRIX, change this to '<.' Tongue firmly in cheek, of course. The 'ii' is part of the 'struct' module in python that formats the data as in, two integers, followed by as many floats as there are channels.

Obviously, this is part of a much bigger script, which I'll post as soon as I can figure out where to put it and link to it.

Thursday, January 28, 2010

Free Lunch!

Yesterday's free, one hour Intro to Houdini class provided a great way to get Going Procedural, with beautiful work files from Goncalo Cabaca and great snacks as well! Keep an eye on Side Effects Training for more classes to come.


Monday, January 25, 2010

Look At That!

Hi all.

My name is John Courte and I'm the senior Houdini Artist at Side Effects Software Los Angeles. I've been using Houdini and a lot of other stuff for a very long time, and now I have the opportunity to share that experience with you, the user community. Whether you're a seasoned Houdini vet (with scars), or a complete noob to CGI, I hope I can share with you some things that will make your days easier and get you home before you get that 'last person to leave the building' feeling.

First one is one I bumped into today, and that's camera lookats and dynamic objects. This is geared more towards a newer user, but i'll pose it as an option for the multi-year guru as well.

Handing off from Objects to DOPs happens in a number of ways, usually by animating something, then telling DOPs to make that something 'active' at a predetermined frame. Let's say you animated a car, and at frame 120, it gets hit by a train, flinging it across the Walmart parking lot and into the row of coin-op bouncy rides. You want to see this action from your camera, because a car going airborne and flying into a Walmart is awesome.

Easy. You just drag the path of the handoff (/obj/car) object from the tree-view into the lookat field of the camera. And then guess what? It doesn't work! The camera looks at the object until the handoff frame, then stops.

OK, well, you're smarter than the average bear, so you go "Aha!" Then you drag the RBD object in question from under /obj/AutoDopNetwork to the lookat field. This time, the camera doesn't even follow the car before the handoff.

This is where the gotcha happens. Instead of /obj/AutoDopNetwork/car, you need to make it /obj/AutoDopNetwork:car. That ONE little ascii character is the difference between simplicity incarnate and a long, drawn-out tea ceremony involving CHOPs, expressions, and a long night of rapidly graying hairs.

If you'd rather your camera just look at a real object, use a Fetch object and reference the dopobject, using the same syntax as the previous example in the lookat.

What if that's not an option, for some reason? Then you pull out the hammer. Create a rivet object and pick a point on /obj/car/dopimport1 or whatever you've called your dopimport SOP. Set the camera to look at the rivet object and you're done.

Wednesday, January 20, 2010

Full House for Python In Houdini

Lots of interest in this topic led to a full house for our first class of 2010. Oliver Palmer will be teaching Python in Houdini II tonight to another sell out crowd. For more 2010 workshops (including John Courte's RBD Survival Guide) check out the Side Effects Training page.

Wednesday, January 13, 2010

Goodbye 2009

Happy New Year! We've had a great wrap up for the last of 2009, Loads of great events, super training through our Santa Monica office, and wonderful customer stories we loved to share with our readers.

Rounding out the year, a few of us went to SIGGRAPH Asia 2009 in Yokohama, Japan. There, Senior Houdini Artist John Courte gave several Houdini technical talks about the workflow in Houdini.


To start off the new year, please check out our latest customer story about the new Clint Eastwood movie, Invictus!