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

Simple, Unitary SURs, at last.

The general place to discuss MOD''ing Freelancer!

Post Mon Apr 16, 2007 7:17 pm

Simple, Unitary SURs, at last.

I just meant to stop by, really. I didn't mean to tackle this again two years later.

But after reading Dev's article about "sewing" SURs together, I just had to try this 'orrible little monster out one last time. Guess what? I think I have a solution for y'all. It involves a fair number of steps, but they're easy as pie. Really.

Ok...

Step 1: Make your Ship. Export your CMP/MAT, etc.

Step 2: Make your SUR.

This must consist of 100% WELDED, CONVEX MESHES. All of the words that are in caps are in caps... because if you don't, this won't work. If you're not sure what I mean, then you need to just stick with boxes, but I have tested with other concave shapes, and it works!

One VERY IMPORTANT STEP that you MUST NOT FORGET:

Make one box, of any size, inside your model. Call it "HpShield01".

Now you have your SUR, and it roughly matches the geometry of your ship, but is made of multiple CONVEX MESHES.

Step 3:

Import your SUR model into Milkshape3D. TURN OFF AUTO SMOOTH FIRST. If you don't know what I'm talking about, here's the setting. TURN IT OFF.


Select all of the meshes, then Go to the Vertex Menu and select "Weld Together". This will weld all of the verts.

Step 4: Apply a Material to the objects in your SUR, and EXPORT AS A CMP. Yes, a CMP! We'll be using it later, trust me!

Step 5: Export your SUR mesh. Export in 3DS FORMAT. Not OBJ, not DXF, not whatever-you-feel-like-it... you MUST USE 3DS. This is because 3DS does not retain welding information within the format. It's a technical lesson I learned modeling for Spring, but it's an important little point.

Step 6: Import your 3DS version of your SUR into LITHUNWRAP. The download for that can be found here. Also, I keep it on my website.

Once in LithUnwrap, go to Tools, and select, "optimize model". This will strip all of the extra verts out- VERY IMPORTANT. This is called "fully welded", and it's required by the SUR exporter.

Now, you have this fully welded 3DS file, what do ya do?

Step 7: Export from LithUnwrap AS 3DS, and import back into MS3D. Your model, by this point, should look like this:


Notice that it's BLACK. If it's anything but BLACK, you've done something wrong. It's BLACK because you've removed all of the normals from this model, so MS3D doesn't know how to shade it anymore. Guess what? That's COMPLETELY NECESSARY to export a good, multipart SUR in one go.

Step 8: Now, this part's a little counter-intuitive, but here's whatcha need to do. When using Colin Sandby's SUR EXPORTER 1.1 (not 1.2 !!!), it doesn't make the Shield bubbles right for long skinny things, or things with weird geometry. And any part of a SUR that is not inside the Shield Bubble that his Exporter makes WILL NOT WORK. This is the part that kept screwing me up, honestly.

To get around this... it's really, really easy. Just select all the meshes, and use Scale until your entire model can fit within a cube (actually, a sphere, but meh) WITHOUT POKING THROUGH IT. Do not worry about distorting it, so long as you use SCALE, and use the WHOLE MESH, you are fine! Trust me!

WHEN YOU ARE DONE, SAVE THE MS3D FILE, RIGHT NOW, AND RE-OPEN IT. This will reset the Origin- very important!

Step 9: Ok, now you have a squashed mesh, that would fit within a sphere. It's time to... zomgosh... EXPORT THE SUR.

USE THESE SETTINGS:


Do not, under any circumstances, use Shrinkwrap, or turn on the DirectX Mesh Reduction. They are both from the devil, at least with 1.1.

Step 10: Ok, now you have this CMP, of the SUR in the original dimensions... and a SUR that's all distorted. Guess what? You're going to use the CMP to fix the SUR.

Load the CMP, and use FLModelTool to set its proper size. Do not worry about scaling it to your ship, etc., etc. Just do it.

Step 11: Load the SUR, and use the FOLLOWING SETTINGS:


Step 12: Save the SUR, re-open it, and use the FOLLOWING SETTINGS:


Save your SUR.

Step 13: Open your SHIP CMP, which I am assuming you've already scaled, etc. with FLModelTool. And resize the SUR, using the FOLLOWING SETTINGS:







..... That's IT! Time to check your handiwork. Open the Ship CMP in HardCMP, and check the SUR out. It should look something like this:


