Subject:
|
Re: A question about an animation scene
|
Newsgroups:
|
lugnet.cad.ray
|
Date:
|
Fri, 6 Apr 2007 18:08:30 GMT
|
Viewed:
|
7029 times
|
| |
| |
> so this is the code i believe should work
>
> #if ( frame_number > 0 & frame_number < 61)
> object { car_dot_dat matrix <0,0,1,0,1,0,-1,0,0,0,0,0> #if (version
> > = 3.1)
> material #else texture #end { Color7 }
> //translate<-960,-24,1860>
> rotate -90*y
> animate_by_spline (east_to_south, auto_banking (0))}
> #end
>
> #if ( frame_number > 60 & frame_number < 121)
> object { car_dot_dat matrix <0,0,1,0,1,0,-1,0,0,0,0,0> #if (version
> > = 3.1)
> material #else texture #end { Color7 }
> //translate<-960,-24,1860>
> rotate -90*y
> animate_by_spline (south_to_east, auto_banking (0))}
> #end
>
> It looks like it works but the 1st car stops at frame 60 and is
> only half way
> the spline and the 2nd car starts at frame 61 but starts in the
> middle of the
> spline and ends correctly.
>
> Why doesn't the 1st car follow all the spline ?
>
> Why doesn't the 2nd car start at the beginning of the spline?
>
> Why does it work if i seperate them if each in to 2 files?
>
> And why I can't get them working all in one file ?
You are not specifying a custom clock value so your spline lasts from
frames 1 to 121. You actually want to specify a custom clock value.
Something like this:
animate_by_spline (east_to_south, auto_banking (0) + spline_clock
( ..... ) )}
The "....." needs to be replaced with an equation that is 0 at the
start of the keyframe sequence and 1 at the end of it. The equation
would look like this (it always takes me a few minutes to figure this
out... I should be able to do this in my sleep I've done it so many
times):
( current_frame - sequence_start_frame ) / ( sequence_end_frame -
sequence_start_frame )
For the sequence 1-60:
(current_frame-1)/59
And this for 61-121:
(current_frame-61)/60
Ironically, as part of my dancing mech tutorial, I've actually got a
few scripts that create spline keyframes like this really easy. But
you'll have to wait for me to get that far. It isn't ready for
public use yet.
You may want to use switch and range statements instead of the if:
#switch ( frame_number )
#range (1,60)
.......
#break
#range (60,121)
.......
#break
#end
James
|
|
Message is in Reply To:
| | A question about an animation scene
|
| I have made a scene where a car follows a spline this is the main co ---...--- object { car_dot_dat matrix <0,0,1,0,1,0,-1,0,0,0,0,0> #if (version >= 3.1) material #else texture #end { Color7 } //translate<-960,-24,1860> rotate -90*y (...) (18 years ago, 4-Apr-07, to lugnet.cad.ray)
|
3 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|