View Full Version : bike chain? help
riley_ag 08-20-2002, 10:06 PM I am attemping to make a bike chain. They way I thought would work is to have a single chain link and put it on a path constraint. But my problem is when I go to try to make a gazillion instances of it, I dont know how to make them spead out along the path. Any suggestion is greatly apprieciated
|
|
Chris
08-20-2002, 10:25 PM
if the shot is far enough away, you could just model the whole chain & path constrain that, it will bend a little bit, but shouldnt be too noticable.
you'd alter the offset on the path constraint to move the individual links along. to do the whole lot, you could try turning on the macro recorder while you put the path constraint on the second link & adjust the offset. you could then put the resulting code into a small maxscript loop to run as many times as you need links, each time adding the 'offset' to a 'total offset' variable.
you could have a look at scriptspot to see if someone has already written a chain creation script... :shrug:
riley_ag
08-20-2002, 10:30 PM
Thanks, I'll try you suggestions out, havent really done anything in maxscript though, still a huge newbie:annoyed:
Chris
08-20-2002, 10:45 PM
its easier than you'd think. The macro recorder will do most of the work. it will end up something like this.
C_Offset = {insert offset amount here}
T_Offset = C_Offset {this we will keep the total offset amount in}
for i = 1 to {insert number of links here} do
(
{stuff the macro recorder recorded here, you will need script to copy the link & assign the path constraint. Where it has a line like: $.pos.controller.Path_Constraint.controller.percent = 71.483 <- change this number to T_Offset}
T_Offset += C_Offset {this will get the offset ready for the next link}
)
something roughly like that should do it, I'm not at Max, so I cant show you exactly how, the maxscript reference should have something to help you though :thumbsup:
riley_ag
08-21-2002, 09:21 AM
After trying for about 5 hours with a friend that actually had some programming knowledge, I gave up on making my own script.. I thought I had gotten close, but after seeing the huge amount of code from the script I downloaded from scriptspot ( thanks for leading me there) I figured I wasn't. Anyway, for anyone else thats interested, the srcipt was called chainmaker
CGTalk Moderation
01-13-2006, 02:00 PM
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.
vBulletin v3.0.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.