See? The process we used returned the distorted, squished geometry back to the original shape, because EVERYTHING WAS SCALED at ALL STEPS. Cool, eh?

Now, go test your SUR!


I have made 2 SURs, and they WORK. The only quibble I have, which everybody here knows about, is that large custom SURs have the unpleasant ability to cut through DA's original SURs (such as Stations) sometimes. But, these ones are actually detecting impacts so well that this isn't as big of a problem as my old ones!

Here are the sample SURs, and sample geometry/test setups, so you can see what I'm talking about, if you want to see what I did in more detail. One assumes you have Toolkit 1.3 lying around, so that you can replace the original Hfuel_Tanker.sur with it, and see for yourself... that it darn well works!

Now, will this work, for ships with break-off parts? No. Use Dev's method, which is much more of a pain in the butt. From what I see, it works just fine, it's just a painful experience, whereas this is really quite quick, once you know what you're doing.


Last notes: this was all tested, implemented, and done with MS3D 1.7.5. Older versions may very well not work, and I do not have the very latest upgrade, but this one's only about 3 months old. And yes, I bought mine, kids

Edited by - Argh on 4/17/2007 10:19:26 PM

Post Tue Apr 17, 2007 8:41 am

Excellent tutorial. I have one questions, I assume this will work for custom bases as well, however, I would not want the shield type affect. I would want the sure as close to the actual model as possible, how would onw go about this?

Requiem: A Total FL Conversion Mod .

Post Tue Apr 17, 2007 1:57 pm

Well, let me break it down:

1. The shield bubble is totally ignored, on anything that doesn't have a shield. So, for large unitary SURs that simply use the geometry and no shield-bubble, you'd just make it as shown then just not equip a shield.

2. If you want breakable parts, this method really won't work. Just keep that in mind, if you're planning some massively complex thingamabob, because it won't work out very well at all. If you want that, use Dev's method. For myself... meh, I'm pretty much done ever doing anything with this engine, frankly- I am interested in OpenLancer, but I will not be working on anything that's not GPL ever again, because this game pretty much convinced me that modding by itself is entirely futile. So, if I build anything with this, I'll build the large, realistic space stations I originally planned to build, which would have much more realistic landing methods and generally look less awful than the ones in FL do (sorry, fans, I truly hate most of the stations).

One last thing that I should mention. To avoid the "omg, my ship slipped through the station" problem, it really helps to use smaller SURs within the larger ones. This doubles the collision-checks per frame that the FL engine does, and will be more likely to guarantee a collision check is successful. Be sparing on this, though- don't go overboard! Every new shape is yet another object that will get searched for by the game engine whenever objects are (roughly) within the radius of the shield bubble. Even on modern machines, I have no doubt that this can quickly lag machines if there is a lot going on, so be careful!

Post Tue Apr 17, 2007 2:18 pm

Big note! I just corrected one of the reference settings... always use a scale value of "1" for the SUR! It doesn't matter for the CMP, you're just using it to re-scale the SUR back to a normal, un-squashed shape, but it matters for the SUR, because otherwise HpShield01 will be huuuuuge

Post Tue Apr 17, 2007 2:33 pm

Some of us over on the old Freeworlds forum were doing this a couple of months after you uploaded the Exporter, it works okay as a basic SUR but most of us wanted ships with destructable components and this method just couldn't give us that, FlModeltool renames everything as ROOT, totally F****** up that from happening.

To give you an idea of what you can get from the Exporter here's a LINK to some files that I uploaded to encourage others to experiment with the Exporter, don't think it worked as I only had a handful of downloads, to much like hard work for most of the people around here.

**shuffles off with a new headache**

Post Tue Apr 17, 2007 2:44 pm

That's why I revisited this topic... because...

1. Half the SURs I ever made didn't work. Now I know why, and how to fix them!

2. This is sooooo easy. I just did a SUR for my version of jsncaliff's Bandit. Took me about 10 minutes. In fact, I think I'll just skip working on my big project tonight, and make SURs for all of the custom ships in Toolkit. It's really, really, really easy! If I'd had this method two years ago, Warriors of the Sky would've rocked everybody's world, because I could have finally done a reasonable planetary simulation, aside from the lack of gravity. Ah well.


