Outerra forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

Outerra Tech Demo download. Help with graphics driver issues

Pages: [1] 2

Author Topic: more viewpoint options  (Read 9845 times)

fly77

  • Outerra Master Modder
  • Hero Member
  • *****
  • Posts: 1755
more viewpoint options
« on: September 20, 2018, 06:07:19 am »

As a flightsimmer I'd like to see some more viewpoint options in outerra, such as flyby view mode and ability to move inside planes,vehicles, cockpit while airplane/vehicles are in motion.
Logged

2eyed

  • Sr. Member
  • ****
  • Posts: 352
  • newbie
Re: more viewpoint options
« Reply #1 on: September 20, 2018, 09:55:43 am »

If you use a VR hmd, you can literally physically move inside the cockpit.
Logged

fly77

  • Outerra Master Modder
  • Hero Member
  • *****
  • Posts: 1755
Re: more viewpoint options
« Reply #2 on: September 20, 2018, 11:45:09 am »

Interesting. Unfortunately I don't own any VR headset. Would be interesting though, making these capabilities accessible also via the keyboard/mouse or joystick.
« Last Edit: September 20, 2018, 12:49:52 pm by fly77 »
Logged

josem75

  • Sr. Member
  • ****
  • Posts: 286
  • newbie
Re: more viewpoint options
« Reply #3 on: September 20, 2018, 03:01:25 pm »

FlyBy would be nice in Outerra.  I have some Topic time ago where i put suggestions and some kind of flyby was one.
Logged

fly77

  • Outerra Master Modder
  • Hero Member
  • *****
  • Posts: 1755
Re: more viewpoint options
« Reply #4 on: September 20, 2018, 03:16:42 pm »

I actually just now discovered with great pleasure that when in an airplane (Cessna) by pressing CTRL+V you can switch between different viewpoints inside and outside the plane. Very nice ! Seems to work also on some vehicles (tatra truck) allthough with much fewer viewpoint choices. Would be nice to know if different viewpoints can be set in the javascript file of planes and vehicles.
« Last Edit: September 20, 2018, 03:30:08 pm by fly77 »
Logged

KW71

  • Outerra Developer
  • Hero Member
  • *****
  • Posts: 760
  • Love OT!
Re: more viewpoint options
« Reply #5 on: September 20, 2018, 05:38:59 pm »

I actually just now discovered with great pleasure that when in an airplane (Cessna) by pressing CTRL+V you can switch between different viewpoints inside and outside the plane. Very nice ! Seems to work also on some vehicles (tatra truck) allthough with much fewer viewpoint choices. Would be nice to know if different viewpoints can be set in the javascript file of planes and vehicles.

Perhaps you already aware, but pressing "c" lets you move the camera around, changing the distance with the scroll wheel... And yes, you can add more cameras in the script.
Logged
"A man who is contented with what he has done, will never become famous for what he will do".

fly77

  • Outerra Master Modder
  • Hero Member
  • *****
  • Posts: 1755
Re: more viewpoint options
« Reply #6 on: September 20, 2018, 06:54:24 pm »

Thanks. Would it be possible to create also a fly-by or drive-by  camera mode from within the javascript ? Is it possible to access the world coordinates of the vehicle/plane from within the javascript ? and then maybe use these to place a "temporary" fixed camera ?
Logged

KW71

  • Outerra Developer
  • Hero Member
  • *****
  • Posts: 760
  • Love OT!
Re: more viewpoint options
« Reply #7 on: September 20, 2018, 07:41:21 pm »

I don't know much about scripting (I should say "almost noghint"). But if what you want is to see your plane flying from outside, why not just press "c" and move the camera around?
Logged
"A man who is contented with what he has done, will never become famous for what he will do".

fly77

  • Outerra Master Modder
  • Hero Member
  • *****
  • Posts: 1755
Re: more viewpoint options
« Reply #8 on: September 20, 2018, 08:57:17 pm »

"fly-by" is when an observer sees the plane passing near him...such ad this .
I will try if i can move the camera in time from within the script trying to move her by the plane.
Logged

patmarrnc

  • Full Member
  • ***
  • Posts: 136
Re: more viewpoint options
« Reply #9 on: September 21, 2018, 08:59:39 am »

is it not already possible in the 2nd camera position (press C twice) to zoom out for the purpose of watching a vehicle drive or fly by? I rarely fly the aircraft, but this works with cars and watercraft.
Logged

fly77

  • Outerra Master Modder
  • Hero Member
  • *****
  • Posts: 1755
Re: more viewpoint options
« Reply #10 on: September 21, 2018, 09:44:46 am »

Which vehicle/plane you are using: For me double pressing C does nothing. It remain sthe same camera and that camera for me at least is outside but stationary with respect to the plane/vehicle. Not a fly-by/drive by.
« Last Edit: September 21, 2018, 09:48:33 am by fly77 »
Logged

patmarrnc

  • Full Member
  • ***
  • Posts: 136
Re: more viewpoint options
« Reply #11 on: September 21, 2018, 12:44:51 pm »

