Sprites On Points Digital Assest
Sprites are pretty cool, but in a clean install of Houdini you can only use them on particles using the Sprite POP. It turns out, you can add some attribute trickery to make sprites work on plain ol’ points. The cooler thing is that this Sprite SOP concept works in Houdini Escape (which doesn’t have particles). I wrote a full blown help for it too, with an icon and all – which basically copies the Sprite POP language and replaces “particles” with “points”. Yes, this has been done before. But let’s face it – that one’s old.
You can find it on my Houdini page or you can get the asset directly from here.
For those interested, here are the attributes you need to get sprites on points:
- spriterot: class: point, type: float, size: 1
- spritescale: class: point, type: float, size: 2
- spriteuv: class: point, type: float, size: 4 (spriteuv[0] = U-offset; spriteuv[1] = V-offset; spriteuv[2] = U-scale; spriteuv[3] = V-scale)
- spriteshop: class: point, type: string
Varying Materials Using A Single Shader
Nothing ground breaking here, but for someone who is into neat little tricks to control shaders, I thought this was worth showing. What the video covers is a way to vary the materials on a single object using a single shader (differing from the usual method of using multiple shaders for different pieces of an object). I’ll leave it at that and let the video do the talking. I’m starting to record at my screen’s native resolution (1680 x 1050) which ups the video size but I like seeing big videos. I’m also posting these on Vimeo which I think is nice to have since you’re not always on a machine that you can download videos on.
Note: Video re-done on 5/25/2009. I thought it could be cleaner and more focused on production nuances so I re-recorded it.
Houdini Python COM Conclusion
After getting something working, and continuing off and on with trying to get it to work, I have come to develop some concepts about using a Python COM method to poll 3DConnexion data.
- The operators at the geometry level (the Python operator and Script SOP) are unable to poll the data. This seems to be due to cooking issues as well as the geometry operators using the hou module only to create/manipulate data.
- The operator at the object level (the Python operator) does poll the data, however it seems that this polling becomes the dominant process in Houdini and you can do nothing else or stop the polling.
So the conlcusion that can be drawn is that the Python COM method for polling data is not a viable one. The idea of having Houdini write the values of the device to certain parameters and see the results in real-time just doesn’t seem to work. It is certainly possible I am overlooking something however I’ve spent a lot of time on this and with a working and better alternative out there now there isn’t a pressing need to continue. This project has helped me learn a lot about Python in Houdini as well as the common object model so the effort wasn’t entirely without gain. Now it’s time to move on and continue to learn more about Houdini!
Houdini Occlusion Asset
I’ve received a few requests for an asset of the occlusion inline VOP I used for the occlusion video so I thought I would put one together. I call it “Occlusion 2″ mainly because it’s the second occlusion VEX function. The occlusion VOP that comes with Houdini is actually the first function which gives you occluded irradiance which is a bit different from the occlusion we’re typically used to. I bet Houdini will eventually have this second function added in VOP form, but until then you can add it with this asset.
I put a help section in the asset, though as it’s not working right now, I’ll say that there is an added output called occlusion which is basically 1-coverage. Using this removes the need for the later subtraction step I note in the video. If you would like to see the help you can right click on the VOP, go to Type Properties, then go to the Help tab.
You can find the asset here (also linked to on the tutorial page).
- v1: Initial Release
Yes – I have something working! Read on for the story and where I’m at: