Red Hong flyby

User avatar
Support
Site Admin
Posts: 3492
Joined: Sun Oct 02, 2011 10:49 am

Re: Red Hong flyby

Post by Support »

Let me explain the script...

Accelerate(x, 5000", 0, 1)

this will make the ship pickup speed starting at 0 sec and end at 1 sec, then, it stay at that speed indefinitely.

LookAt(6.8, 0, duration)

For the entire animation length, the camera will keep focus on the ship's axis.

MoveCamera(wy, -1200", 0, 8)

This one simply move the camera left so the ship doesn't "hit" the camera head on.

Orbit(-60, 6.8, 0)

This will follow and orbit the ship's axis to a maximum of 60 degrees within the time defined, which if from 6.8 sec to 0 sec, which does nothing.
Your support team.
https://SoftByteLabs.com
User avatar
BKilburn
Posts: 502
Joined: Sat Nov 29, 2014 7:09 pm

Re: Red Hong flyby

Post by BKilburn »

Support wrote: Thu Nov 09, 2023 11:40 pm ok, the Orbit is set to start at 6.8 sec and end at 0 sec, so that won't do anything at all, it's the same as deleting that line. When I run your script, it fly-by without stopping. The orbit is to rotate around the axis of the component, even as it moves. In my initial script, the ship appear to stop because the camera started to orbit the ship, then when it stopped orbiting, the ship appear to take off when in fact, the camera was simply left behind as the ship continue to move
Right. That was the limitation of the animatic. And animatic is only for roughing out a scene. Very rough. ;) No fault for trying to exactly emulate the animation exactly. It's a common communication problem in film and TV.

The video I've posted shows almost exactly the speed and instance involved. All I need is for the camera to rotate, keeping the ship in view at all times.

Imagine you are watching the ship approach and you turn to watch it as it passes and then disappears into the distance. I saw you do this in one of the first demos, but I can't remember how you did it. Everything I was trying to learn just before for summer I am now having to learn all over again after being ill.

We are "this" close to this being finished. Once we solve the camera rotation, it's render time!
User avatar
BKilburn
Posts: 502
Joined: Sat Nov 29, 2014 7:09 pm

Re: Red Hong flyby

Post by BKilburn »

The camera is not locking onto the axes. The axes is confirmed centered on the ship.

As you can see in the video, the camera rotates, but long after the ship has passed.
Last edited by BKilburn on Thu Nov 09, 2023 11:57 pm, edited 1 time in total.
User avatar
Support
Site Admin
Posts: 3492
Joined: Sun Oct 02, 2011 10:49 am

Re: Red Hong flyby

Post by Support »

BKilburn wrote: Thu Nov 09, 2023 11:49 pm
Support wrote: Thu Nov 09, 2023 11:40 pm ok, the Orbit is set to start at 6.8 sec and end at 0 sec, so that won't do anything at all, it's the same as deleting that line. When I run your script, it fly-by without stopping. The orbit is to rotate around the axis of the component, even as it moves. In my initial script, the ship appear to stop because the camera started to orbit the ship, then when it stopped orbiting, the ship appear to take off when in fact, the camera was simply left behind as the ship continue to move
Right. That was the limitation of the animatic. And animatic is only for roughing out a scene. Very rough. ;) No fault for trying to exactly emulate the animation exactly. It's a common communication problem in film and TV.

The video I've posted shows almost exactly the speed and instance involved. All I need is for the camera to rotate, keeping the ship in view at all times.

Imagine you are watching the ship approach and you turn to watch it as it passes and then disappears into the distance. I saw you do this in one of the first demos, but I can't remember how you did it. Everything I was trying to learn just before for summer I am now having to learn all over again after being ill.

We are "this" close to this being finished. Once we solve the camera rotation, it's render time!
On the Raylectron website, the demo video does that, but it does not rotate 360 around the ship, it's just a stationary camera that simply keep it's focus on the ship. But if you want the camera to rotate (orbit) 360 around the ship, it also need to follow the ship, that's what Orbit does, and LookAt simply stay stationary but keep the focus on the ship.
Your support team.
https://SoftByteLabs.com
User avatar
BKilburn
Posts: 502
Joined: Sat Nov 29, 2014 7:09 pm

Re: Red Hong flyby

Post by BKilburn »

I just need it to rotate left to right, centered on the ship.
User avatar
Support
Site Admin
Posts: 3492
Joined: Sun Oct 02, 2011 10:49 am

Re: Red Hong flyby

Post by Support »

