PDA

View Full Version : Attaching to deformed mesh


JeremyW
10-21-2007, 08:00 AM
I have an XPresso set up to attach a group of objects to points of a deformed mesh.
No problem nailing the instances to their positions on the deformed mesh, BUT, I can not get them to be perpendicular to the deformed surface.

Attached file has clarifying comments in the XPresso tag.
Any ideas?
XPresso only, no moGraph allowed (I'm working in R8.3)
I'm on a deadline...

TIA

LucentDreams
10-21-2007, 08:02 AM
you need to look at constraints in R10 sorry missed the 8.3 comment. wow why so old?

JeremyW
10-21-2007, 08:06 AM
wow why so old?

Because I can't stand working without sequences in the timeline.
How about the XPresso question?

LucentDreams
10-21-2007, 08:30 AM
haven't found the solution yet but I do know the problem is that while a normal is a vector or sorts, its not degrees that you can feed into rotation, I think you need to convert it to a matrix and then get the hpb from that, just haven't figured out how

JeremyW
10-21-2007, 08:36 AM
Yep, I tried various normal/vector/matrrix conversions, but no joy yet.

Srek
10-21-2007, 09:20 AM
Since i don't have R8 or R9 installed on this machine i can't send you a working scene.
Switch the point node to local mode and change your setup according to the screenshot.
Then copy the animation of the mesh object to the Surface objects Null.

The problem you have in your old scene is that the conversion to and from global space messes up your alignment. If you do this in local space the problem does not arrise.

Cheers
Björn

JeremyW
10-21-2007, 09:38 AM
I need to work in Global Space for reasons not appareny in that simplified file.

What is that node 2nd from the left? Vector2Matrix does not have Input and Output here.

Srek
10-21-2007, 09:59 AM
There are two nodes, Vector2Matrix and Vectors2Matrix. Vector2Matrix can be found in the calculate submenue, while Vectors2Matrix is an adapter.

Alernatively just keep the local to global conversion right up to the end
See Attachement
The Global Matrix node is a COFFEE node with the following code

main()
{
GlobalMatrixOut = GlobalMatrix->GetMulM(LocalMatrix);
}

It only converts a local matrix to global space.

Hope this helps
Björn

JeremyW
10-23-2007, 07:00 PM
OK, so I'm not worrying about rotation at this point. Just concerned that the instances stick to the surface.
Now I'm finding that this rig does not work with NET, because each first frame from each client does not work. The instances jump to position on the second frame of each clients contribution.

I'm playing with setting priorities, but can't figure it out.
Ideas?

TIA

Srek
10-23-2007, 09:11 PM
The dependency problems are not easily resolvable, i would go for baking the animation to keyframes before using Net
Cheers
Björn

CGTalk Moderation
10-23-2007, 09:11 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.