Issue with moving exhausts
Moderators: winston, another_commander, Getafix
- phkb
- Impressively Grand Sub-Admiral
- Posts: 4830
- Joined: Tue Jan 21, 2014 10:37 pm
- Location: Writing more OXPs, because the world needs more OXPs.
Issue with moving exhausts
Before I log an issue in GitHub, I thought it might be useful to post this here first to hopefully gain some more info.
Issue with moving exhausts in Oolite 1.91
In the above video, I using an external view of a ship that has four exhaust trails, none of which are on the central axis. I move around to view the ship side-on, and then rotate around the ship. Watch the positioning of the exhausts - you'll see them move out and away from the ship, and then back in again as the rotation continues.
I've tested this on the ship in the video and the PitViper MarkII, and both exhibit the same behaviour.
First off, has anyone else noticed something like this before? Second, if you have a ship in your fleet with non-centered exhausts, do you see the same effect when you reproduce the viewing angles from the video? Any information could be useful.
(FYI, the ship in the video is a updated version of the Draven Gunship).
Issue with moving exhausts in Oolite 1.91
In the above video, I using an external view of a ship that has four exhaust trails, none of which are on the central axis. I move around to view the ship side-on, and then rotate around the ship. Watch the positioning of the exhausts - you'll see them move out and away from the ship, and then back in again as the rotation continues.
I've tested this on the ship in the video and the PitViper MarkII, and both exhibit the same behaviour.
First off, has anyone else noticed something like this before? Second, if you have a ship in your fleet with non-centered exhausts, do you see the same effect when you reproduce the viewing angles from the video? Any information could be useful.
(FYI, the ship in the video is a updated version of the Draven Gunship).
- hiran
- Theorethicist
- Posts: 2403
- Joined: Fri Mar 26, 2021 1:39 pm
- Location: a parallel world I created for myself. Some call it a singularity...
Re: Issue with moving exhausts
TBH I cannot see an issue there.
The ship's back is quite dark so you do not see it. But looking at it's shape I can see the background exhausts following the ship conture where they are obstructed so it is ok for me.
I am using the Imperial Courier and do not see issues there as well.
The ship's back is quite dark so you do not see it. But looking at it's shape I can see the background exhausts following the ship conture where they are obstructed so it is ok for me.
I am using the Imperial Courier and do not see issues there as well.
Sunshine - Moonlight - Good Times - Oolite
- phkb
- Impressively Grand Sub-Admiral
- Posts: 4830
- Joined: Tue Jan 21, 2014 10:37 pm
- Location: Writing more OXPs, because the world needs more OXPs.
Re: Issue with moving exhausts
If you watch the point where the exhausts meet the ship, you should see a pronounced gap develop and then disappear again as the view moves around the ship.
Stop the video at 0:34 and you should see the closest exhaust to you has a gap between where it starts and where the ship is.
You'll also see the exhausts going out of alignment with the engine nacelles as you go around.
Stop the video at 0:34 and you should see the closest exhaust to you has a gap between where it starts and where the ship is.
You'll also see the exhausts going out of alignment with the engine nacelles as you go around.
- phkb
- Impressively Grand Sub-Admiral
- Posts: 4830
- Joined: Tue Jan 21, 2014 10:37 pm
- Location: Writing more OXPs, because the world needs more OXPs.
Re: Issue with moving exhausts
Maybe this video demonstrates the issue better. The view is close to the ship, I've turned the ambient level up to max, and I stop rotating around the ship when the effect is at it's worst.
Youtube Moving Exhausts demonstration 2
Youtube Moving Exhausts demonstration 2
- hiran
- Theorethicist
- Posts: 2403
- Joined: Fri Mar 26, 2021 1:39 pm
- Location: a parallel world I created for myself. Some call it a singularity...
Re: Issue with moving exhausts
Cannot see that image. But looking again - yes there is something. Much smaller than I had expected when watching first time.
Remains the question whether it is a ship modeling issue or something from the Oolite core.
Sunshine - Moonlight - Good Times - Oolite
- phkb
- Impressively Grand Sub-Admiral
- Posts: 4830
- Joined: Tue Jan 21, 2014 10:37 pm
- Location: Writing more OXPs, because the world needs more OXPs.
Re: Issue with moving exhausts
Second video is clearer.
True. Core ships all have their exhausts located close to the center line. I suspect the effect is more pronounced the further they are away from the centre, so it's probably only really noticeable with OXP ships. As I mentioned, I have observed the effect in the PitViper Mark II, and on this ship I'm testing, so my guess would be the issue is in the core code, not an OXP.
Also, our control over exhausts is fairly minimal: we specify the x,y,z coords where it starts, and then the x,y of how big the exhaust is. There isn't anything else to mod.
- phkb
- Impressively Grand Sub-Admiral
- Posts: 4830
- Joined: Tue Jan 21, 2014 10:37 pm
- Location: Writing more OXPs, because the world needs more OXPs.
Re: Issue with moving exhausts
I'm guessing, because I haven't looked yet, but if the the Imperial Courier puts the starting point of the exhaust far enough into the nacelle, you won't see the effect. It would only be really evident if the exhaust start point is on the surface of the ship model.
-
- Quite Grand Sub-Admiral
- Posts: 6680
- Joined: Wed Feb 28, 2007 7:54 am
- Griff
- Oolite 2 Art Director
- Posts: 2483
- Joined: Fri Jul 14, 2006 12:29 pm
- Location: Probably hugging his Air Fryer
Re: Issue with moving exhausts
I think the point the laser beam is drawn from drifts a bit too if you rotate the camera in an external view, it's either that or the beam gets drawn after the model has been so it can appear on "top" of geometry it should be "behind" edit: ah what a_c said above with the example of the viper exhausts
Wiki homepage for my OXP: http://wiki.alioth.net/index.php/Griff_Industries
- phkb
- Impressively Grand Sub-Admiral
- Posts: 4830
- Joined: Tue Jan 21, 2014 10:37 pm
- Location: Writing more OXPs, because the world needs more OXPs.
Re: Issue with moving exhausts
I understand the z-ordering issue - that's tricky to fix. But I'm not 100% sure this issue is an example of that. The starting point for the exhausts appears to be changing (at least in the current view), which would mean the quaternion position is somehow changing, or isn't being translated correctly as the view changes. But it changes in a uniform way, and then migrates back to the original position. I'm suspecting a rounding issue somewhere - I had a quick look today but couldn't see anything immediately obvious. I'm going to have to put some debug points in the code to see if I can catch an error red handed.
- hiran
- Theorethicist
- Posts: 2403
- Joined: Fri Mar 26, 2021 1:39 pm
- Location: a parallel world I created for myself. Some call it a singularity...
Re: Issue with moving exhausts
If you get to some understanding of the code it would be nice if you could add comments - to make it easier in the future.phkb wrote: ↑Mon May 13, 2024 7:49 amI understand the z-ordering issue - that's tricky to fix. But I'm not 100% sure this issue is an example of that. The starting point for the exhausts appears to be changing (at least in the current view), which would mean the quaternion position is somehow changing, or isn't being translated correctly as the view changes. But it changes in a uniform way, and then migrates back to the original position. I'm suspecting a rounding issue somewhere - I had a quick look today but couldn't see anything immediately obvious. I'm going to have to put some debug points in the code to see if I can catch an error red handed.
Sunshine - Moonlight - Good Times - Oolite
-
- ---- E L I T E ----
- Posts: 675
- Joined: Sat Aug 09, 2014 4:16 pm
Re: Issue with moving exhausts
From the picture posted by a_c it doesn't seem to be a "z-order OpenGL issue", at least not the one that involved the need to render objects in a specific order, to properly handle transparency (if I remember correctly).
The missing exhaust trails seem to be intersected and occluded by the Cobra's body, mainly because the Viper is in a turn, and Cobra is crossing them. I am not even sure what would be the expected behavior here.
The missing exhaust trails seem to be intersected and occluded by the Cobra's body, mainly because the Viper is in a turn, and Cobra is crossing them. I am not even sure what would be the expected behavior here.
-
- Quite Grand Sub-Admiral
- Posts: 6680
- Joined: Wed Feb 28, 2007 7:54 am
Re: Issue with moving exhausts
I can assure you that the Cobra and the Viper in that shot are far apart enough to guarantee that there is no chance of one crossing the exhaust trails of the other. It is indeed a render bug, but it occurs only in external views and only after having rotated the camera.Commander_X wrote: ↑Tue May 14, 2024 2:59 pmThe missing exhaust trails seem to be intersected and occluded by the Cobra's body, mainly because the Viper is in a turn, and Cobra is crossing them. I am not even sure what would be the expected behavior here.
- hiran
- Theorethicist
- Posts: 2403
- Joined: Fri Mar 26, 2021 1:39 pm
- Location: a parallel world I created for myself. Some call it a singularity...
Re: Issue with moving exhausts
I would have expected the 3D rendering to be done the same for internal and external views. Only the hud and camera placement/movement should be different.another_commander wrote: ↑Tue May 14, 2024 3:20 pmI can assure you that the Cobra and the Viper in that shot are far apart enough to guarantee that there is no chance of one crossing the exhaust trails of the other. It is indeed a render bug, but it occurs only in external views and only after having rotated the camera.
So it is puzzling to see such effects only in the conditions you mention.
Is it possible to reproduce such a shot from an inside view? Or without having rotated the camera?
Sunshine - Moonlight - Good Times - Oolite