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 »

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, this one...

https://raylectron.com/Raylectron.rbz

Download and install it in Sketchup and let me know if you still have that Sketchup Bug Splash please :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 »

Huzzah! Its working! I'll see you tomorrow :salute :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 »

GateGirl86 wrote: Mon May 08, 2023 12:38 am Huzzah! Its working! I'll see you tomorrow :salute :mrgreen:
:D :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 »

Utterly brilliant and I tried out the code you gave me. At least the 302 turned onto the runway this time! :mrgreen:

Now, all I need to do is some minor adjustments. Turn about 5 m earlier. Pause for at least 2 secs (I didn't see if it really did that) and the take off run to be longer.

This is my start.
new runway2.png
new runway2.png (2.11 MiB) Viewed 5342 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 »

WOW this looks SOOOO GOOD, I can't wait to see that video :salute :salute :salute :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 »

Neither can I :mrgreen:

This is our current settings

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 := 18; // When the deceleration will end to a stop. (this was 20 initially)
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.



Changing this EndDecAt , will that make it turn just a little earlier?

As I see it in simple mode, does that reflect how quick it will be in the finished video?

Rolling speed for taxying is between 8 and 12 kmh. At the point immediately after turning into the main runway, as I am aiming for realism, I'd like it to stop there for 5 seconds. Then gradually start the take off, building up speed and finally lifting off just short of the 'no go' zone (the furthest end). Which means the angle will be slightly more.

We can talk about blinking lights later :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 »

"Changing this EndDecAt , will that make it turn just a little earlier?"

Not exactly, it will only make it stop at that time.

TurnLeftAt is what decide when it starts to turn, so you'll need to change that one too if you change EndDecAt, otherwise, it will turn while the 302 is stopped.

"As I see it in simple mode, does that reflect how quick it will be in the finished video?"

Yes because there is less things to render. I use that + make it 25% size so it's almost in real time and when I'm satisfied with the script, I put it back to normal size and remove the Simple mode just to see more details in the render and if I like it, then I remove Draft mode so it's in full render. For this kind of thing, I set the Samples Per Frames to one and 30 Frames per Second so it's nice and smooth on playback.

"I'd like it to stop there for 5 second..."

Then you need to change StartAcc2At and EndAcc2At and also StartGoUpAt and EndGoUpAt so they are at the proper timing. Make sure you video length is more than EndGoUpAt so it doesn't end prematurely.

For the blinking lights, you can simply insert that one line of code at the beginning, with the name of the material in single quotes, the BPS (blinks per seconds), start at 0 and end at your video length or before, or even set it to 999. If you have more than one material for light, just duplicate that line of code and change the material name.
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 »

This will take a while :lol: I'll get it though.

Did I miss the tutorial for the lights? I think I did. Which line of code was that?
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 »

I found it.

BlinkLight(LightID, bps, StartAt, EndAt) is used to blink/flash an emitter on and off at a specific rate per second (bps : blinks per second).

So how would that look like in code?
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 »

Code: Select all

BlinkLight(LightID, bps, StartAt, EndAt);
I started a tutorial...

viewforum.php?f=24
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 »

we posted at the same time :lol:

BlinkLight('emitter', 3, 0, 999);

that will make your lights with material named 'emitter' blink 3 times per seconds for the entire video length.
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'll add the lights once I'm happy with everything else :D

Though I still can't quite get the turn right. Red dots is current, blue is what I need.
taxy path.jpg
taxy path.jpg (43.97 KiB) Viewed 5333 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 »

ok, so it turns too far, so adjust these 2

from...

TurnLeftAt := 12; // When to start rurning.
EndTurnAt := 18; // When to stop turning.

to..

TurnLeftAt := 11.5; // When to start rurning.
EndTurnAt := 17.5; // When to stop turning.

They don't have to whole numbers, you can set 16,7453 seconds too not just 16 or 17.

Keep removing or adding fractions to get it to where you want it.
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 »

what you can also do is use the frame slider to get the 302 to where you want it, say, at 348 frame, then divide that number by your FPS to get the seconds od the Start or End.

So if your FPS = 30, then 348/30 = 11.6 so use 11.6 instead of 11 or 12.
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 »

Now, its in the right place. Although since adding the lights, at least in simple draft mode, it makes these jerky stop starts. Also the lift off, well it just goes to the end of the runway and then disappears. :lol:
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 »

"it makes these jerky stop starts"

what do you mean??
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 »

It stops every few metres before it moves again.
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 »

it only does that in the preview mode, not in the final saved video. That's why I suggested to make your viewport small, 25% to minimize the jumping of frames.
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 »

Ah, okay! :salute

When we create (save) the video, we stay in draft mode don't we?
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 »

That is up to you on how you set the render before saving as a video. If you go full screen and remove both Draft and Smple Draft, then it will be just as you see it, fully rendered. But if you leave it at 25% and in both, Draft and Simple Draft, then the video will be saved that way.
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 »

Rendering....100 hours to go. :lol:
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 »

:lol: :lol: :lol:

Don't make the video so big, set your viewport to HD (1280x768) and set your rendering Passes per Second to 1.
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 the size I have. Where do I set the rendering passes? I can't find that, and can I start over?
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 »

It's in the Animation settings, "Samples pre Frame" and it's only for when both Draft and Simple Draft are off.

If you have it at 25% size, Draft and Simple Draft, it should save the video very quick, like 10 min or less for 30 sec.
Your support team.
https://SoftByteLabs.com
Post Reply