Register Latest Topics
 
 
 


Reply
  Author   Comment  
MB

First taste
Registered:
Posts: 8
Reply with quote  #1 

Hey all,

I'm hoping one of you soup ninja's can help me out with a super noob problem.

I'm trying to figure out how to project (using rayproject node ...I guess) a curve onto a surface. For some reason I just can't figure this out myself (stupid I guess :D ). Is there anyone out there that could help me out with a simple sample scene? I know there's plenty of scenes in the old examples folder ...but those deal only with polys and particles not curves.

I know there's a "project curve to poly" feature already in Maya but in my case that doesn't seem to work as I hoped.

sampleSnap.jpg 

The problem is that I have a deforming surface (ocean) and I need an object (boat) to travel across the surface using a motion path that represents the deformed ocean surface. If I project a curve to the surface (using Maya's built in feature) it looks just fine, but the problem arises when the surface starts deforming (waves)... then Maya can't figure out what the 'start' and 'end' of the curve actually is ...so the motion path keeps "flipping" out, which is not good.

That's why I'm wondering if SoUP could provide me with some control/method of doing this that would not "flip" on me.

Perhaps even a way to "force lock" the start and end of a "rebuilt" curve.

Any ideas/help/suggestions to solve this would be much appreciated.

thanks.

-M


0
JeremyR

Moderator
Registered:
Posts: 1,048
Reply with quote  #2 
Yep this can be easily done with the rayProject. Connect the curve to rayProject.inGeometry - might need to rebuild the curve first since your ocean is animating. Then connect the Oceans worldMesh to the rayProject.inCollisionMesh. Make a copy of your curve and connect rayProject.outMesh > curve2.create.

From this point you should see some curve motion but perhaps not what you expect. So you could set the Ray direction Mode to Custom Direction and set Y position a positive value and the direction a negative Y value then click on test both directions.

Otherwise play around with other projection methods.
0
MB

First taste
Registered:
Posts: 8
Reply with quote  #3 

Thanks for the super helpful info Jeremy.

I had it connected this way (as you instructed here above) before but for some stupid reason didn't notice that my "projected result" curve had transforms on it (moving the resulting curve to some strange place space) ...so I just assumed I had this connected wrong somehow - stupid me...I should have double checked.

Going over it again with your notes and just redoing the setup, it's working beautifully now and not flipping out like Maya's curve projection feature does. - SoUP to the rescue once more :D

Thanks again,

cheers!

0
hadonai

Asking for seconds
Registered:
Posts: 25
Reply with quote  #4 
one easy way would be to project the curve on the mesh ( just to get the shape) delete the history then perform a wrap on the curve.
That way your curve will simply deform based on the geo and not going crazy and resampling. 
0
Previous Topic | Next Topic
Print
Reply

Quick Navigation: