Integrating 3D models with photography
Interested in integrating your 3D work with the real world? This might help
# 1 30-09-2006 , 02:01 AM
parka's Avatar
Registered User
Join Date: Aug 2005
Posts: 102

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.

# 2 30-09-2006 , 03:05 AM
NeoStrider's Avatar
Registered User
Join Date: Jun 2004
Location: Cleveland, Ohio (USA)
Posts: 1,541
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.
# 3 30-09-2006 , 03:34 AM
gster123's Avatar
Moderator
Join Date: May 2005
Location: Manchester Uk
Posts: 6,300
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

# 4 07-10-2006 , 09:27 AM
parka's Avatar
Registered User
Join Date: Aug 2005
Posts: 102
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.

# 5 07-10-2006 , 02:35 PM
pbman's Avatar
Subscriber
Join Date: Mar 2005
Location: London
Posts: 1,135
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 https://forum.simplymaya.com/showthre...threadid=20973
# 6 07-10-2006 , 05:52 PM
Registered User
Join Date: Aug 2004
Posts: 408

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.

# 7 07-10-2006 , 05:55 PM
pbman's Avatar
Subscriber
Join Date: Mar 2005
Location: London
Posts: 1,135
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 https://forum.simplymaya.com/showthre...threadid=20973
# 8 17-10-2006 , 11:37 AM
Alan's Avatar
Moderator
Join Date: Oct 2002
Location: London, UK
Posts: 2,800
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];
}

user added image
A


Technical Director - Framestore

Currently working on: Your Highness

IMDB
# 9 17-10-2006 , 01:51 PM
NeoStrider's Avatar
Registered User
Join Date: Jun 2004
Location: Cleveland, Ohio (USA)
Posts: 1,541
owwww...

head spinning...

*dies*


Accept no substitutions.
Posting Rules Forum Rules
You may not post new threads | You may not post replies | You may not post attachments | You may not edit your posts | BB code is On | Smilies are On | [IMG] code is On | HTML code is Off

Similar Threads