Raylectron v5.2 animator

Raylectron (https://Raylectron.com) is a 3D rendering engine for Trimble Sketchup (https://sketchup.com)
User avatar
Support
Site Admin
Posts: 3183
Joined: Sun Oct 02, 2011 10:49 am

Re: Raylectron v5.2 animator

Post by Support »

Just click the Stop icon, or when the playback is over, it goes back to the beginning.
Your support team.
https://SoftByteLabs.com
User avatar
GateGirl86
Posts: 845
Joined: Mon Oct 03, 2022 8:32 pm

Re: Raylectron v5.2 animator

Post by GateGirl86 »

:salute Now why didn't I see that :mrgreen:
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: Raylectron v5.2 animator

Post by Support »

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

Re: Raylectron v5.2 animator

Post by GateGirl86 »

I'm trying to make my first. And, well I don't even know how to begin.
screen grab.jpg
screen grab.jpg (361.94 KiB) Viewed 105564 times
What I'd like to do, is start at this point, move forward and make a slow turn to starboard, then move to the right a distance, keeping the camera view on the side of the ship. Then have it turn to port and go back heading in that direction. It'd sort of be a long 'S' path. I'm thinking about 30 seconds.
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: Raylectron v5.2 animator

Post by Support »

but if the camera stands on the side of the ship, you won't see anything move except the background!
Your support team.
https://SoftByteLabs.com
User avatar
GateGirl86
Posts: 845
Joined: Mon Oct 03, 2022 8:32 pm

Re: Raylectron v5.2 animator

Post by GateGirl86 »

What I meant was to be exact, the clip would see the ship passing from right to left after it made the second turn
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: Raylectron v5.2 animator

Post by Support »

did you mean to keep the camera position where it's at but kind of follow the ship? Right now, the camera is only going from scene to scene, but, I could make the script to take in camera position and rotation too, not just for object.

But first, to make the ship go forward, you first need to know the front/back axis, if it x, y or z? In Sketchup, if the ship is front/back is along the green line, it's on the y axis. I can't see the axis in your screen shot.
Your support team.
https://SoftByteLabs.com
User avatar
GateGirl86
Posts: 845
Joined: Mon Oct 03, 2022 8:32 pm

Re: Raylectron v5.2 animator

Post by GateGirl86 »

I'll take another screen cap later. Right now I have to head for work. See you soon and have a great weekend. :salute :mrgreen:
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: Raylectron v5.2 animator

Post by Support »

ok, you too <3 :salute
Your support team.
https://SoftByteLabs.com
User avatar
GateGirl86
Posts: 845
Joined: Mon Oct 03, 2022 8:32 pm

Re: Raylectron v5.2 animator

Post by GateGirl86 »

On a break. 5 mins :lol:

something like this. Although at the end I'd like it to go up and disappear I guess.
DD-100.mp4
(392.71 KiB) Downloaded 1083 times
Also, can we still use the animator in the old way?
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: Raylectron v5.2 animator

Post by Support »

First, go in Draft Mode and also in Simple Draft mode so it's much faster to update the viewport.

ok, so you know RGB = XYZ so the ship is pointing along the Y axis (the Green line), so to make it move forward...

py := cf;

that will make it move one inch per frames and if it's too slow use py := 5*cf; or 10 or whatever, but for now, use nay numbers that you can see it go.

Lets try that for now and see what you get before writing more of the script to make sure that one step works at least?
Your support team.
https://SoftByteLabs.com
User avatar
Support
Site Admin
Posts: 3183
Joined: Sun Oct 02, 2011 10:49 am

Re: Raylectron v5.2 animator

Post by Support »

What do you mean by "can we still use the animator in the old way?"?
Your support team.
https://SoftByteLabs.com
User avatar
GateGirl86
Posts: 845
Joined: Mon Oct 03, 2022 8:32 pm

Re: Raylectron v5.2 animator

Post by GateGirl86 »

I'll do that on Monday.

The way we did it previously without the script. Just curious. See ya. :salute :mrgreen:
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: Raylectron v5.2 animator

Post by Support »

Yes it works like the old one too, just enable the Camera in the Animation settings and create your scenes according to the camera view.

Have a great weekend, that means no Sam till Monday :(
Your support team.
https://SoftByteLabs.com
Okwa
Posts: 639
Joined: Mon Feb 27, 2023 1:34 am

Re: Raylectron v5.2 animator

Post by Okwa »

I need a tip for a motion animation time delay. Because, my days in computer science class were quite long ago. :D
Let's start with something simple.:
Let's say a four second video. A vehicle drives into the picture (first two seconds), then a second vehicle drives out of the picture (last two seconds). How do I tell Raylectron "move vehicle for 2 seconds, then stop" and "do not move vehicle for 2 seconds, then move vehicle"?

P.S. And acceleration. What is the command code for accelerate?
Okwa
Posts: 639
Joined: Mon Feb 27, 2023 1:34 am

Re: Raylectron v5.2 animator

Post by Okwa »

A little more complex and better quality this time.
The video shows the take-off of an F-236 "Shaka" fighter from the flight deck of an Enterprise-Class aircraft carrier of the MNC.

https://www.deviantart.com/okwa/art/Ani ... -958351015
User avatar
Support
Site Admin
Posts: 3183
Joined: Sun Oct 02, 2011 10:49 am

Re: Raylectron v5.2 animator

Post by Support »

The variable cf holds the current frame in FPS, if you want ship 1 to stop at 2 seconds then use...

Code: Select all

// Ship 1
if (cf/fps) < 2 then
  py := cf
else
  py := 2*fps;
and the script for ship 2 to start going after 2 seconds...

Code: Select all

// Ship 2
if (cf/fps) < 2 then
  py := 0
else
  py := cf - 2*fps;
and for acceleration...

Code: Select all

acc := 12/fps; // 12 inches per seconds per frames.
py := 0.5 * acc * power(cf, 2);
Good job on the video :salute
Your support team.
https://SoftByteLabs.com
User avatar
Support
Site Admin
Posts: 3183
Joined: Sun Oct 02, 2011 10:49 am

Re: Raylectron v5.2 animator

Post by Support »

Also, you need to remember that if for example, you want ship 2 to start moving after 2 seconds, you need to subtract 2*fpf from its value, otherwise, it will jump from 0 inches to 2*fps inches in one frame, not incremental.

Code: Select all

 // wrong
if (cf/fps) >= 2 then
  py := cf;

 // correct
if (cf/fps) >= 2 then
  py := cf - 2*fps;
Your support team.
https://SoftByteLabs.com
User avatar
Support
Site Admin
Posts: 3183
Joined: Sun Oct 02, 2011 10:49 am

Re: Raylectron v5.2 animator

Post by Support »

and here is another to stop acceleration after 4 seconds. It may look complicated but it's not. All we have to do is find out how the distance at 2 sec and the velocity at the previous frame...

Code: Select all

acc    := 12/fps; // acceleration of 1 foot (12 inches) per seconds.
StopAt := 4*fps;   // when to stop accelerating.
if cf >= StopAt then begin
  dist := 0.5 * acc * power(StopAt, 2);
  veloc := acc * (StopAt-1);
  py := veloc * (cf-StopAt) + dist;
end else
  py := 0.5 * acc * power(cf, 2);
Your support team.
https://SoftByteLabs.com
User avatar
GateGirl86
Posts: 845
Joined: Mon Oct 03, 2022 8:32 pm

Re: Raylectron v5.2 animator

Post by GateGirl86 »

Wow! @Okwa that is so cool!
Support wrote: Fri Apr 14, 2023 7:07 pm Yes it works like the old one too, just enable the Camera in the Animation settings and create your scenes according to the camera view.

Have a great weekend, that means no Sam till Monday :(
Awesome! I just wanted to do something simple :mrgreen:
Image
"Come with me if you want to live."
Sarah Connor
Okwa
Posts: 639
Joined: Mon Feb 27, 2023 1:34 am

Re: Raylectron v5.2 animator

Post by Okwa »

Many thanks for the explanations.
Now I really feel transported back to my computer science lessons. :D
User avatar
Support
Site Admin
Posts: 3183
Joined: Sun Oct 02, 2011 10:49 am

Re: Raylectron v5.2 animator

Post by Support »

Okwa wrote: Mon Apr 17, 2023 10:23 am Many thanks for the explanations.
Now I really feel transported back to my computer science lessons. :D
You're welcome :salute

Must be a good feeling to be back in the good o'l days :D
Your support team.
https://SoftByteLabs.com
User avatar
GateGirl86
Posts: 845
Joined: Mon Oct 03, 2022 8:32 pm

Re: Raylectron v5.2 animator

Post by GateGirl86 »

Greetings from sunny Townsville. Yes we're moving about some :mrgreen:

I did manage to make a wee little vid. It was all of 2 secs long :lol: I've slowed it down in Video Editor, but how do I make it much slower animator?
DD100_new.mp4
(2.22 MiB) Downloaded 1067 times
and how do I make it say, going from right to left of screen?
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: Raylectron v5.2 animator

Post by Support »

Lucky you, only about 200k people living there, nice place :)

use rz := cf; and that will make it turn because rz is the up/dn axis that you'll rotate on, if the wrong way, use rz := -cf; instead.

nice video tho :)

I'm working of making the script even more easy. Instead of calculating according to cf, it will be incremental, much easier than using *cf all the time to keep track, now, you just add or remove according to the elapsed time, so if you want the ship to slowly turn right 30 deg after 2 sec, then you just add 30/fps for the next 2 sec then add nothing after. You'll see an example when I'm done, tomorrow that is :)
Your support team.
https://SoftByteLabs.com
User avatar
GateGirl86
Posts: 845
Joined: Mon Oct 03, 2022 8:32 pm

Re: Raylectron v5.2 animator

Post by GateGirl86 »

I wish we had time to see the sights though.

I actually made that with the old animator, I wasn't game to try and use the new one as yet given my snail like computer. So my question was, how do I slow the frames down? As I said, the original clip was barely 2 seconds. :o

Or should I be game enough to start using the new one? I don't even know where to start?
Image
"Come with me if you want to live."
Sarah Connor
Post Reply