I think the reason why nothing happens when you press the C key is because you haven't changed your orientation yet for that camera view.

Camera view #1: first person driver's view, which is defined in the script

Camera view #2: Camera assumes whatever position you give it in absolute coordinates. I think this is what you want.  After spawning your vehicle, press C once, then scroll away with the mouse and scroll wheel.  Whatever view you create is the new #2 camera position.  In this view the world keeps its position, and the vehicle moves around in a stable world. So Camera 2 could be located wherever you want it as a plane flies past.

Camera view #3: This is like camera view #2, except instead of the camera maintaining an absolute origin in the world, the camera follows the vehicle.  In other words, the vehicle stays oriented the same way, and the world revolves around it (like the car avatar on a GPS screen).  Positioning camera #3 behind and above a vehicle is a good way to steer effectively.

Once you have established each of the 3 camera views, you can toggle between them by pressing C

You can also change the camera view with the scroll wheel and mouse in Camera view 2 or 3. In order to change camera view #1 you have to edit the script.

Logged

fly77

  • Outerra Master Modder
  • Hero Member
  • *****
  • Posts: 1755
Re: more viewpoint options
« Reply #12 on: September 21, 2018, 01:28:45 pm »

OK I understand what you mean  by clicking C repeatedly on the screen appear
1) first person
2) third person
3) third person follow
I can change the viewing distance and orientation for views 2) and 3) with the mouse+mousewheel.
I used this of course. But In any case for both views 2) and 3) the camera follows the vehicle...
what I'd like is to have a camera fixed to the ground and see the vehicle move by. That's not possibly with these 3 views.

I found a way achieve a drive-by camera by creating a "dynamic" first persion view camera in the vehicle reference system by the following code additions to the vehicle javascript file.


Code: [Select]
.....
var seat_cam = 0;
function switch_seat(cam)
{
if(cam===0)   seat_cam=0;   // driver seat
else if(cam===1)seat_cam=1;  // front wheel
else if(cam===2)seat_cam=2;  // rear wheel
      else if(cam===3)seat_cam=3;  // drive-by camera
      else return false;
return true;
}

var distance=0;
var flag=0;

....

function init_chassis()
{
...
}

...

function init_vehicle(){
.....
}

function update_frame(dt, engine, brake, steering)
{
....
if(seat_cam===0){
    flag=0;
    this.set_fps_camera_pos({x:-0.1,y:-0.90,z:1.50});
    }
  else if(seat_cam===1){
    flag=0;
    this.set_fps_camera_pos({x: -0.95, y:0.2, z:0.5});
    }
  else if(seat_cam===2){
    flag=0;
    this.set_fps_camera_pos({x:-0.45, y:-1, z:0.5});
    }
  else if(seat_cam===3){
    if (flag==0){
     
      distance=0;
      flag=1;
    }
    else{
      distance=distance+this.speed()*dt;
      this.set_fps_camera_pos({x:2, y:30-distance, z:0.8});
      if (distance>2*30){
        distance=0;
      }
    }
  }
...
}



Here is a very crappy video https://www.dropbox.com/s/pmvaolwe56uzd4d/bike-ride-by.mp4?dl=0 recorded with my smartphone as the inbuild video recording of outerra for the moment gives me problems.
You can see the desired drive-by effect and also the problems my solution has. At the end of the vedio as the bike drives towards sloped terrain the camera view woobles and goes below ground. This is because the z coordinate of the camera is defined relative to the vehicle reference system which wobbles and reproduces terrain slopes. Ideally the camera should be set fixed in absolute world coordinates at a fixed point but I don't know how to get the world coordinates of the vehicle and how to set a camera fixed in space at these coordinates - all in the javascript.
« Last Edit: September 21, 2018, 02:35:08 pm by fly77 »
Logged

patmarrnc

  • Full Member
  • ***
  • Posts: 136
Re: more viewpoint options
« Reply #13 on: September 21, 2018, 02:26:07 pm »

you can also change the camera's orientation in real time, facing right when the vehicle is to the right, then turning to face the vahiclas as it passes to your left.  It isn't the same as a fixed camera, but depending on your needs it might provide usable video footage.

Bu yeah, now that I see what you mean, I'd also like to see a 4th camera position that is fixed wherever we place it. The ability to capture any kind of motion as it passes by would be useful to me as an animator.  Good idea! 
Logged

fly77

  • Outerra Master Modder
  • Hero Member
  • *****
  • Posts: 1755
Re: more viewpoint options
« Reply #14 on: September 21, 2018, 02:40:10 pm »

I have added in the above note a video and a script that gives a drive-by camera that works, but only on reasonably flat (not too rough and not too sloped) ground. Sorry for the crappy video above. Here is a slightly better one that shows better the good things and the bad ones of my "workaround" solution.https://www.dropbox.com/s/e9lkvsg5r3rjp6r/bike-ride-by2.mp4?dl=0.
« Last Edit: September 21, 2018, 03:47:32 pm by fly77 »
Logged
Pages: [1] 2