Author Topic: Modelling Questions (was Dockpoints on Bottom)  (Read 5919 times)

0 Members and 1 Guest are viewing this topic.

Offline Spicious

  • Master Chief John-158
  • 210
Re: Modelling Questions (was Dockpoints on Bottom)
Since the current importer does things based on id, it treats the helper as a dockpoint at 0,0,0. I'll try switching things to work based on names instead. The other problem is the exporter seems to turn $ and = into _ which kills the naming.

 

Offline Vasudan Admiral

  • Member
  • 211
    • Twisted Infinities
Re: Modelling Questions (was Dockpoints on Bottom)
Ok, here's basically how dockpoints work in terms of their components:

You will need two main components:

1) A dock

2) A path leading to the dock

I'll start with the assumed situation of a support ship coming in to rearm, meaning we start with....

The path
A docking path has a few components. The first two are a name and a properties field, where the name should just be "$path##", and the properties should be "$dock01-01" for the first dockpoint on the first dock. (I don't know how important this particular field is TBH. It seems a little redundant.)

The last and most important component of a path is the path points themselves. A docking path will consist of four points in order of furthest-away to closest-to. Each of these points has a location and a radius. I think the game uses these points as waypoints for incoming docking ships.

So, it will first fly towards the centre of the first path point until it is within that points radius (the biggest one), and then look to fly inside the radius of the second etc, repeating the process until it gets inside the radius of the final tiny radius point. Once it gets to that point, the path following is complete, and the docking ship will start seeking to dock.

At this point, the game will switch to the data of the dock that is associated with this particular path, which brings us to....

The dock
Docks consist of 3 main components: Properties, an associated path number and the docking points. In retail the dock properties field is what defined the docks compatability - ie, calling it a "rearming dock" would mean that it could ONLY dock with a support ship there, and "cargo dock" would mean it could only dock with cargo there. AFAIK this restriction was lifted in FSO, leaving it up to the modder/fredder to decide what should and shouldn't happen. Due to this you should be able to safely call your docks whatever you like - as these names are the ones that appear in FRED.

The path number is just the bit that links the dock itself to the path that leads to it. Easy to forget, but it won't work without it.

Now onto the docking points:

Don't confuse "docks" with "docking points". Each "dock" will have two "docking points" that have a location and a normal. The first one is the main one, as this is the one who's normal the incoming docking ship will seek to align it's own first docking point normal to in the exact opposite direction, so they will basically be pointing at each other.

Also during this alignment the second dockpoint comes into play. As Galemp described, this controls how the docking ship will rotate around an imaginary axis through the docking point normals when it docks. If that is hard to visualise or makes no sense at all, think of it as basically the bit of data that tells the docking ship which direction the 'front' of the dockee ship is.
Ie, if you have the second docking point in front of the first point (a 1m larger Z axis postion) on both the docking ship and the dockee ship, then when they dock both ships will be facing in the same direction. If both docks are set up so that the second point is 1m behind the first, then they will also both still face the same direction. If however one ship has the second point in front and the other ship has it behind the first, then when they dock they will be facing in directly opposite directions.

Anyway, during this alignment stage you will probably see the docking ship slide around a bit to bring the normals into line, and then it will continue to slide straight down the normal line until both first dockpoints are touching. Once these two points are coincident, the ships are considered docked.

Note: It may try and do the alignment a bit earlier, like at the 3rd path point or so. Not sure there but it seems likely.

And that's it!
Some of this info may be a bit out of date or needlessly precise (mainly the names and properties descriptions) due to the SCP, but follow it and you should be fine. (Though I would certainly like to know from coders if any of it is wrong. ;) )
Get the 2014 Media VPs and report any bugs you find in them to the FSU Mantis so that we may squish them. || Blender to POF model conversion guide
Twisted Infinities

 
Re: Modelling Questions (was Dockpoints on Bottom)
And that's it!
Some of this info may be a bit out of date or needlessly precise (mainly the names and properties descriptions) due to the SCP, but follow it and you should be fine. (Though I would certainly like to know from coders if any of it is wrong. ;) )

      Cool thanks I'll save this to disk or something. Nothing wrong with precision, quite the opposite.
      I'll leave the dockpoint for now, until it exports better or maybe I try my hand at PCS1's dockpoint editor (or I finally get myself a damn video card). Since model wise I've still got to finish LOD1 for my fighter + others + debris. Turns out the "Mesh Reducer" in Maya is nigh-useless, at least with my model. Darnit. But one of these days, I'll release a model damnit. First time's always a big learning curve it seems.

 

Offline MetalDestroyer

  • Starwars reborn!
  • 210
Re: Modelling Questions (was Dockpoints on Bottom)
Sorry to bump this old thread. But I don't really understand how you can tell the alignment of the docker/dockee ship. Could you show me some drawing about this second docking point ?

  

Offline Black Wolf

  • Twisted Infinities
  • 212
  • Hey! You! Get off-a my cloud!
    • Visit the TI homepage!
Re: Modelling Questions (was Dockpoints on Bottom)
Sorry to bump this old thread. But I don't really understand how you can tell the alignment of the docker/dockee ship. Could you show me some drawing about this second docking point ?

Imagine a line between points one and two for the dock. This line defines the azimuth that the docking ship will align itself to (i.e. the way it will point). The other two axes are determined by the normals, whcih will be aligned in exact opposition to one another.
TWISTED INFINITIES · SECTORGAME· FRONTLINES
Rarely Updated P3D.
Burn the heretic who killed F2S! Burn him, burn him!!- GalEmp