I am a maya TD and I have been developing and rigging a lot in that software , then one day a collegue showed me houdini and I had a big “woah” moment , it s amazing how you can move and manipulate data in houdini , that s why i decided to learn it.
I wanted to start with something I thought basic . Basically i would like to make a node (digital asset) that calculates normal along a curve by using the parallel frame transportation.
The best would be to have as input the curve then and as output the computed normals.
The algorithm is pretty simple and this is the c++ procedure i used in my maya nodes :
MVector currentNormal = firstUpVecV;
for ( int i = 0 ; i < numberOfSamplesV ; i++ )
{
double param = curveFn.findParamFromLength(i*subvidsSample);
MVector tan = curveFn.tangent(param , MSpace::kObject);
MPoint outPos;
curveFn.getPointAtParam(param , outPos , MSpace::kObject);
tan.normalize();
MVector cross1 = currentNormal^tan;
cross1.normalize() ;
MVector cross2 = tan^cross1;
cross2.normalize();
currentNormal = cross2 ;
normals = cross2;
}
Basically you start from a given normal and you use it to compute the next normal , then you keep in memory the normal computed and you use it for computing the next normal.
I think that might be easier with python but I really want to get it done with nodes.
What i have done so far (check the attached file please )
I start with a curve and i resample it (the number of samples is the number of normals I want to compute)
then I use a polyFrame to compute the tangents and then i go inside a vopSop :

then inside the vopsop i plug the firstUpVector (the starting normal) and the tangents in a for loop

in the end inside an if loop i start with the cross products , my problem is that if the index is 0 i use the firstUpVector as a normal then when i have recomputed the normal with a double cross product i want to keep that normal somwhere and use it for next computation . something like nromals ^ tangents


anyone have idea about to get throught that if statement? I am stuck
thanks a lot guys!