Search - User list
Full Version: how to define arbitrary point coordinates?
Root » Houdini Lounge » how to define arbitrary point coordinates?
zveris
Hi, is there a way to define in VOPs your own coordinate space for point? Say I would like to state local point coordinates where z is point normal, x is a tangent to zet and y is a cross product of former two. How can I do that? I need it as a sop op, to describe the motion in local point coordinates but not in world coordinates.

Thanks
MatrixNAN
Hey,

Well there is a cross product VOP in the vector section of a Vex SOP. So that will take care of your cross product problem. As far as the normal well you can grab that from the surface you are deforming in Global Variables VOP or you can define your own with a Parameter VOP. Now how to do the tangent is the part I am kind of lost on because I notice in the Expression language and in the other areas that the operators are not called by their mathematical term sometimes but are given better descriptive names. Maybe Normalize Vector means to get the tangent I am not real sure though. You can then pipe your Normal Vector for Z into the Cross Product along with the Tangent of the Normal to get y. Ok well at this point you have vectors which will not work for x and y although you can keep the normal as a normal for z and just pipe it into the normal vector on the shader. To get the components of the vectors you need the magnitude of the vector which Houdini calls the length. So use the Length VOP to get your float value for each of the x and y. t and s will be your x and y if you want to lock down position of the shader. If you want it to be manipulated based on the vector from the camera then you need to use Pos in which case you need to use a Length VOP on the Normal vector and pipe each one in a float to vector VOP the first input is x, the second y and the third is z. then pipe the pos into the pos of the shader and the manipulation of the surface will be done when it is passed onto the output vop pos.

Cheers,
Nate Nesler

P.S. If the normalize is wrong for the tangent please tell me. I simply don't know exactly what they mean by it.
zveris
Thanks MatrixNAN, will try it.

Zveris
edward
Just curious, zveris, what's the end result that you're trying to achieve with this?
zveris
Edward,

my goal is to transfer motion from one geometryn to another. Although they have the same topology, thay different geometry, therefore motion vector for each point has to be reoriented. As far as I can figure it out, the best way is to compute rotation matrixes using normals as one orientation reference and one of connected to point edge as another orientation reference.Then using AlignOP I can get rotation matrixes to recompute motion vector.
edward
If I understand correctly, you an animated geometry sequence and you want to transfer it to a different rest geometry that has the same topology but different initial point positions.

My first feeling is to avoid doing this if you can. Is this a character that has capture weights? You can use AttribTransfer to transfer capture weights from one character to another and so that same skeleton animation can be applied to a different character.

I think basing this on local point coordinate frames only works well if the moved points don't cause the resulting normals to rotate too drastically (perhaps less than 90 degrees). So if you're talking about character animation, it pretty much rules out taking differences from the rest geometry. This means that you'd need to take the difference of the geometry between two successive frames so that the differences are not too large. Even that, I'm not sure how well it will work.

The Edit SOP in Houdini 6.5 natively supports moving points relative to local coordinate frames. That's what the new second input is all about. So here's an idea. Write a script which creates an Edit SOP which describes the difference between all successive frames of your geometry sequence. The “sopcreateedit” command can take two sops and create an Edit SOP which describes their differences. Say you create an Edit SOP which describes the difference from frame N to frame N+1. Then wire the frame N geometry that the Edit was created from into the second input of your Edit SOP. Wire the previously created frame's geometry into the first input. After you have all your Edit SOPs created, wire them all in to a Sequence Blend SOP with $F as your Blend Factor.
edward
Hey zveris, did you manage to get anything going? I'd be interested to know how it goes.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Powered by DjangoBB