If you just wanted a blendshape-style mix based on color, you could paint your weights, perform the transform to put the entire mesh into the fully-transformed target position, and then wire this into a Wrangle with the un-transformed mesh plugged into the second input. The Wrangle's VEX code would just be this:
If you wanted to have blended rotations, you would have to do things slightly differently, perhaps by specifying a rotation, converting to a quaternion, interpolating using the slerp() function, and then rotating the point by the resulting quaternion. Depending on your overall goal, that might be overkill, though.
Did you make sure your Geo Time Samples on your ROP are set to 2 and “Allow Motion Blur” is checked on? If you're using a RenderMan Archive ROP, I believe you have to add those params manually.
Thanks, Graham! I was trying to avoid doing something like this, but it seems it can't be helped, and upon reflection, it's really not that bad. It's just mimicking, in Python, what Houdini does at startup. Thank you for the code; I'll give it a go.
I've been trying to get Houdini to rescan $HOUDINI_OTLSCAN_PATH on-the-fly during runtime, and can't get it to work using Python or HScript. I'm trying to run this from a 456.py script, so that when a user opens a new hipfile, the current shot can be determined and a shot-level OTL directory can be scanned. I've tried doing things like this in my 456.py:
Is this impossible? Would I be forced to use a wrapper script instead, so Houdini picks up this variable at initialization? Any guidance would be appreciated.
First, for the surface, create a vector attribute (we'll call it pSave), and stuff the position coordinates into it. Then translate each point in both the surface and the curve to it's UV coordinates. Ray SOP the curve to the surface, making sure the “Import Attributes from Hits” parameter's checked and “pSave” typed into Point Attributes. Then delete points with pSave0,0,0) and translate the rest of the points to the pSave coordinates.
Not exactly obvious, but then I suppose it wouldn't be as much fun to figure out.
I'm attempting to do something very simple, and failing miserably - stretching a series of curves out to the UV space of another object. I have a NURBS surface, which is assigned camera-projected UV coordinates, meaning that the values fall outside of . I then have curves with UV values in the same coordinate space, and I want to assign each curve point to a location on the NURBS surface, e.g. u=0,v=0 on the curve maps to the (x,y,z) where u=0,v=0 on the surface.
I've tried the Paste and Creep SOPs, no dice. It then occured to me that a simple Point SOP expression should suffice. So I tried: tx = primuv(“../each1”,0,“P”,0,$MAPU,$MAPV) ty = primuv(“../each1”,0,“P”,1,$MAPU,$MAPV) tz = primuv(“../each1”,0,“P”,2,$MAPU,$MAPV)
Now the curves are stretching out to the height of the surface primitive, and squashing to the width. I know this has something to do with “real” and “unit” UVs, and should be solveable by using the unituv() and realuv() expression functions, but I cannot find the right expression to perform the mapping.
Here's an illustration. As you can see in the uv view, there is one set of curves that intersects the surface, and that's *all* I want on the surface. The other curves can be discarded. Any ideas? Thanks in advance!
Well, I'm not very great at CHOPs, but I got something a little like you want using an Envelope CHOP and a Composite CHOP. The modified file is attached.
I'm not exactly sure what you mean, but if it's a hyperlink, you can usually right-click and choose “Save Link As…” or whatever your browser says. This is a tutorial on the website, correct?