DockingBay problems - flying through the back wall

For test results, bug reports, announcements of new builds etc.

Moderators: winston, another_commander, Getafix

Post Reply
User avatar
Griff
Oolite 2 Art Director
Oolite 2 Art Director
Posts: 2479
Joined: Fri Jul 14, 2006 12:29 pm
Location: Probably hugging his Air Fryer

DockingBay problems - flying through the back wall

Post by Griff »

I thought i'd go back and revisit the Black Monk Monastery model from LittleBears Bank of the Black Monks oxp, just to add some shader effects and make the lights on the poles at the back appear to shine properly.
Anyway, i noticed the model was not properly centered on the Z axis and had been placed so that it's front face was very close to 0.0 on the Z axis, I remembered from the spacebar thread that this would cause problems with the box drawn around it when using the targetting system so i decided to re-center and re-export the model...
..now i remember why i'd placed the model off center originally, when trying to dock the player now flies through the back wall of the docking bay and some distance into the interior of the model before the docking rings appear, so i'm wondering if there's a fault with the model, or does Oolite have problems detecting docking bays if the stations model is too big in scale?
Looking at the docking bays entry in the subentity list of the station:

Code: Select all

<string>griff_station_bay     0 0 1150.0 1 0 0 0</string>
it's being offset by 1150.0 units, is this too much?
edit: Turns out it is, just moved the whole model back 700 uinits on z, re-exported into .dat format and into oolite and docking is working ok now - the bay is only being offset 450.0 units.

Another thing i noticed, is if i move the subentity entry for the docking bay further down the list so it appears after either a turret or a flasher, oolite gets problems positioning the bay subentity - it appears outside the station and rotating against the rotation of the station, see here - white arrow denotes docking bay:

Image
Image

eg - this is ok:
<key>subentities</key>
<array>
<string>griff_station_subents 0 0 0 1 0 0 0</string>
<string>griff_station_plates 0 0 0 1 0 0 0</string>
<string>griff_station_bay 0 0 1150.0 1 0 0 0</string>
<string>station_turret1 0 589.6975 1351.527 1 0 0 0</string>
<string>station_turret2 -589.6975 0 1351.527 1 0 0 -1</string>
<string>*FLASHER* -64.97 684.5685 1482.745 5 1 0 52</string>
</array>

this is bad and makes the griff_station_bay appear outside the station:
<key>subentities</key>
<array>
<string>griff_station_subents 0 0 0 1 0 0 0</string>
<string>griff_station_plates 0 0 0 1 0 0 0</string>
<string>station_turret1 0 589.6975 1351.527 1 0 0 0</string>
<string>station_turret2 -589.6975 0 1351.527 1 0 0 -1</string>
<string>griff_station_bay 0 0 1150.0 1 0 0 0</string>
<string>*FLASHER* -64.97 684.5685 1482.745 5 1 0 52</string>
</array>

Not sure if this is related to the docking bay problems being reported in the last few posts of the random hits thread, where there's reports of docking bays not appearing or being positioned where turrets should be?
I'm using oolite v 1.71.2
User avatar
Commander McLane
---- E L I T E ----
---- E L I T E ----
Posts: 9520
Joined: Thu Dec 14, 2006 9:08 am
Location: a Hacker Outpost in a moderately remote area
Contact:

Post by Commander McLane »

Shouldn't a docking-bay-subentity also always have "dock" as a part of its name? So griff_station_dock would be a better identifier than griff_station_bay?

And by the way, as there are dozens of griff_stations out there these days, wouldn't blackmonk_monastery_dock be even better? Or, for author-identification's sake, griff_blackmonk_monastery_dock?

And the same of course for the rest of the entities and subentities?

Just saying...
User avatar
Svengali
Commander
Commander
Posts: 2370
Joined: Sat Oct 20, 2007 2:52 pm

Post by Svengali »

