External View Selection
Moderators: winston, another_commander
- Redspear
- ---- E L I T E ----
- Posts: 2809
- Joined: Thu Jun 20, 2013 10:22 pm
- Location: On the moon Thought, orbiting the planet Ignorance, looking through a telescope with the lens cap on
External View Selection
Typically, a ship has several predefined external viewpoints, accessed and cycled through by pressing the 'v' key.
Might it be better if they could also operate in a fashion similar to internal views?
e.g. v+1 = 1st external view, v+2 = 2nd external view etc.
I appreciate that external views are not necessarily as consistent or predictable as their internal counterparts but cycling through 'v' has been a (very minor) annoyance since I first discovered this game.
Might it be better if they could also operate in a fashion similar to internal views?
e.g. v+1 = 1st external view, v+2 = 2nd external view etc.
I appreciate that external views are not necessarily as consistent or predictable as their internal counterparts but cycling through 'v' has been a (very minor) annoyance since I first discovered this game.
-
- Quite Grand Sub-Admiral
- Posts: 6821
- Joined: Wed Feb 28, 2007 7:54 am
Re: External View Selection
Would it not be much better if we could use the mouse to rotate the camera around the ship on any external view? This requires some wild quaternion math, but I had this idea of selecting mouse external freelook mode by, say, toggling Caps Lock On while in external view (we did put the functionality in to be used after all) and then moving the mouse up/down to position the camera along a reference meridian, or roll left/right to rotate the equator of a sphere with radius equal to that specified by the external view. The camera would move along the sphere's equator using something like Shift+mouse left/right or the yaw controls and would be oriented in a way so as to always face the ship. Mousewheel could be used to adjust the radius of the sphere on which the camera is moving on or, in other words, the camera distance from the ship we are observing.
This is what I would imagine it would look like (random image fished from the internet used for example purposes). The equator and meridian where the camera moves are defined by its starting position. By rolling the camera, the thing would look like in the second image. This way we would be able to put the camera wherever we want and get some glorious views of our ship.

With Caps Lock Off, we could keep things the way they are now, i.e. control and move the ship in external view as usual.
This is just all ideas at this moment, with no actual timeframe for implementation (need to mentally prepare before attempting a dive into the kind of maths behind it
), but I thought I'd just throw it here, since the subject of external views was brought up.
This is what I would imagine it would look like (random image fished from the internet used for example purposes). The equator and meridian where the camera moves are defined by its starting position. By rolling the camera, the thing would look like in the second image. This way we would be able to put the camera wherever we want and get some glorious views of our ship.