I hear you about break-off parts, but we had this discussion two years ago... I have zero interest in that level of grind, and the way that FL handles this is, to my mind, not acceptable. I'd rather have unitary SURs and uniform, non-dodgy damage results from things with an area effect. I discussed this at length, and proved that explosives can apply damage to more than one SUR in a multipart ship, which is why the original game's damage on missiles was so flukey. There is no good way around that, and besides which... it's marginally cool, but most space games go without, and nobody cares. Too much work for too little fun, imo.

Edited by - Argh on 4/17/2007 3:46:20 PM

Post Wed Apr 18, 2007 2:05 am

1} I was like that to until I found out where I was going wrong, now every SUR I export from Milkshape works without needing FlModeltool.


It's all down to personal preference, your happy with single component CMP's with basic SUR's, I'm happy with multiple component CMP's with close fitting complex SUR's, but most others want thier models to work just like the vanilla ones. This still isn't possible ATM but they us a compromise by using the Splicer for the break-off's, it's only for them that I still experiment with the exporter, trying to get a fully working SUR.

**shuffles off with a new headache**

Post Tue Apr 24, 2007 8:03 pm

destructibles = the difference between just controlling a mesh and the 'real thing'

i'm not going to delve into why every reason you list for hating them is wrong, but i will offer you the XML toolkit ships I've converted for examination -> most of them were converted to multipart in less than an hour each, two if you count making damaged subparts in ms3d - easy wireframes actually take longer, and are the true grind (do not tell me making a destructible-part ship is difficult until you've applied wireframes to it!)

ships on average have five or less components and the most immediate problem with multipart SURs (the CMP exporter not following Freelancer's naming rules) can be fixed easily with UTF editor in a minute.
damagecaps can be easily made by duplicating, deleting a few select vertexes, and filling in the open space with new polys w/ burnt-hardware texture(not as nice as using a full damage tex w/ the rest of the part, but it will do).
another note; its more trouble to convert a singlemesh ship to multipart than to build it that way because when you're building because you'll be mirroring & have the perfect opportunity to separate your parts

also...you can make ships with escape pods

Edited by - Cold_Void on 4/24/2007 9:05:05 PM

Post Fri Apr 27, 2007 6:20 pm

bump - well since i seem to have the touch of death on threads i thought i'd try to mend my ways this time..

i'm sorry for being so argumentative, but i didn't write a tutorial about it (dev's tool applied to destructible parts) because i thought it was a pointless waste of effort. Dev's sursplicer is a primitive hack, as i believe he himself points out, but whether its more or less labor intensive than your method is debatable depending on what you're trying to accomplish. regardless i am grateful to have another approach to making single part surs.. perhaps it will be the key to getting a dang tunnel-in-an-asteroid working properly (atm... its not so good, and the worst result of all has been totally solid tunnel walls...that bounce around and spin out of control wildly when you hit them lol)

good SURs is a worthy cause, and i don't think the efforts have been at all in vain; although collision remains problematic, everything else works like a dream and i will continue to egg on every programmer that wants to show us the light rock on Argh!

P.S. i believe that the bounding sphere can be grafted with Dev's tool, but I haven't observed any particular benefits collision-detection wise from that approach

Post Sun Apr 29, 2007 3:33 pm

Eh, don't worry about it, I've just been too busy to reply. To each their own, etc. I think I'll try to build a replacement for the standard Tradelanes model soon- that should be an interesting test of some things...

Post Mon Apr 30, 2007 11:07 am

This single sur tutorial will come in real handy in the mod we are working as would any custom tradelanes as we are shooting to have everything custom in the mod and have made tons of headway in this department.

So, if you create custom tradelanes and are looking for a place to show them off in a mod that is in development, please let us know.

Requiem: A Total FL Conversion Mod .

Post Mon Apr 30, 2007 3:24 pm

Did someone mention "custom trade lanes" ???
Straight from the Alien Manufacturing Co. of Sirius-Engineering....


These trade lanes replace all those found in the game. The central "core" is a "livable" habitat with a docking hatch and view ports (sorry, no dock mount) and the guns are mounted on the front & back of the habitats. Jeez, think of all those little bases that would need supplies and have their toxic wastes removed!
The core actually needs a "hit-box" to register the hits, but other than that, they're quite the rage in Sirius now.

Edited by - Rankor on 4/30/2007 4:32:13 PM

Return to Freelancer General Editing Forum