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
86 user(s) are online (63 user(s) are browsing Forum)

Members: 0
Guests: 86

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 23 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: #4 - Example: Fighter
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:

#4 - Example: Multi-Part Fighter


Of course, to learn something you need practical situations to use it!
In this case, we will create a new, a bit more accurate .SUR for the Rheinland Heavy Fighter - Valkyrie.

Open in new window


Preparations

Example Files Download

To begin, we need to import the fighter's model with hardpoints! Remove all uninteresting hardpoints (HP_RunningLight, Dp_Whatever), just keep those that need a collision mesh (weapons, shield).

Open in new window

As teached here, try to cut the ship into pieces to the shapes you want. Because we don't need a very accurate physical model here, it will be enough to cut Root into 3 main components. I also cut those weapon platforms so the convex model of Root won't cover the hardpoints there. For the tail I removed those weapon platforms, because they are so small, nobody will notice.

Open in new window

For the hardpoints I used cubes of 1*1*1 in size. Place them where your hardpoints are, remove these little hardpoint-triangles and rename your cube to the particular hardpoint.
The tail's hardpoints will collide now at its sides and they can be shot without any obstacle.

Open in new window

The next step is to make the .SUR meshes convex as shown here. The Convex Tool added endings to every new, convex mesh. You must remove those endings of every hardpoint so their names are identical to those in your .CMP.
I also recommend to sort all parts on a logical way, means: child parts below parent parts.

Open in new windowOpen in new window


Converting


Now export the convex model to .OBJ and open Schmackbolzen's .OBJ to .SUR Converter. Load the file and set all static parts to Static, all hardpoints to Hardpoint. In this case, we will make the Valkyrie's wings Static, not moveable (since the animation is never used and we wouldn't collide as said here).

Open in new window

Now we need to find out what mesh/part belongs to what. For this, open the Valkyrie's .CMP and take a look into the FIX and REV file. As you will see, every Static object is parented to Root, so we don't need to change anything (blank means Root). But some hardpoints are parented to the wings and some to the tail. To find that out you can use for example the HardCMP Editor.

Open in new window

Open in new window

Time to convert the model!

Open in new window

After taking a close look we see a little mistake.
This is because the Valkyrie's wings have an offset. In this case you can find it at Origin (REV, PRIS), because the wings are meant to be animated. Everything in the FIX uses Offset. But in the end, there is no difference!

Open in new window

To solve this problem, do what I already explained here (point 5). Take the offset values and negate them. So they should look, for example, like this:

Open in new window

Now that you did this for both wings, it is time to convert again.

Open in new window

And voilá, it looks exactly as we want it!

That's it. All the magic to create the "perfect" SUR for your ship and every other object.




Any questions? Ask!

Posted on: 2012/11/13 15:47
How to create .SUR files - Tutorial
Top
Re: SURs - How to: #4 - Example: Fighter
Starport Admin
Joined:
2008/6/24 16:40
From http://www.freeworlds-tow.net/dev
Group:
Registered Users
Starport Admin
$$$ Supporters $$$
Posts: 1123
Offline
Wonderful tutorial!

Posted on: 2012/11/13 15:53
Open in new window
Top
Re: SURs - How to: #4 - Example: Fighter
Home away from home
Joined:
2008/6/2 10:17
Group:
Registered Users
$$$ Supporters $$$
Senior Members
Posts: 1847
Offline
Very well done, and thanks, Skotty.

Posted on: 2012/11/14 2:28
"C" for "Caterpillar"... "Cool"... "Cheesey"!
Top