Maya Training

Introduction to Hard Surface Modeling

Maya Training

Interiors and Furniture Vol 1 & 2 - Modeling & Cloth

Maya Training

Shading, Lighting and Rendering the Bedroom in MR

Maya Training

Robot volume one - Modeling with animation in mind

Maya Training

Spach-Alspaugh House the complete courseware

Maya Training

Burt The Cartoon Dinosaur Vol 01 - Modeling

New Maya Training

Robot Volume 02 - Hybrid Rigging
You are here > Home > SimplyMaya Community Forums
Loading

Welcome to Simply Maya

Please Sign in or Sign up for an account

Member Login

Lost your password?

Not a member yet? Sign Up!

Old 30-09-2006, 03: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, 04: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, 04: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, 10: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, 03: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, 06:52 PM   #6
Phopojijo
Registered User
 
Join Date: Aug 2004
Posts: 408
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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, 06: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, 12:37 PM   #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, 02: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
Reply


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 07:26 PM
Strange Problem - Unable to change attributes for multiple objects anthonysw3 Technical Issues 4 04-12-2010 11:56 PM

Thread Tools





A little bit about who we are
Links you might find useful
Catch up with SimplyMaya
SimplyMaya specialises in Maya tutorials. We offer over 1,000 individual Maya training videos, ranging from basic Maya tutorials through to intermediate Maya tutorials. Our tutorials are created by instructors with industry experience and are designed to get you up and running in Maya quickly without making it seem like hard work.

Copyright © 1999-2015 SimplyMaya - vBulletin® Copyright © 2000-2015, Jelsoft Enterprises Ltd.