With Caps Lock Off, we could keep things the way they are now, i.e. control and move the ship in external view as usual.
This is just all ideas at this moment, with no actual timeframe for implementation (need to mentally prepare before attempting a dive into the kind of maths behind it

- Norby
- ---- E L I T E ----
- Posts: 2577
- Joined: Mon May 20, 2013 9:53 pm
- Location: Budapest, Hungary (Mainly Agricultural Democracy, TL10)
- Contact:
Re: External View Selection
What I missing is a zoom function in external views, etiher by mousewheel or pgup/down. This need vectors only:
Code: Select all
camera.position = ship.position.add(view_position_in_shipdata.multiply(1/zoom));
- pagroove
- ---- E L I T E ----
- Posts: 3035
- Joined: Wed Feb 21, 2007 11:52 pm
- Location: On a famous planet
Re: External View Selection
I like your thinking Another_Commander
.
A freely movable external view would be very cool. Also for making video's.

A freely movable external view would be very cool. Also for making video's.
For P.A. Groove's music check
https://soundcloud.com/p-a-groove
Famous Planets v 2.7. (for Povray)

https://bb.oolite.space/viewtopic.php?f=4&t=13709
https://soundcloud.com/p-a-groove
Famous Planets v 2.7. (for Povray)

https://bb.oolite.space/viewtopic.php?f=4&t=13709
Re: External View Selection
There's an external_views branch up on github. In an external view switch on caps lock, then roll/pitch/yaw using the keyboard to rotate the view and page up/down to zoom in and out. There's an obvious glitch in that the ship suddenly jumps from somewhere near the bottom of the screen to the middle when you start rotating around, and a_c will probably find another half dozen things I've missed.
-
- Quite Grand Sub-Admiral
- Posts: 6821
- Joined: Wed Feb 28, 2007 7:54 am
Re: External View Selection
Hot damn! This is exactly what I was imagining! And it was done in just a few hours! Mr. Digital Sorcerer, my compliments. Well done.
I was planning to hit bed early tonight, but no no no, not after this...
Built the branch, played with it a bit (you can bet it will be a while with the new toy) and first impressions are excellent. I love the fact that pausing the game does not affect the view manipulation and you can still move around the scene in stop-time. The only little glitch that I found, apart from the already mentioned jump, was that when the camera is very close to the model, it sometimes clips through it as it rotates. I guess this could be maybe solved by adjusting the minimum distance to something like half of that of the model's largest dimension?
Also, I think it would be great if mouse could also be used for moving the camera, as an alternative to keyboard. Mousewheel should definitely be set to the zoom in/out, but these are just fine tuning details that can be taken care of in due time. The big part of the work is already here and boy is it looking good!
I predict some awesome screenies appearing once this hits master.
I was planning to hit bed early tonight, but no no no, not after this...

Built the branch, played with it a bit (you can bet it will be a while with the new toy) and first impressions are excellent. I love the fact that pausing the game does not affect the view manipulation and you can still move around the scene in stop-time. The only little glitch that I found, apart from the already mentioned jump, was that when the camera is very close to the model, it sometimes clips through it as it rotates. I guess this could be maybe solved by adjusting the minimum distance to something like half of that of the model's largest dimension?
Also, I think it would be great if mouse could also be used for moving the camera, as an alternative to keyboard. Mousewheel should definitely be set to the zoom in/out, but these are just fine tuning details that can be taken care of in due time. The big part of the work is already here and boy is it looking good!
I predict some awesome screenies appearing once this hits master.
Re: External View Selection
I completely planned it that way, of course. Ahem.another_commander wrote:I love the fact that pausing the game does not affect the view manipulation and you can still move around the scene in stop-time.
I've removed the jump, but I'm not sure I've done it the best way as the view rotates around a point in space above the ship. I'm not sure what else to do though.
If you move to a side view and pan the camera up and down, there's some nasty flickering, which I think is a lighting bug somewhere else in core that occurs if the camera has a z-coordinate of exactly zero. I'll dig into that.
Feel free to play with the controls. And thanks for the comments!
-
- Quite Grand Sub-Admiral
- Posts: 6821
- Joined: Wed Feb 28, 2007 7:54 am
Re: External View Selection
This is a little example of the new toy. All three images below are the exact same scene, taken from different angles using the rotating camera.



Not bad at all... One thing that I believe would be a nice to have, would be possibility to pan the camera slightly left/right/up/down. Doesn't need to be much, just a bit so that the ship we are rotating around could be maybe positioned also towards the edges of the screen. But that's not something urgent (or even a requirement), of course.
I may try to play a bit with controls tomorrow, if I can get a chance. For now, good stuff and well done.



Not bad at all... One thing that I believe would be a nice to have, would be possibility to pan the camera slightly left/right/up/down. Doesn't need to be much, just a bit so that the ship we are rotating around could be maybe positioned also towards the edges of the screen. But that's not something urgent (or even a requirement), of course.
I may try to play a bit with controls tomorrow, if I can get a chance. For now, good stuff and well done.
- Norby
- ---- E L I T E ----
- Posts: 2577
- Joined: Mon May 20, 2013 9:53 pm
- Location: Budapest, Hungary (Mainly Agricultural Democracy, TL10)
- Contact:
Re: External View Selection
collisionRadius?another_commander wrote:when the camera is very close to the model, it sometimes clips through it as it rotates. I guess this could be maybe solved by adjusting the minimum distance to something like
- Norby
- ---- E L I T E ----
- Posts: 2577
- Joined: Mon May 20, 2013 9:53 pm
- Location: Budapest, Hungary (Mainly Agricultural Democracy, TL10)
- Contact:
Re: External View Selection
I think shaders switch between a dark and a light mode. A workaround if you skip a little angle around 0 (I do the same in Gallery OXP), a solution if somebody with shader knowledge define the border a bit away from 0 (I prefer the lighter mode for an extra 1 degree). Would be even better in addition if could make more light levels than the current 2.kanthoney wrote:If you move to a side view and pan the camera up and down, there's some nasty flickering, which I think is a lighting bug somewhere else in core that occurs if the camera has a z-coordinate of exactly zero.
- phkb
- Impressively Grand Sub-Admiral
- Posts: 5109
- Joined: Tue Jan 21, 2014 10:37 pm
- Location: Writing more OXPs, because the world needs more OXPs.
Re: External View Selection
This. Looks. Awesome.another_commander wrote:This is a little example of the new toy.


- Redspear
- ---- E L I T E ----
- Posts: 2809
- Joined: Thu Jun 20, 2013 10:22 pm
- Location: On the moon Thought, orbiting the planet Ignorance, looking through a telescope with the lens cap on
Re: External View Selection
Er, yeah, that'll do
Looks really good. Nice work chaps

Looks really good. Nice work chaps

-
- Quite Grand Sub-Admiral
- Posts: 6821
- Joined: Wed Feb 28, 2007 7:54 am
Re: External View Selection
Just noticed something while testing the feature on a lower-end PC. The camera rotates pretty nice and fast while the framerate is high, but it slows down quite a bit if the framerate drops. This is most likely because the movement functions do not take delta_t into account. I think we need to introduce it in a fashion similar to what we have for standard control input, in order to ensure that the game still runs at a normal pace, even when fps drops.
I didn't realize this during yesterday's testing, because the computer I was using had an NVidia that was running the game at 60 fps steady.
I didn't realize this during yesterday's testing, because the computer I was using had an NVidia that was running the game at 60 fps steady.
Re: External View Selection
Camera panning added (use shift and arrow keys).
- Griff
- Oolite 2 Art Director
- Posts: 2495
- Joined: Fri Jul 14, 2006 12:29 pm
- Location: Probably hugging his Air Fryer
Re: External View Selection
Wow, that is excellent! Fantastic work!
Wiki homepage for my OXP: http://wiki.alioth.net/index.php/Griff_Industries