Adding Parameters to VEX Wrangle nodes

July 7th, 2014 . 0 comments

Here’s a quick one, inspired by a tool I saw while at Double Negative earlier this year. The Point Wrangle and Attrib Wrangle nodes in Houdini 13 come in handy for a lot of things but are a but cumbersome when you want to add parameters to control them. This bit of python will look over your VEX code snippet and create parameters for any that have been referenced in your code but don’t already exist.

wrangler_parms

It’s in the form of a custom menu option, so you just need to drop this file in your houdini user folder (where all your .pref files are), and it will append the “Create Wrangler Parameters” option to the end of the parameter context menu.

http://mattebb.com/projects/houdini/wrangler_parms/PARMmenu.xml

 

Weighted randomness in VEX

July 3rd, 2014 . 0 comments

Today I finally got around to putting together a little tool for use in VEX/VOPs, to generate random numbers weighted according to a ramp. In the example below, I’m distributing 8000 points by ramp weight in the X axis, and randomly in Y – you can see how the density of random X values corresponds to the ramp.

This is using a simplistic method I remembered from a while ago when I saw it used for importance sampling brights parts of an environment map during rendering.

The idea is a bit similar to making a histogram. Divide your function (in this case the ramp) up into a number of bins, and scan over them, accumulating the sum of all bins up to that point in an array. The final value in the array will be equal to the sum of all bins.

Above you can see the normalised sum curve overlaid on the ramp curve. Where the ramp has a high value, the slope of the sum is greatest (because the change in value of the sum is highest when its summing high ramp values).

If we then choose a range of random numbers in y, most of the corresponding points on the sum curve will be in the areas of greatest slope. It’s easy to visualise as if you’re projecting points horizontally and intersecting the curve – areas of low slope will tend to get missed, and the majority of the random values will stick to the areas of greater slope, and therefore the greatest values in the underlying ramp function.

You can drop the VEX code below into a wrangle SOP or a snippet VOP. Right now it’s not hugely optimised, it’s pre-processing the ramp every time its run (eg. for each point), and it’s using a linear search to find the ‘random number intersections’ when a binary search might be faster. It’s still super quick though, so further work may not be so necessary.

Example .hip file is here: http://mattebb.com/projects/houdini/weightedrandom.hipnc

cloud

January 5th, 2014 . 3 comments

Jurassic Park Terrarium

December 22nd, 2013 . 0 comments

I just finished making a terrarium for Kat’s birthday. It’s an homage to her favourite scene in Jurassic Park when the lawyer gets eaten on the toilet. I was able to pick up a plastic dinosaur from the Australian museum, and some architectural model making supplies for the destroyed toilet structure, but I wanted to make it accurate, so used 3d printing for the lawyer on the toilet. I’m not a great modeller/sculptor, but at the size it was printed, I could get away with a pretty rough digital sculpt to generate the STL for printing. It’s a repurposed version of this toilet¬†combined with a modified old human base mesh I made years ago.

Once again I used Rapid Prototyping Services in Sydney for the print Рthe level of fine detail and quality was impeccable, unfortunately a bit masked by my dodgy paint job with too many layers of undercoat. You can check how well it fares against the reference.

digital sculpt

Physically Based Shading in 3Delight 11

December 4th, 2013 . 2 comments

Although the 3Delight/blender addon is mostly abandoned due to lack of time to keep it maintained, I want to at least bring it up to date with the latest 3Delight release, which has had a lot of good updates in the pathtracing/physically based rendering department.

3Delight’s approach to the problem has been to extend some of the commonly used shadeops, seemingly with the intention of making it simple to convert over old shaders, or create simple shaders from scratch. It definitely has advantages in terms of the amount of work required to get something set up, but imo it’s also a bit messy and confusing how it all fits together, especially if you’re familiar with a more common and organised physically based shading infrastructure as in pbrt.

» Read the rest of this entry «

The Lego Movie

December 4th, 2013 . 2 comments

Last week I wrapped on The Lego Movie, produced at Animal Logic in Sydney. It was tons of fun to work on with lots of unique challenges for us in the fx department. It’s also really surprised me, becoming a much better film than I initially imagined. I’m looking forward to seeing it when it comes out next year, until then here’s the trailer:

canyon

September 4th, 2013 . 0 comments

canyon by mattebb

Houdini Attribute VOP shortcuts

September 4th, 2013 . 0 comments

If you use VOPs in Houdini a lot like I do, you might also find it a bit annoying when using Import/Add Attribute VOPs trying to keep a clean setup with nodes nicely named and local variables added – it can be a lot of typing.

I made a couple of scripts that you can add to your shelf and add keyboard shortcuts to, to automate this process a bit. They’ll pop up a text entry with the attribute name, add the VOP node, and then fill in the relevant parameters based on the attribute. For the import attribute node it also tries to be a bit clever and set the attribute type information by querying the incoming geometry. Enjoy!

canyon cloud

July 6th, 2013 . 0 comments

canyon cloud by mattebb

arizona

May 19th, 2013 . 0 comments

arizona by mattebb

lake mead

May 12th, 2013 . 0 comments

lake mead by mattebb

downtown/arts district

April 30th, 2013 . 0 comments

downtown/arts district by mattebb

venice beach

April 25th, 2013 . 0 comments

venice beach by mattebb

getty center

April 24th, 2013 . 0 comments

getty center by mattebb

dock

April 8th, 2013 . 0 comments

dock by mattebb

mt wellington

January 15th, 2013 . 0 comments

mt wellington by mattebb

hobart, august 2012