BKilburn wrote: Thu Nov 09, 2023 11:55 pm The camera is not locking onto the axes. The axes is confirmed centered on the ship.
The line LookAt(6.8, 0, duration) does that. If you remove the Orbit line, do you get it to always focus on the ship?
Your support team.
https://SoftByteLabs.com
User avatar
Support
Site Admin
Posts: 3492
Joined: Sun Oct 02, 2011 10:49 am

Re: Red Hong flyby

Post by Support »

BKilburn wrote: Thu Nov 09, 2023 11:58 pm I just need it to rotate left to right, centered on the ship.
ok, but the ship is moving, so the Orbit can do that but then the ship appear to have stopped because the camera is following the ship. That's how the original script do it.
Your support team.
https://SoftByteLabs.com
User avatar
BKilburn
Posts: 502
Joined: Sat Nov 29, 2014 7:09 pm

Re: Red Hong flyby

Post by BKilburn »

Support wrote: Thu Nov 09, 2023 11:59 pm
BKilburn wrote: Thu Nov 09, 2023 11:55 pm The camera is not locking onto the axes. The axes is confirmed centered on the ship.
The line LookAt(6.8, 0, duration) does that. If remove the Orbit line, what do you get it to always focus on the ship?
Same thing. It does not rotate exactly with the passing. Ship goes out frame at frame 47 and does not appear again until frame 79.
User avatar
Support
Site Admin
Posts: 3492
Joined: Sun Oct 02, 2011 10:49 am

Re: Red Hong flyby

Post by Support »

BKilburn wrote: Fri Nov 10, 2023 12:03 am
Support wrote: Thu Nov 09, 2023 11:59 pm
BKilburn wrote: Thu Nov 09, 2023 11:55 pm The camera is not locking onto the axes. The axes is confirmed centered on the ship.
The line LookAt(6.8, 0, duration) does that. If remove the Orbit line, what do you get it to always focus on the ship?
Same thing. It does not rotate exactly with the passing. Ship goes out frame at frame 47 and does not appear again until frame 79.
ah, the ship passes right above the camera and Sketchup goes into a deadlock, that's why I had the line MoveCamera so the camera goes on the side instead.
Your support team.
https://SoftByteLabs.com
User avatar
Support
Site Admin
Posts: 3492
Joined: Sun Oct 02, 2011 10:49 am

Re: Red Hong flyby

Post by Support »

So let me try to visualize what you try to do, the camera is straight to the ship, so the ship will hit the camera, but as the ship comes forward, you want the camera to go left, then as the ship goes pass the camera, the camera goes back right, behind the ship, then show the other side of the ship as it vanish?
Your support team.
https://SoftByteLabs.com
User avatar
Support
Site Admin
Posts: 3492
Joined: Sun Oct 02, 2011 10:49 am

Re: Red Hong flyby

Post by Support »

or more like this one?

Your support team.
https://SoftByteLabs.com
User avatar
BKilburn
Posts: 502
Joined: Sat Nov 29, 2014 7:09 pm

Re: Red Hong flyby

Post by BKilburn »

I've put orbit back in.

Yes, but not at that height or angle. But yes, the camera perfectly follows the ship.
User avatar
Support
Site Admin
Posts: 3492
Joined: Sun Oct 02, 2011 10:49 am

Re: Red Hong flyby

Post by Support »

BKilburn wrote: Fri Nov 10, 2023 12:10 am I've put orbit back in.

Yes, but not at that height or angle. But yes, the camera perfectly follows the ship.
ok, so remove the Orbit and the MoveCamera, but in SU, make sure the camera is not in line with the ship's direction so that the ship pass by on the side of the camera rather than above it, the LookAt will follow the ship's axis for the entire duration of the animation (0, duration). So all you need is two lines, Accelerate and LookAt.
Your support team.
https://SoftByteLabs.com
User avatar
Support
Site Admin
Posts: 3492
Joined: Sun Oct 02, 2011 10:49 am

Re: Red Hong flyby

Post by Support »

IN this one, I kept the original script but removed the last 2 lines. I moved the camera to the left of the red axis and ran the animation...
Attachments
Video_2023-11-09_232328.mp4
(1.94 MiB) Downloaded 2860 times
Your support team.
https://SoftByteLabs.com
User avatar
BKilburn
Posts: 502
Joined: Sat Nov 29, 2014 7:09 pm

Re: Red Hong flyby

Post by BKilburn »

Support wrote: Fri Nov 10, 2023 12:20 am
BKilburn wrote: Fri Nov 10, 2023 12:10 am I've put orbit back in.

Yes, but not at that height or angle. But yes, the camera perfectly follows the ship.
ok, so remove the Orbit and the MoveCamera, but in SU, make sure the camera is not in line with the ship's direction so that the ship pass by on the side of the camera rather than above it, the LookAt will follow the ship's axis for the entire duration of the animation (0, duration). So all you need is two lines, Accelerate and LookAt.
Program crashed.

