Freelancer Community Network
Reminder: Internet Explorer 6 or below are NOT supported.
HomeHome
ForumForum
WikiWiki
DownloadsDownloads
ForgeForge
Multiplayer Connection Tutorial
Collapse/Expand Random Image
Collapse/Expand Login
Username:

Password:

Remember me



Lost Password?

Register now!
Collapse/Expand Chat
Collapse/Expand Who's Online
85 user(s) are online (69 user(s) are browsing Forum)

Members: 0
Guests: 85

more...
Collapse/Expand Donations
Monthly costs: -30€
Income (ads): +5€
Donations (last month): +0€

Current balance: 55€
(last updated 04/2021)

Please make a donation if you want to help keeping The-Starport online:

Thanks!
Collapse/Expand Links
Collapse/Expand Advertisement
There are currently 25 users playing Freelancer on 44 servers.
June. 8, 2023

Browsing this Thread:   1 Anonymous Users



 Bottom   Previous Topic   Next Topic  Register To Post



SURs - How to: #5 - Example: Battleship
Home away from home
Joined:
2010/2/17 20:45
From Germany
Group:
Registered Users
Senior Members
Posts: 512
Offline



.OBJ to .SUR Converter - How To:

#5 - Example: Multi-Part Battleship


Before 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.

Open in new window


Preparations

Example 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).

Open in new window

For the hardpoints use halves of spheres. Make their sizes depending on their weapon platform's size.

Open in new window

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.

Open in new window


Converting


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!

Open in new window

Now we are ready to take a first look on the converted .SUR.

Open in new window

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.

Open in new window

Now you got:
X 0.0020753568
Y -5.81371
Z -436.59117

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:
X -0.0020753568
Y 5.81371
Z 436.59117

And now you have to do this for all other groups.

The result should be like that:

Open in new window

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.


Any questions? Ask!

That's it.
If there is any interest in an additional tutorial, tell me!

Posted on: 2012/11/19 20:14
How to create .SUR files - Tutorial
Top
Re: SURs - How to: #5 - Example: Battleship
Home away from home
Joined:
2008/6/2 10:17
Group:
Registered Users
$$$ Supporters $$$
Senior Members
Posts: 1847
Offline
Good work Skotty, thank you.

Posted on: 2012/11/19 20:28
"C" for "Caterpillar"... "Cool"... "Cheesey"!
Top
Re: SURs - How to: #5 - Example: Battleship
Starport Admin
Joined:
2008/6/24 16:40
From http://www.freeworlds-tow.net/dev
Group:
Registered Users
Starport Admin
$$$ Supporters $$$
Posts: 1123
Offline
Awesome tutorial! Very easy to follow!

Posted on: 2012/11/19 22:05
Open in new window
Top