Hello everyone
I'll explain the whole problem just in case I'm just thinking wrong ^^ but essentially i'd like to fetch the tangent basis of vertex (in world space)
So I'm building race tracks using a 'straight' mesh that i bend using a Flow path along an EP curve. I need to parametrize that track using a serie of transform, aligned with the track. Unfortunately it seems the flow path (a lattice) only deforms geometry, and not object's transforms.
So the solution I was think was to:
- create a bunch of quads, perpendicular to the track,
- bend them the same way and then
- match transforms with the orientation of the bended quads
I need to query the 'local transform' of one of the vertex of one of this quad, and align a locator with it. How would you do that? Thanks in advance
(Unless i can actually snap locators to an EP curve, including its rotation?)
Replies
This would query the absolute worldspace location of vertex index 1 on an object called "myMeshNode".
However if you want to actually lock the position and "constrain" the locator to the vertex then you're going to have to start using more complicated stuff like a node that returns pointOnSurfaceInfo.
Could you use a motion path with follow activated?
@ivars: indeed, motion path does the trick, but i don't really grasp how i could code that to be automatic, the whole 'related to timeslider' thing is pretty annoying. I'd love to hear a solution using this tough.
The über function would be a version of 'Modify > Snap Align Object > Position Along Curve' that supports orientation along the curve too, and not just position.
@ PolyHertz , Mop I had a look at the xform command and I don't see how i can fetch the normal, tangent or bitangent of my vertex. All I can fetch is a matrix, and I'm not really sure what to do with that afterward...
I checked further and realized something pretty easy:
create the initial quads (i0,i1,..) duplicate the quads and bend the copy (d0,d1,d2,..) make a loop that iterate trough every quad, select the first 3 vertices of both initial and deformed, and then run a "Snap Align Objects > 3 Points to 3 Points".
But of course, the only function i know so far that has no MEL equivalent is this one.... the script editor outputs only a bunch of 'rotate' with values precalculated 'somewhere' (WTF! sorry, it had to get out...)
any workaround ?
edit: my bad 'pointOnSurface' gives me back the tangent basis, now i need to figure out how to align a transform with it
thx everyone