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 »

It is set at one.

So if I were to save it in Draft and Simple Draft, that doesn't affect the quality?
Image
"Come with me if you want to live."
Sarah Connor
User avatar
Support
Site Admin
Posts: 3183
Joined: Sun Oct 02, 2011 10:49 am

Re: New function in animator

Post by Support »

The quality is what you see in the preview, when you save your render as an image, or as a video, the size and look is just as you see it in the viewport. The only thing that changes in the video is that it'll be smooth. The preview tries to make it in real time motion by skipping frames so it can be jumpy.
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 in draft, it's basically black and greys (for me it is) and not too much detail at all.
Image
"Come with me if you want to live."
Sarah Connor
User avatar
Support
Site Admin
Posts: 3183
Joined: Sun Oct 02, 2011 10:49 am

Re: New function in animator

Post by Support »

Yes, and that's the point...

1. Full render, Draft and Simple Draft are off.

2. Sun, Sky, Birds, Planets, Stars etc. all that has to do with the sky + reflections and transparencies, Draft mode on and Simple Draft off.

3. No sky, just basic render as you said, colored but no shadows, no reflections, transparencies, nothing. that's Draft and Simple Draft on, for speed to draw a frame.
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 guess I'll have to wait another...96 hours and 27 minutes then. Because I want this to be decent video. Not just a test.
Image
"Come with me if you want to live."
Sarah Connor
User avatar
Support
Site Admin
Posts: 3183
Joined: Sun Oct 02, 2011 10:49 am

Re: New function in animator

Post by Support »

Yes, but you should have mad a test one do you're not disappointed. That's what I do, I set it in full draft and 25% then save to video, if I like the way it moves, then I do full render and wait as I know it's going to be good. Did you see my post about the animation of the rings?

viewtopic.php?t=2016
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 »

Yep, and then just the same if I liked what there was, I'd still have to wait a 100 hours. And from memory, I think the last time I had that, the computer shut down before it got there. :cry:
Image
"Come with me if you want to live."
Sarah Connor
User avatar
Support
Site Admin
Posts: 3183
Joined: Sun Oct 02, 2011 10:49 am

Re: New function in animator

Post by Support »

but I think it's because of all the lights you have 119 of them so basically, one pass is 119 since it has to query each lights! Try it with the Artificial Lights off and you'll see how fast it'll be!

When I have lights, I always try to group those that are close and make it one light, like a group of 4 lights in a group and explode the 4 lights so the parent group is one light, that will bring down yours to 30 and it will be way faster to render, like 4 time faster.
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 would help. I'll stop the render and go back to SKP and fix that.
Image
"Come with me if you want to live."
Sarah Connor
User avatar
Support
Site Admin
Posts: 3183
Joined: Sun Oct 02, 2011 10:49 am

Re: New function in animator

Post by Support »

: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 »

Okay! :mrgreen: from 199 lights to 30 :lol:

Now is this possible? I've worked out exactly how long in RL this would take. The total time until it leaves the tarmac is 2'30" or close enough. Then add about 4 seconds until it completely disappears :salute
taxy path+time to take off.jpg
taxy path+time to take off.jpg (56.1 KiB) Viewed 25106 times
Image
"Come with me if you want to live."
Sarah Connor
User avatar
Support
Site Admin
Posts: 3183
Joined: Sun Oct 02, 2011 10:49 am

Re: New function in animator

Post by Support »

Absolutely possible, why do you think it may not be???
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 »

Thanks. I knew it would be, it's just getting the timing right. First path to corner turn is now 55m. Then to the stop and pause is about 40m. The take off run is 450m to lift off. So I'd need to know how to figure out the codes for the timing. :salute
Image
"Come with me if you want to live."
Sarah Connor
User avatar
Support
Site Admin
Posts: 3183
Joined: Sun Oct 02, 2011 10:49 am

Re: New function in animator

Post by Support »

You have to build it linearly. Think of this as events with timing. So, from the start, you know that you want it to go straight until the next event. So only work on that one first. You know that the Accelerate function is what you need to use, so...

py := Accelerate(2, meters, 0, 3);

will be your first line of code, only work on that one, change the numbers until it's where the next event will take place.

Now, you know that this function, after its time is up (in the example, at 3 seconds into the video) it will stop accelerating and keep a steady speed until the next event.

Once you have that done, concentrate on the seconds event, which is, to make it slow down at the intersection where it will be turning. So knowing that the current state of py is the last acceleration value that keeps it going at a steady speed, that you need to do the reverse to make it slow down, so...

d := accelerate(2, meters, 8, 20);