Hang on.
User avatar
BKilburn
Posts: 502
Joined: Sat Nov 29, 2014 7:09 pm

Re: Red Hong flyby

Post by BKilburn »

OK, back up. Still not following the ship.

Could this be an axis issue? Maybe I do not have the axis set correctly?
User avatar
Support
Site Admin
Posts: 3492
Joined: Sun Oct 02, 2011 10:49 am

Re: Red Hong flyby

Post by Support »

BKilburn wrote: Fri Nov 10, 2023 12:29 am OK, back up. Still not following the ship.

Could this be an axis issue? Maybe I do not have the axis set correctly?
You have it as the red axis to to be the forward direction of the ship, so it's going along the red line (the x axis) and it's going towards the camera. Right click the ship and select "Change axis" see if it's at the center of the ship's bounding box. If it is, then LookAt should follow it.

What's the script you now use? Can you take a short video of what it does so I can visualize it?
Your support team.
https://SoftByteLabs.com
User avatar
BKilburn
Posts: 502
Joined: Sat Nov 29, 2014 7:09 pm

Re: Red Hong flyby

Post by BKilburn »

Support wrote: Fri Nov 10, 2023 12:33 am
BKilburn wrote: Fri Nov 10, 2023 12:29 am OK, back up. Still not following the ship.

Could this be an axis issue? Maybe I do not have the axis set correctly?
You have it as the red axis to to be the forward direction of the ship, so it's going along the red line (the x axis) and it's going towards the camera. Right click the ship and select "Change axis" see if it's at the center of the ship's bounding box. If it is, then LookAt should follow it.

What's the script you now use? Can you take a short video of what it does so I can visualize it?
I'll send you the file.
User avatar
Support
Site Admin
Posts: 3492
Joined: Sun Oct 02, 2011 10:49 am

Re: Red Hong flyby

Post by Support »

Git it, the ship's position is much closer to the camera compared to the original, so the LookAt's easing has to change from 6.9 sec to about 2 sec because by the time the easing is done, the ship has already gone by. You can set the easing to 0 and the camera will center the ship immediately, not within 6.8 or 2 sec.
Your support team.
https://SoftByteLabs.com
User avatar
BKilburn
Posts: 502
Joined: Sat Nov 29, 2014 7:09 pm

Re: Red Hong flyby

Post by BKilburn »

OK, changed timing and now following the ship.

Now we have to get rid of the starting wobble.
Attachments
Red Hong small ship animation 2 animatic.mp4
(525.4 KiB) Downloaded 2869 times
User avatar
Support
Site Admin
Posts: 3492
Joined: Sun Oct 02, 2011 10:49 am

Re: Red Hong flyby

Post by Support »

:salute

LookAt(0, 0, duration) will do that.
Your support team.
https://SoftByteLabs.com
User avatar
BKilburn
Posts: 502
Joined: Sat Nov 29, 2014 7:09 pm

Re: Red Hong flyby

Post by BKilburn »

Support wrote: Fri Nov 10, 2023 12:57 am :salute

LookAt(0, 0, duration) will do that.
We're almost there. Have to stop for the night. Thanks again! :salute
User avatar
Support
Site Admin
Posts: 3492
Joined: Sun Oct 02, 2011 10:49 am

Re: Red Hong flyby

Post by Support »

BKilburn wrote: Fri Nov 10, 2023 12:58 am
Support wrote: Fri Nov 10, 2023 12:57 am :salute

LookAt(0, 0, duration) will do that.
We're almost there. Have to stop for the night. Thanks again! :salute
:salute Good night :)
Your support team.
https://SoftByteLabs.com
User avatar
Support
Site Admin
Posts: 3492
Joined: Sun Oct 02, 2011 10:49 am

Re: Red Hong flyby

Post by Support »

and for the same animation in Raylectron, just click on "Build basic script" and you should have something like this and all you have to do is fill in the 2 lines (Accelerate and Look)...

Code: Select all

// declare objects to use
uses
  'sonic';

// Set default unit of measurements
SetUnits(Feet);
SetAngleUnits(Degree);

if FirstPass then
begin
  // write initialization code here
end;

case object of

  'sonic':
    begin
      // write your object's code here
      Accelerate(px, 500, 0, 1);
      Look;
    end;

end;
Your support team.
https://SoftByteLabs.com
User avatar
BKilburn
Posts: 502
Joined: Sat Nov 29, 2014 7:09 pm

Re: Red Hong flyby

Post by BKilburn »

How do I test this in Raylectron?
Post Reply