Important Message

You are browsing the archived Lancers Reactor forums. You cannot register or login.
The content may be outdated and links may not be functional.


To get the latest in Freelancer news, mods, modding and downloads, go to
The-Starport

.SURs... questions

Here you can discuss building custom ships, texturing and 3D modeling in Freelancer

Post Sat Oct 16, 2004 7:08 am

.SURs... questions

I have some questions about .SUR files... forgive me if these seem rather "noobish", but I want to make sure I clearly understand these issues:

1. Nobody seems to know how make new .SURs yet. Is this an accurate statement?

2. However, several people have figured out how to view/manipulate existing .SURs. How can the first be true, and the second one also? If you can resize and view the polygons... why can't you add/subtract them? I'm not talking about sophisticated import/export here... just hand-coding the positions of vertices...

So... can a new .SUR file be made, by subtracting vertices from existing ones? If not, then why not?

The reason why I ask this is that this should be pretty easy to figure out... if we could figure out how to "reshape" existing .SUR files by removing/moving existing vertices (by hand, of course), then we could make some basic primitives, which would then be far easier to reshape to fit a particular ship's size/shape. It wouldn't be perfect, but it'd be better than using .SURs which weren't designed for the geometry that they're serving as hitboxes for...

So... what happens when/if somebody removes a vertice's point information? Does the game lock up? At the heart of my question is the rather obvious: since .SUR files, like other geometry, aren't stored in the main executable, it seems likely that if we can figure this out... and we could probably build our own .SURs, using extremely simple geometry (i.e., some cubes)

Now, I've taken a look at .SUR files... they seem to be encrypted hex of some kind. When I looked at the sourcecode for the .SUR resizer, I didn't see any reference to hex... but maybe I'm just not looking at it right. So... uh... how did y'all figure out how to translate that hex into coordinates... and is there a way for mere mortals to do so? I mean... if I could just figure out how this file gets transformed from hex entries into a textfile listing the vertices positions x, y, z... then I could alter these, with a little luck, and move the verts around until I'd reformed the .SUR into a sphere with a cube inside... from the description of what the SUR Resizer is doing, it looks like it's doing even more complicated stuff there... so obviously about 90% of these problems are worked out (which is amazing, considering what a cryptic piece of junk the raw file is!).

Aaaaaanyways... I am far from expert about this deep stuff, but if I could figure out which sections refer to the coordinates of the geometry (and anything else important enough to worry about, like the center point)... then I'd like to know how to do it, so that I can at least try to hack things up a bit.

Post Sat Oct 16, 2004 8:33 am

well if you use the milkshape .sur importer you can have it write a log, in the log file it lists the vertice coordinates. maybe that will help you on your quest?

Post Sat Oct 16, 2004 10:40 am

Still, the SUR file would then need to be re-encoded in SUR coding in order to be of any use...

Post Sat Oct 16, 2004 12:26 pm

So... how would you re-encode it?

Surely, if people have developed utilities to read this data, then it can be written... so long as it's not missing any necessary data, of course.

I'll take a look at the approach mentioned above, and see what, if anything, comes from that. As I'm not trying to make completely new .SUR files, and would be perfectly happy just moving the verts of existing .SURs around, I might give this a try.

Looking at the sourcecode for the .SUR resizer, it appears, though, that certain triangles are labeled for the game engine's use... is there any way to see which ones are which? Obviously it'd be a bad thing if I took the triangle used to figure out the "center of momentum" and distorted it (lol).

Edited by - Argh on 10/16/2004 1:26:36 PM

Post Wed Oct 20, 2004 4:22 pm

Try reading the stickied thread regarding SURS in the general editing forum - maybe you could lend your enthusiasm to that venture instead of being difficult to those trying to help!

Everyone comes here and expects everything to be already done for them, and if its not......they demand why not! I don't get it sometimes - i really don't!

Post Wed Oct 20, 2004 5:42 pm

Hehe, no need to smack me... I've already gotten ahold of Dev, and I've figured out what I needed to do, more-or-less. Now I've just gotta get past the "hump" of getting my initial ships and objects working, and my conceptual mod will be done. I understand that when it comes to SUR files and some of the other things around here... people's understanding is still limited, and nobody's totall conquered these problems.

I wish I was competant enough to help with some of the more difficult remaining issues, such as automation of all of the appropriate entries into a CMP-formatted file from MS3D and of course... the Holy Grail... a SUR-exporter from MS3D. I'm still more than noobish enough that I'd be more of a hinderence than helpful, though, out of sheer ignorance

Return to Freelancer 3D Modeling and Texturing Forum