now, we use a variable called 'd' (you can name it anything else) that will store a new acceleration starting at 8 sec in this example, so you simply subtract that value from py so that the lower the number, the slower the object will be...

py := py - d;

or you can simply use...

py := py - accelerate(2, meters, 8, 22);

and all you have to do now is concentrate on this one, change the values so that it's good for the next event, which is to turn. Once you got it right, concentrate on the turn...

rz := Yaw(90, 12, 20);

negate the angle if it turns in the wrong direction, like -90 instead of 90. Now set these values to, again, until it's good for the next event.

If you need a pause here, you just need to start the next event at the time you want it. So if this next event is the full take off, after 10 seconds from the last event, which is 22, then...

py := Accelerate(7, meters, 32, 40);

So the above event will only take place at 32 seconds into the video and stop accelerating at 40 seconds.

Now, you decide the next events, like pitch nose up, how many degrees, when and for how long...

rx := Pitch(20, 45, 55);

this event will take place at 45 seconds into the video and stop at 55 sec where it will then be at 20 degrees and will stay that way and stay at the current speed until the video end.

I hope I'm making sense? :?:
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 »

Sort of. God I wish I had paid more attention in math and less in biology. :ugeek:

This was the code I had been using yesterday.

BlinkLight('emitter_blue_tailight', 2, 0, 999);
BlinkLight('emitter_stb_nav', 3, 0, 999);
BlinkLight('emitter_port_nav', 3, 0, 999);
BlinkLight('emitter_nav_light', 1, 0, 999);
TurnAngle := -90; // Angle to make turn.
NoseUpAngle := 25; // 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 := 11.5; // When to start rurning.
EndTurnAt := 17; // When to stop turning.
StartAcc2At := 26; // When to start the second acceleration.
EndAcc2At := 30; // When to stop the second acceleration and remain at that speed.
StartGoUpAt := 35; // When the nose should start to go up.
EndGoUpAt := 45; // 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);
Image
"Come with me if you want to live."
Sarah Connor
User avatar
Support
Site Admin
Posts: 3183
Joined: Sun Oct 02, 2011 10:49 am

Re: New function in animator

Post by Support »

There is no real math involved in this because it's all about when and for how long. The code you use is really generic and I would just use the way I just explained above instead, way easier and less lines of codes. Just keep your BlinkLight lines and just add the event after. So set your viewport at 25% and set both draft and simple draft so the rendering is fast for testing your lines of code. Then start with the first one as I explained, don't worry about lengths, orbit your model to view it more from the top so you can set your event to start/end at the right place, when you do, orbit back to where you want the camera to be, or use the undo camera icon. Let me guide you into it, just send me the code you have for the first event and tell me if it does what you want, then I'll tell you what for the next event which you tell me what it is.
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 have to wait a bit. At work right now. :salute
Image
"Come with me if you want to live."
Sarah Connor
User avatar
Support
Site Admin
Posts: 3183
Joined: Sun Oct 02, 2011 10:49 am

Re: New function in animator

Post by Support »

: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 »

Back for a bit. In the first line

py := Accelerate(2, meters, 0, 3);

it goes right off screen. At least it is going in the right direction.
Image
"Come with me if you want to live."
Sarah Connor
User avatar
Support
Site Admin
Posts: 3183
Joined: Sun Oct 02, 2011 10:49 am

Re: New function in animator

Post by Support »

That's because your acceleration of 2 is way too high, first sec it moves 2 meters, then next sec by 4, then next sec by 16 :lol:
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 »

changed to py := Accelerate(1, meters, 0, 2);

still the same? :?:
Image
"Come with me if you want to live."
Sarah Connor
User avatar
Support
Site Admin
Posts: 3183
Joined: Sun Oct 02, 2011 10:49 am

Re: New function in animator

Post by Support »

Have you tried 0.1 ?

and are you sure withing 2 seconds???
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 don't know and I am totally confused now. :cry:
Image
"Come with me if you want to live."
Sarah Connor
User avatar
Support
Site Admin
Posts: 3183
Joined: Sun Oct 02, 2011 10:49 am

Re: New function in animator

Post by Support »

ok, you have

py := Accelerate(1, meters, 0, 2);

which will make it accelerate immediately 1 meters per seconds for 2 seconds and then keep a steady speed.

It works fine on my end, what happens when you run it??
Your support team.
https://SoftByteLabs.com
User avatar
Support
Site Admin
Posts: 3183
Joined: Sun Oct 02, 2011 10:49 am

Re: New function in animator

Post by Support »

Let me ask, what is the length you want it to go and how long do you want it to take to travel that distance, and, when do you want it to start going?
Your support team.
https://SoftByteLabs.com
Post Reply