New function in animator

Raylectron (https://Raylectron.com) is a 3D rendering engine for Trimble Sketchup (https://sketchup.com)
User avatar
GateGirl86
Posts: 845
Joined: Mon Oct 03, 2022 8:32 pm

Re: New function in animator

Post by GateGirl86 »

:salute Yes thank you. I mean the coding does look easy enough. I just to understand what is where and how :mrgreen:
Image
"Come with me if you want to live."
Sarah Connor
User avatar
Support
Site Admin
Posts: 3025
Joined: Sun Oct 02, 2011 10:49 am

Re: New function in animator

Post by Support »

Yes I know, but try this one, it has explanation for each setting...

Code: Select all

TurnAngle   := -90;   // Angle to make turn.
NoseUpAngle := 20;    // Take off angle.
FirstAcc    := 1;     // Initial acceleration in meters per seconds.
SecondAcc   := 3;     // Second acceleration in meters per seconds.

StartAcc1At := 1;     // When to start the initial acceleration.
EndAcc1At   := 3;     // When to stop the initial acceleration and remain at that speed.
StartDecAt  := 13;    // When to start deceleration
EndDecAt    := 15;    // When the deceleration will end to a stop.
TurnLeftAt  := 2;    // When to start rurning.
EndTurnAt   := 12;    // When to stop turning.
StartAcc2At := 20;    // When to start the second acceleration.
EndAcc2At   := 25;    // When to stop the second acceleration and remain at that speed.
StartGoUpAt := 25;    // When the nose should start to go up.
EndGoUpAt   := 30;    // When the nose should end going up and stay that way.

// end settings

Acc1 := Accelerate(FirstAcc, meters, StartAcc1At, EndAcc1At);
Dec1 := Accelerate(FirstAcc, meters, StartDecAt, EndDecAt);
Acc2 := Accelerate(SecondAcc, meters, StartAcc2At, EndAcc2At);

if sec < StartDecAt then
  py := acc1;

if (sec >= StartDecAt) and (sec <= EndDecAt) then begin
  py := acc1 - Dec1;
  if py < 0 then
    py := 0;
end;

yaw(TurnAngle, TurnLeftAt, EndTurnAt);

if (sec >= StartAcc2At) then
  py := Acc2;

Pitch(NoseUpAngle, StartGoUpAt, EndGoUpAt);
Your support team.
https://SoftByteLabs.com
User avatar
GateGirl86
Posts: 845
Joined: Mon Oct 03, 2022 8:32 pm

Re: New function in animator

Post by GateGirl86 »

As I understand it, this is the length it travels before turning?

StartDecAt := 13; // When to start deceleration
EndDecAt := 15; // When the deceleration will end to a stop.
Image
"Come with me if you want to live."
Sarah Connor
User avatar
Support
Site Admin
Posts: 3025
Joined: Sun Oct 02, 2011 10:49 am

Re: New function in animator

Post by Support »

Not before turning but when it comes to a stop, at 15 sec ... EndDecAt := 15
Your support team.
https://SoftByteLabs.com
User avatar
GateGirl86
Posts: 845
Joined: Mon Oct 03, 2022 8:32 pm

Re: New function in animator

Post by GateGirl86 »

So to get it to the centre further up, I should keep increasing that 15 until it's where I need it to be?
Image
"Come with me if you want to live."
Sarah Connor
User avatar
Support
Site Admin
Posts: 3025
Joined: Sun Oct 02, 2011 10:49 am

Re: New function in animator

Post by Support »

You got it :salute
Your support team.
https://SoftByteLabs.com
User avatar
GateGirl86
Posts: 845
Joined: Mon Oct 03, 2022 8:32 pm

Re: New function in animator

Post by GateGirl86 »

:salute I'll get back to you :mrgreen:
Image
"Come with me if you want to live."
Sarah Connor
User avatar
Support
Site Admin
Posts: 3025
Joined: Sun Oct 02, 2011 10:49 am

Re: New function in animator

Post by Support »

You may also change when it starts to decelerate to make it decelerate faster, because these values are "from" "to" so the more gap the longer it'll take to perform that action.
Your support team.
https://SoftByteLabs.com
User avatar
GateGirl86
Posts: 845
Joined: Mon Oct 03, 2022 8:32 pm

Re: New function in animator

Post by GateGirl86 »

I changed the 13 to 80
and the 15 to 100. Didn't change anything?
Image
"Come with me if you want to live."
Sarah Connor
User avatar
Support
Site Admin
Posts: 3025
Joined: Sun Oct 02, 2011 10:49 am

Re: New function in animator

Post by Support »

I had an error in the acceleration function, it was based on Zero/End rather than Start/End so re-download the rbz...

https://raylectron.com/Raylectron.rbz
Your support team.
https://SoftByteLabs.com
User avatar
Support
Site Admin
Posts: 3025
Joined: Sun Oct 02, 2011 10:49 am

Re: New function in animator

Post by Support »

GateGirl86 wrote: Sun May 07, 2023 6:57 pm I changed the 13 to 80
and the 15 to 100. Didn't change anything?
That won't work if your video length in only 30 sec, 80 and 100 is way past that point! But redownload the rbz, the error may have cause that. No need to re-export the model, just run Raylectron and load the ROF.
Your support team.
https://SoftByteLabs.com
User avatar
Support
Site Admin
Posts: 3025
Joined: Sun Oct 02, 2011 10:49 am

Re: New function in animator

Post by Support »

If you want, you can send me the distance from the start to the other runway intersection, then the distance from there to take off, and I'll set you the numbers?
Your support team.
https://SoftByteLabs.com
User avatar
GateGirl86
Posts: 845
Joined: Mon Oct 03, 2022 8:32 pm

Re: New function in animator

Post by GateGirl86 »

Yes I think that would help. Back soon
Image
"Come with me if you want to live."
Sarah Connor
User avatar
GateGirl86
Posts: 845
Joined: Mon Oct 03, 2022 8:32 pm

Re: New function in animator

Post by GateGirl86 »

From the nose wheel to the turning point is 68m. The length of the runway is 609m from that last point.

I should add, that realistically it should stop at about 30m to spool up the turbines, before starting the take off run. Probably for about 2 seconds in the video.
Image
"Come with me if you want to live."
Sarah Connor
User avatar
Support
Site Admin
Posts: 3025
Joined: Sun Oct 02, 2011 10:49 am

Re: New function in animator

Post by Support »

ok try this script...

Code: Select all

TurnAngle   := -90;   // Angle to make turn.
NoseUpAngle := 20;    // Take off angle.
FirstAcc    := 1.1;     // Initial acceleration in meters per seconds.
SecondAcc   := 8;     // Second acceleration in meters per seconds.

StartAcc1At := 1;     // When to start the initial acceleration.
EndAcc1At   := 8;     // When to stop the initial acceleration and remain at that speed.
StartDecAt  := 8;    // When to start deceleration
EndDecAt    := 20;    // When the deceleration will end to a stop.
TurnLeftAt  := 12;     // When to start rurning.
EndTurnAt   := 18;    // When to stop turning.
StartAcc2At := 22;    // When to start the second acceleration.
EndAcc2At   := 26;    // When to stop the second acceleration and remain at that speed.
StartGoUpAt := 26;    // When the nose should start to go up.
EndGoUpAt   := 30;    // When the nose should end going up and stay that way.

// end settings

Acc1 := Accelerate(FirstAcc, meters, StartAcc1At, EndAcc1At);
Dec1 := Accelerate(FirstAcc/2, meters, StartDecAt, EndDecAt);
Acc2 := Accelerate(SecondAcc, meters, StartAcc2At, EndAcc2At);

if sec < StartDecAt then
  py := acc1;

if (sec >= StartDecAt) and (sec <= EndDecAt) then begin
  py := acc1 - Dec1;
  if py < 0 then
    py := 0;
end;

yaw(TurnAngle, TurnLeftAt, EndTurnAt);

if (sec >= StartAcc2At) then
  py := Acc2;

Pitch(NoseUpAngle, StartGoUpAt, EndGoUpAt);
Your support team.
https://SoftByteLabs.com
User avatar
GateGirl86
Posts: 845
Joined: Mon Oct 03, 2022 8:32 pm

Re: New function in animator

Post by GateGirl86 »

:salute, oh, how long should I set the length at?
Image
"Come with me if you want to live."
Sarah Connor
User avatar
Support
Site Admin
Posts: 3025
Joined: Sun Oct 02, 2011 10:49 am

Re: New function in animator

Post by Support »

40 or more, mine was 40 sec, and with the following settings and your runway lengths, this is what I get...

Code: Select all

TurnAngle   := -90;   // Angle to make turn.
NoseUpAngle := 20;    // Take off angle.
FirstAcc    := 0.85;     // Initial acceleration in meters per seconds.
SecondAcc   := 8;     // Second acceleration in meters per seconds.

StartAcc1At := 1;     // When to start the initial acceleration.
EndAcc1At   := 8;     // When to stop the initial acceleration and remain at that speed.
StartDecAt  := 9.5;    // When to start deceleration
EndDecAt    := 23;    // When the deceleration will end to a stop.
TurnLeftAt  := 16;     // When to start rurning.
EndTurnAt   := 23;    // When to stop turning.
StartAcc2At := 27;    // When to start the second acceleration.
EndAcc2At   := 30;    // When to stop the second acceleration and remain at that speed.
StartGoUpAt := 28;    // When the nose should start to go up.
EndGoUpAt   := 40;    // When the nose should end going up and stay that way.

// end settings
Your support team.
https://SoftByteLabs.com
User avatar
Support
Site Admin
Posts: 3025
Joined: Sun Oct 02, 2011 10:49 am

Re: New function in animator

Post by Support »

To start with, set your viewport to HD from the list (top/right), More... / 16:9 / 1280x720 which is how I did this video, at 30 fps. It's much faster than full screen!
Your support team.
https://SoftByteLabs.com
User avatar
GateGirl86
Posts: 845
Joined: Mon Oct 03, 2022 8:32 pm

Re: New function in animator

Post by GateGirl86 »

That is just how I would like to start. :mrgreen:

But Huston, we have a problem.
eeeeek.jpg
eeeeek.jpg (261.32 KiB) Viewed 4087 times
Image
"Come with me if you want to live."
Sarah Connor
User avatar
Support
Site Admin
Posts: 3025
Joined: Sun Oct 02, 2011 10:49 am

Re: New function in animator

Post by Support »

:o :o :o :o :o What did you do or click prior to that???
Your support team.
https://SoftByteLabs.com
User avatar
Support
Site Admin
Posts: 3025
Joined: Sun Oct 02, 2011 10:49 am

Re: New function in animator

Post by Support »

Can you redownload it?
Your support team.
https://SoftByteLabs.com
User avatar
GateGirl86
Posts: 845
Joined: Mon Oct 03, 2022 8:32 pm

Re: New function in animator

Post by GateGirl86 »

The SKP file?
Image
"Come with me if you want to live."
Sarah Connor
User avatar
Support
Site Admin
Posts: 3025
Joined: Sun Oct 02, 2011 10:49 am

Re: New function in animator

Post by Support »

no, the RBZ
Your support team.
https://SoftByteLabs.com
User avatar
GateGirl86
Posts: 845
Joined: Mon Oct 03, 2022 8:32 pm

Re: New function in animator

Post by GateGirl86 »

Yes I think so.
Raylectron.rbz
(310.19 MiB) Downloaded 159 times
Image
"Come with me if you want to live."
Sarah Connor
User avatar
Support
Site Admin
Posts: 3025
Joined: Sun Oct 02, 2011 10:49 am

Re: New function in animator

Post by Support »

no no, I meant for you to download the RBZ from the link I sent you earlier because I updated it and you had a crash so I want to know if this new one is the same?
Your support team.
https://SoftByteLabs.com
Post Reply