Griff wrote:
Another thing i noticed, is if i move the subentity entry for the docking bay further down the list so it appears after either a turret or a flasher, oolite gets problems positioning the bay subentity - it appears outside the station and rotating against the rotation of the station,...
I'm not so sure that this is enough, Griff. While testing the problem with LBs SpacerBar I have moved the entry to the top of the subent-declaration - and it wasn't ok. Sometimes the docking slit was at the right position, but if I've came close to the station the slit switched between all turrets. Not always, but in an interval. Sometimes it was bind only to one turret (with an offset) and moved simultan with the turret. And a few times everything was fine - I could dock and start quite normal. And that wasn't only with LB's RandomHits. I've tested it with the Behemoth and even created a version with an older GRS-Factory.
Commander McLane wrote:
Shouldn't a docking-bay-subentity also always have "dock" as a part of its name? So griff_station_dock would be a better identifier than griff_station_bay?
If you use this way - I second that. It's a lot easier to identify for scripters. But you even don't need a subent at all :-)
User avatar
Griff
Oolite 2 Art Director
Oolite 2 Art Director
Posts: 2479
Joined: Fri Jul 14, 2006 12:29 pm
Location: Probably hugging his Air Fryer

Post by Griff »

sorry, for some reason i didn't notice there's been replies to this thread - i wasn't ignoring your advice!
<paranoid>
So is it just stations i've made that have these problems or are other oxp-ers station mis-behaving too?
</paranoid>
right, i've uploaded a test oxp for the blackmonk station here http://www.box.net/shared/3yhrjm9kwk
Good point about the naming of files & subentities, i've sorted that out in this download which seems to work OK on my system, the dock sits where it's supposed to and the turrets all work. It still messes up dock subentity placement if you move it's order in the subentity list - it ignores it's own specified positioning information and instead gets the placement of the previous subentity in the list (i think).

Please note, this isn't the full 'bank of the blackmonks' oxp, it's just a shader-ified version of the main monastery 'like_ship'-ed to a normal coriolis with a script to generate one near the player whenever he/she launches, to play oolite properly with this oxp installed would be very annoying, so visit this page on the wiki http://wiki.alioth.net/index.php/Black_Monk_Monastary for the full Black Monk experience
User avatar
Svengali
Commander
Commander
Posts: 2370
Joined: Sat Oct 20, 2007 2:52 pm

Post by Svengali »

Griff wrote:
<paranoid>
So is it just stations i've made that have these problems or are other oxp-ers station mis-behaving too?
</paranoid>
All dockable objects with turrets have this problem, so no need for antidepressiva or Disembodies mental fixatives. I have just installed your test version and the docking-slits bounding box was attached to one turret (no offset and no moves), but the docking has worked as intended on the intended place, very strange.
User avatar
Griff
Oolite 2 Art Director
Oolite 2 Art Director
Posts: 2479
Joined: Fri Jul 14, 2006 12:29 pm
Location: Probably hugging his Air Fryer

Post by Griff »

Thanks for testing that out Svengali, it's odd - on my system (windows XP - servicepack3) the docking bay is in the correct place when using that test oxp, if i move the dockingbay subentity down the list it 'pins' itself to the location of the subentity above it in the list with a slight offset along the -Z axis in the direction away from origin.
I don't think it's been reported as a bug so i'll add it.
User avatar
JensAyton
Grand Admiral Emeritus
Grand Admiral Emeritus
Posts: 6657
Joined: Sat Apr 02, 2005 2:43 pm
Location: Sweden
Contact:

Post by JensAyton »

This is probably caused by some rearrangement of the rendering code. The old code was… strange. Kaks and I caught some problems with turrets and other subentities behaving differently depending on order and whatnot, but we clearly didn’t fix all the cases.
User avatar
Commander McLane
---- E L I T E ----
---- E L I T E ----
Posts: 9520
Joined: Thu Dec 14, 2006 9:08 am
Location: a Hacker Outpost in a moderately remote area
Contact:

Post by Commander McLane »

Please remember there is also an issue with escorts having turrets.

So indeed it seems that turrets as such are somehow problematic and tend to cause strange problems.
User avatar
Lestradae
---- E L I T E ----
---- E L I T E ----
Posts: 3095
Joined: Tue Apr 17, 2007 10:30 pm
Location: Vienna, Austria

Turret Problem

Post by Lestradae »

The whole problem must have something to do with turrets.

Since 1.71 I noticed that the Leviathan when it appears in-game has the thing on the back on top and the blue exhaust graphics shoved backwards so that the main model flies in front and the top construction and blue exhaust "follow", with the side turrets also shoved back a bit and outwards.

I looked at an old picture of the Leviathan here on the forums and noticed that at the place on the ship where it gets taken apart graphically are two turrets ...

I think, in this case, instead of rewriting everything turret-related in all oxps, this should be fixed in the game.

See the Leviathan pic here:

Image

See the turret?
Post Reply