Freelancer - .SUR Creation
#5 - Example: Multi-Part BattleshipBefore doing this tutorial, please read the previous chapter!
Multi part fighters may be a nice touch, but if there is something that really makes sense to destruct piece for piece it is a battleship!
And because the biggest one (besides the Nomad's) is the Rheinwehr's Battleship, we will take a closer look at it. Just before we start: It needs all our knowledge about how to create convex meshes and, most important, how to work with Schmackbolzen's .OBJ to .SUR Converter.
PreparationsExample Files Download
Let's start with the same steps as in the prior chapter: Import the .CMP with hardpoints and remove all uninteresting ones.
And again, remove all surfaces except those that will be the boundaries for the shapes of all SUR meshes we need (see here).
In this case I just removed a few surfaces. Basically I just selected clear structures and moved them into separate groups that still have the shape of what I want (to understand what I mean, take a look on the example files).
For the hardpoints use halves of spheres. Make their sizes depending on their weapon platform's size.
To finish this part, take your meshes and use the Convex Tool. Be aware of removing all added endings of the hardpoints! Keep in mind, they must have the same names as the .CMP-hardpoints.
Export this convex model to .OBJ and open Schmackbolzen's .OBJ to .SUR Converter. Load the file and set all static parts to Static, the dock bay doors to Moveable and all hardpoints to Hardpoint. We will keep the dock bay doors moveable, because in most cases this ship is used as solar, means all collisions will work properly. For players there won't be any big problem, too, because the doors are inside of the ship's outer hull and they are very small. If other players want to fly in your docking bay, they will collide with you (explanation here). For them, you are working like NPCs - full working collisions.
The next step is to set all parent-child relations. Take a look in the battleship's FIX and PRIS nodes to find out, what is parented to what. Do not forget to do so for all hardpoints, too!
Now we are ready to take a first look on the converted .SUR.
The result shows us, we still need to move the SUR groups by changing their Center coordinates by hand. Open your ship's FIX and PRIS nodes again. Take a look on their Offsets/Origins.
The Rheinland Battleship has, in difference to most fighters, some groups that are parented to other groups and not directly to Root. If a group is parented to another group, you must add those offset values.
Lets use the example of RH_CNTRL_TWR:
RH_FRNT's parent is Root. No adding needed because Root = 0, 0, 0. But of course you have to negate it (as learned in the Fighter Example tutorial).
RH_CNTRL_TWR is parented to RH_FRNT. So it's offset needs to be added with its parent's offset.
Now you got:
Once added, negate those X, Y and Z values (see here) and use them in the .OBJ to .SUR Converter.
The solution for this example, after adding and negating, is:
And now you have to do this for all other groups.
The result should be like that:
Making SUR groups depending on other SUR groups may be a bit difficult to understand first, but once you found out how to do so, you can do everything with this program.
- SURs - How to: #1 - Creating The Physical Model
- SURs - How to: #2 - About Surface (SUR) Files
- SURs - How to: #3 - The .OBJ to .SUR Converter
- SURs - How to: #4 - Example: Fighter