Aim direction for Instances on Deforming Geometry

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

Thread Tools Search this Thread Display Modes
  09 September 2012
Aim direction for Instances on Deforming Geometry

Maybe there's a simple solution to this, but I sure can't seem to find it...

I have some particles with instanced geometry traveling along a goal surface.
The instances need to aim in the direction they're Aim Direction -> Velocity...simple.
Now, the goal surface is deforming, bulging in and out. Since Aim Direction is set to Velocity, the instances suddenly point up when the surface bulges out, then point down when the surface deforms down. How do I stop this and have the instances disregard the goal surface deformation velocity? The instances should be like boats on the ocean. Boats do not suddenly point skyward when they are lifted by a wave.

Thanks for any ideas.
  09 September 2012
I thought the keel of a boat made them point up as they rode up a crest? They dont point horizontal do they? Maybe you are after some sort of drag expression so the velocity change isnt so abrupt or alternatively increase the mesh subDs on the deforming mesh, so that the surface deformation doesnt stetch the vertices as much and therefore cause a smuch flipping. There is a simple script somewhere to help with velocity drag. Ill see if I can dig it out.
  10 October 2012
double post
  10 October 2012
Hi Jeremy,
Thanks for the reply, I've really enjoyed your SOuP videos in the past.

Not sure a drag is really what's needed, it seems to be a bit more of a fundamental problem which is why I keep thinking there should be a very basic answer...

The simplest way to demonstrate it is:

1) Create a plane. Next, create particles and make the plane a goal
2) Create a cone and rotate it horizontally (or use any piece of non symmetrical geo). Instance the cone to the particles. Set Aim Direction to Velocity on the instancer.
3) Animate the goalU and goalV attributes so the particles move along the surface
4) Animate the plane with either X or Z translations, or any kind of rotations.
5) Notice that the instanced geo aim direction inherits the movement of the goal plane. i.e, when the plane moves in the X direction, the instances suddenly point in the X direction as well, rather than continuing on their UV path.

That's the problem. I want the instanced geo to only use its local velocity for aim direction, and disregard the velocity of the goal object. I've been able to work around the problem a bit by caching the particles with the goal animation muted, and then constraining the instancer to the goal, but that won't work in all cases...

Hope that makes sense. Thanks again.
  10 October 2012
Thanks for your compliment, ah well I see your problem. I'm helping somebody right at this moment with the same thing funny how people have the same problem at the same time Anyways this is my solution, there could be others. Personally I cant see how one can just grb local velocity with mayas current state, but what you can do is grab the velocity of the object and subtract that from the particles velocity essentially thereby resulting in its local velocity.
  10 October 2012
Ah yes I thought I might have to resort to something like that...I just hoped I was overlooking something obvious.
If deformers are being used I assume it'll require a nearestPointOnMesh node or something like that. If you come up with an elegant (or even inelegant) solution please do share.
  10 October 2012
Yeah something like that, very slow if you have thousands of points. Ill let you know if I find a better solution.
  10 October 2012
Yep, got it going by calculating the change in particle position with a pointOnSurface call and using that as the aim direction. As predicted it runs very slowly...
Not ideal, but better than nothing.
  10 October 2012
Thread automatically closed

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.
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
Thread Closed share thread

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Society of Digital Artists

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump

All times are GMT. The time now is 12:49 PM.

Powered by vBulletin
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.