SimplyMaya Forums

Welcome to the forum, feel free to ask questions here.

Home / forum / Lounges / Maya Basics & Newbie Lounge / Creating equidistant objects on a curve
Register FAQ Members List Calendar Mark Forums Read

New Thread
 
Thread Tools
Old 30-09-2006, 02:01 AM   #1
parka
Registered User
 
parka's Avatar
 
Join Date: Aug 2005
Posts: 102
Thanks: 0
Thanked 4 Times in 4 Posts
Default Creating equidistant objects on a curve

Hi,

Let's say I have a guide curve (e.g. the letter S) flat on the plane.

And let's say that I want to create multiple equidistant spheres on the guide curve. How can I go about doing it?

Real life example: Hand rails on a ship.
parka is offline   Reply With Quote
Old 30-09-2006, 03:05 AM   #2
NeoStrider
Registered User
 
NeoStrider's Avatar
 
Join Date: Jun 2004
Location: Cleveland, Ohio (USA)
Posts: 1,541
Thanks: 0
Thanked 2 Times in 2 Posts
Default

equidistant, not so sure about... but you can snap your objects to your curve by moving the object near your curve, than while holding c (with the move tool still selected) you can snap to the curve, and just try to eye it from there...
__________________
Accept no substitutions.
NeoStrider is offline   Reply With Quote
Old 30-09-2006, 03:34 AM   #3
gster123
Moderator
 
gster123's Avatar
 
Join Date: May 2005
Location: Manchester Uk
Posts: 6,300
Thanks: 1
Thanked 51 Times in 45 Posts
Default

rebuild the curve with the number of points that you want (using edit curves -> Rebuild Curve) the use the snap to pioint to get the object to the equally spaced points oin the curve
gster123 is offline   Reply With Quote
Old 07-10-2006, 09:27 AM   #4
parka
Registered User
 
parka's Avatar
 
Join Date: Aug 2005
Posts: 102
Thanks: 0
Thanked 4 Times in 4 Posts
Default

Ok, I think I found a much faster solution.

1. On the Time Slider, set the time to go from 1 to (let's say) 200.

2. Createa vertical railing (aka NURBs cylinders).

3. Draw a curve to represent where you want the railings to run.

4. Select the railing & the curve, go to Animate -> Motion Paths -> Attach to Motion Path.

5. With the railing selected, go to Animate-> Create Animation-> Snapshot ->options.

6. Set the Time Range to Time Slider and Increment to whatever value (let's say 5).

7. Hit the Snapshot button.

8. There will be railings creating now on the curve at almost equidistant.
parka is offline   Reply With Quote
Old 07-10-2006, 02:35 PM   #5
pbman
Subscriber
 
pbman's Avatar
 
Join Date: Mar 2005
Location: London
Posts: 1,135
Thanks: 0
Thanked 0 Times in 0 Posts
Default

thats how i would do it too

also cant u dup along a curve an just set the increments apart
__________________
Now at SMU doing BSc 3D Computer Animation so its hard to get on here
My wire render tut http://forum.simplymaya.com/showthre...threadid=20973
pbman is offline   Reply With Quote
Old 07-10-2006, 05:52 PM   #6
Phopojijo
Registered User
 
Join Date: Aug 2004
Posts: 408
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally posted by parka
Ok, I think I found a much faster solution.

1. On the Time Slider, set the time to go from 1 to (let's say) 200.

2. Createa vertical railing (aka NURBs cylinders).

3. Draw a curve to represent where you want the railings to run.

4. Select the railing & the curve, go to Animate -> Motion Paths -> Attach to Motion Path.

5. With the railing selected, go to Animate-> Create Animation-> Snapshot ->options.

6. Set the Time Range to Time Slider and Increment to whatever value (let's say 5).

7. Hit the Snapshot button.

8. There will be railings creating now on the curve at almost equidistant.
Yea -- creating objects along animation curves is the easy way... but anyone who took calculus knows that it may or may not create equidistant objects depending on velocity down the motion path.

Though you will only really get non-constant velocities down motion paths if you *deliberately* alter the speeds. Maya last I checked assumes constant velocities.
Phopojijo is offline   Reply With Quote
Old 07-10-2006, 05:55 PM   #7
pbman
Subscriber
 
pbman's Avatar
 
Join Date: Mar 2005
Location: London
Posts: 1,135
Thanks: 0
Thanked 0 Times in 0 Posts
Default

u dam maths at alevel too
man that its a hard subject
__________________
Now at SMU doing BSc 3D Computer Animation so its hard to get on here
My wire render tut http://forum.simplymaya.com/showthre...threadid=20973
pbman is offline   Reply With Quote
Old 17-10-2006, 11:37 AM   #8
Alan
Moderator
 
Alan's Avatar
 
Join Date: Oct 2002
Location: London, UK
Posts: 2,800
Thanks: 0
Thanked 5 Times in 5 Posts
Default

A little investigation and scripting is your friend:

Draw your curve and change the string value in my script to the same as your curve name:

then run this:

int $numb = 100;
float $i = 0.0;
//change this to your curve name
string $crv = "curve1";
//make sure your curve is rebuilt to be between 0 and 1
rebuildCurve -ch 1 -rpo 1 -rt 0 -end 1 -kr 0 -kcp 0 -kep 1 -kt 1 -s 20 -d 3 -tol 0 $crv;


for($i; $i <= $numb; $i++)
{
float $inc = (1.0/$numb) * $i;
float $pos[] = `pointOnCurve -pr $inc $crv`;
sphere;
xform -ws -t $pos[0] $pos[1] $pos[2];
}


A
__________________
Technical Director - Framestore

Currently working on: Your Highness

IMDB
Alan is offline   Reply With Quote
Old 17-10-2006, 01:51 PM   #9
NeoStrider
Registered User
 
NeoStrider's Avatar
 
Join Date: Jun 2004
Location: Cleveland, Ohio (USA)
Posts: 1,541
Thanks: 0
Thanked 2 Times in 2 Posts
Default

owwww...

head spinning...

*dies*
__________________
Accept no substitutions.
NeoStrider is offline   Reply With Quote
New Thread

« Previous Thread | Next Thread »

Thread Tools

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem solving many dynamic objects in a pile? rohiniduggal Dynamics & Special Effects 3 14-01-2011 06:26 PM
Strange Problem - Unable to change attributes for multiple objects anthonysw3 Technical Issues 4 04-12-2010 10:56 PM

1 Month

$34

Month-to-month billing
$34/month
Unlimited access to all videos
Project files to download
Easy to cancel at anytime
 
 

3 months

$87

Billing every 3 months
$29/month
Unlimited access to all videos
Project files to download
Easy to cancel at anytime
Save $5 per month or $15 in total compared to monthly billing with this package.

12 months

$288

Billing every 12 months
$24/month
Unlimited access to all videos
Project files to download
Easy to cancel at anytime
Save $10 per month or $120 in total compared to monthly billing with this package.

Your plan will automatically renew. You can cancel at any time via your PayPal account to avoid being charged again.

You can view the FAQ on our video plans here. You can contact us directly here. By clicking one of the buttons above, you agree to our Terms and Privacy Policy.