Page 1 of 3

Carrier Docks

Posted: Sat Jan 21, 2012 3:46 am
by mandoman
I'm trying to get a dock to fit into place on a carrier I've designed, but it does not appear at the coordinates I got from matching it to the ship in Blender. The dock is hanging forward, to port, and it appears to jump from a point high, then low, and back, depending on what angle I approach the ship. I have been trying to follow the Wiki on making Oolite docks, but nothing I do will get that dock into place on the ship. I have another carrier I'm designing as well, so if I can't figure this out, the other carrier is probably a waste of time as well. Can any one please help me with this? Thanks.

Re: Carrier Docks

Posted: Sat Jan 21, 2012 8:04 am
by Killer Wolf
not sure what you mean by it "jumping positions" - i'm assuming it's just a view thing, and not that it's actually moving.
as for placement, i have this issue myself as position coordinates in my modellers don't match Oolite's measurment unit; i find placement of exhausts especially time-consuming. i think Wings3D is the closest match. as it is, i get the modeller coordinates, put those in then just repeatedly tweak them as necessary in-game.

Re: Carrier Docks

Posted: Sat Jan 21, 2012 2:47 pm
by mandoman
Killer Wolf wrote:
not sure what you mean by it "jumping positions" - i'm assuming it's just a view thing, and not that it's actually moving.
as for placement, i have this issue myself as position coordinates in my modellers don't match Oolite's measurment unit; i find placement of exhausts especially time-consuming. i think Wings3D is the closest match. as it is, i get the modeller coordinates, put those in then just repeatedly tweak them as necessary in-game.
I remember you saying that, as I have to do the same with exhaust and laser positions, but I always get those entities into place. The dock is different, some how. It does move, and in fact vibrates, like it is being shaken by something. It's impossible to work on the orientation, when I can't even get the thing to fit into the docking slit on the ship. One thing I found out about using coordinates out of Blender is that the X, Y, Z positions are different than those in Oolite. The X is the same, side to side, but the Y is actually what Oolite sees as Z, and the Z is Y. Even knowing that hasn't helped with the dock. The coords I have tried using should put it directly into the ship, but it has never appeared IN the ship when I bring it up in the game. Weird. I'll keep plugging at it. Nothing else to be done, I suppose. Thanks.

Re: Carrier Docks

Posted: Sat Jan 21, 2012 3:42 pm
by Killer Wolf
i can't understand the Blender axis being wrong, i've used a load of modellers and never come across anything like that. i have no idea what the "vibrating" could be either, i've never come across anything like that.
could you post a few screen grabs or something?

Re: Carrier Docks

Posted: Sat Jan 21, 2012 5:13 pm
by mandoman
Killer Wolf wrote:
i can't understand the Blender axis being wrong, i've used a load of modellers and never come across anything like that. i have no idea what the "vibrating" could be either, i've never come across anything like that.
could you post a few screen grabs or something?
Yeah, here are a couple of shots, though they don't show the vibration.

Image

Image

Re: Carrier Docks

Posted: Sat Jan 21, 2012 5:30 pm
by Commander McLane
This looks like a case of inverted normals. A dock is essentially a concave structure, you're watching it from the inside, not the outside. Therefore the normals have to point inwards. What you're seeing is the odd-looking, pseudo-transparency effect you get with switched normals.

As soon as you have inverted the normals, the front end of the dock should match the center of the hole in the ship texture. (Example: the Coriolis extends from [0 0 500] to [0 0 -500]. The dock is placed at [0 0 500].)

Re: Carrier Docks

Posted: Sat Jan 21, 2012 6:33 pm
by mandoman
Commander McLane wrote:
This looks like a case of inverted normals. A dock is essentially a concave structure, you're watching it from the inside, not the outside. Therefore the normals have to point inwards. What you're seeing is the odd-looking, pseudo-transparency effect you get with switched normals.

As soon as you have inverted the normals, the front end of the dock should match the center of the hole in the ship texture. (Example: the Coriolis extends from [0 0 500] to [0 0 -500]. The dock is placed at [0 0 500].)
Hmm, I did invert the normals, so that only the interior has any visible surface. Is that what you mean? I could try inverting the normals again.

Re: Carrier Docks

Posted: Sat Jan 21, 2012 10:51 pm
by Griff
you don't have "initialize_turret" or anything written inside your docks entry in the shipdata .plist? i remember something similar happening to one of my ships and it turned out i'd made a copy & paste error between a dock and a turret- result was a weirdly rotating dock placed a few meters outside the main hull of the station!

