Houdini: Replaying history
This is more of a fun thing. Quite a while back I did some tests if houdini really sucked as much as one would think when it comes to modeling. I modeled an elephant figure that i bought from schleich - awesome figures by the way.
Now, since houdini holds all the steps I did, I figured it would be cool to see a replay of all the steps I did. I could do a screenshot after activating each node, but it's houdini, so it can be automated.
This is a real simple and hacky way of doing it:
(Thanks to Dan Bethell @vfxovwerflow for the idea)
import hou
startNode=hou.node("/obj/model_elephant/half_lo_elephant/curveProfileElephant")
startNode.setDisplayFlag(True)
# return all connections up & downstream
def listConnected(node, visited=None):
if visited is None:
visited=[]
connected=[]
visited.append(node)
for n in node.inputs() + node.outputs():
if not n in visited:
connected.append(n)
connected += listConnected(n, visited)
return connected
connections = listConnected( startNode )
for node in connections:
node.setDisplayFlag(True)
hou.hscript("viewwrite -A -f 1 1 Build.panetab1.world.persp1 ip")
Well, it crashed at some point because I wrote it all to mplay. Ok, so viewwrite allows us to output pictures, right? According to http://www.sidefx.com/docs/houdini14.0/commands/viewwrite it does, and they even provide an example viewwrite -f 1 10 Build.panetab1.world.persp1 '$F.jpg'
, which does not work. It fails with an image save error. I changed the path, but no luck.
So, more hacky-hacky. I quit chrome to free up some ram (lol) and limited the function to do only 700 nodes.
Then, because we can: ffmpeg -f image2 -i ele%d.jpg -gifflags +transdiff ele.gif
Yay!
Believe it or not, next to a uv layout and a simple texture, the rest is just a subdivide SOP, some primitively scattered 'hairs' (lines) and some mountain SOPs.