Re: Carrier Docks

Posted: Sat Jan 21, 2012 11:35 pm
by mandoman
Griff wrote:
you don't have "initialize_turret" or anything written inside your docks entry in the shipdata .plist? i remember something similar happening to one of my ships and it turned out i'd made a copy & paste error between a dock and a turret- result was a weirdly rotating dock placed a few meters outside the main hull of the station!
This is how I have it defined in shipdata.plist.

Code: Select all

{
                        type = "standard";
			is_dock = "true";
			subentity_key = "andricodred_dock";
                        port_dimensions = "931.072 x 284.350 x 666.750";
                        tunnel_corners = "4";
			position = (0.0, 242.3, 635.8);
			orientation = (1, 0, 0, 0);
			}
This is the description section of the dock.

Code: Select all

"andricodred_dock" = {
		"ai_type" = "nullAI.plist";
		"model" = "andricodreddock.dat";
		"name" = "andricodred_dock";
		"roles" = "andricodred_dock";
        };

Re: Carrier Docks

Posted: Sat Jan 21, 2012 11:39 pm
by Zieman
If you have other subentities present, the order of entries in shipdata.plist matters.
This sequence works:
dock
'regular' subents
subents with guns (not completely sure if this should be before 'regular' ones or not)
turrets
flashers

Re: Carrier Docks

Posted: Sat Jan 21, 2012 11:52 pm
by mandoman
Zieman wrote:
If you have other subentities present, the order of entries in shipdata.plist matters.
This sequence works:
dock
'regular' subents
subents with guns (not completely sure if this should be before 'regular' ones or not)
turrets
flashers
Interesting. I have the dock listed after the ball turrets. Aren't docks listed as 'regular" subents?

Re: Carrier Docks

Posted: Sat Jan 21, 2012 11:55 pm
by Zieman
I had similar displacement problems when I started making Far Arm ships Titan, and the solution was to move those displaced subents up in the .plist, to reside there before turrets.
So, I'm pretty sure your problem goes away by just moving the dock-entry up in your shipdata.plist, like this:

Code: Select all

		subentities = 
			(
			"example_dock 0 0 -850 0 0 1 0",
			"example_subent_a 0 0 360 1 0 0 0",
			"example_subent_b 0 0 375 1 0 0 0",
			"example_turret 79.55 192.05 314.0 0.8451 0.4978 -0.0990 0.1681",
			"*FLASHER* 0.0 0.0 650 240 0 0 64",
			"*FLASHER* 0.0 0.0 -750 270 0 0 200"
			);

Re: Carrier Docks

Posted: Sun Jan 22, 2012 1:13 am
by mandoman
Zieman wrote:
I had similar displacement problems when I started making Far Arm ships Titan, and the solution was to move those displaced subents up in the .plist, to reside there before turrets.
So, I'm pretty sure your problem goes away by just moving the dock-entry up in your shipdata.plist, like this:

Code: Select all

		subentities = 
			(
			"example_dock 0 0 -850 0 0 1 0",
			"example_subent_a 0 0 360 1 0 0 0",
			"example_subent_b 0 0 375 1 0 0 0",
			"example_turret 79.55 192.05 314.0 0.8451 0.4978 -0.0990 0.1681",
			"*FLASHER* 0.0 0.0 650 240 0 0 64",
			"*FLASHER* 0.0 0.0 -750 270 0 0 200"
			);
I don't use that format. The Wiki said that all of the plist type scripts were heading to ns, and away from xml, so I just learned to do it in the ns. I think I see what you are doing with it in that example, though.

Re: Carrier Docks

Posted: Sun Jan 22, 2012 1:28 am
by mandoman
Well, I put the subent entry for the dock ahead of the ball turret entries, but the dock is still hanging faithfully out in front of the ship. It really looks screwy, and I wish I knew how to fix it. :roll:

Re: Carrier Docks

Posted: Sun Jan 22, 2012 4:37 am
by Wildeblood
mandoman wrote:

Code: Select all

{
                        type = "standard";
			is_dock = "true";
			subentity_key = "andricodred_dock";
                        port_dimensions = "931.072 x 284.350 x 666.750"; <------ three decimal places
                        tunnel_corners = "4";
			position = (0.0, 242.3, 635.8);
			orientation = (1, 0, 0, 0);
			}
I've noticed three decimal place precision in other shipdata fragments you've posted in the past. Do you really need millimetre precision? Would doing those precise calculations hurt my poor computer?