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: Step by step, very detailed

The general place to discuss MOD''ing Freelancer!

Post Tue Apr 17, 2007 7:58 pm

SURS: Step by step, very detailed

I really don't post much but Ive been meaning to finish this How-To for a time now. I figured I'd help those who need to do the things they do in baby steps with explicit detail (like me ). Lots of slides before, I think it covers everything to make a custom sur for the non destructable one part ship seen on most all modified Freelancer servers. Hope you enjoy. Im up past my bedtime posting this

Forsaken


Edited by - rgriffin on 4/17/2007 9:00:09 PM

Edited by - rgriffin on 4/17/2007 9:02:29 PM

Edited by - rgriffin on 4/17/2007 9:03:26 PM

Post Tue Apr 17, 2007 8:57 pm

First off, thanks for making a step-by-step tutorial on the modeling side! I ignored that in the tutorial I just wrote yesterday, because if you don't know how to model, you're never going to get anywhere with making a ship, let alone a SUR, but meh.

However, I have some concerns about this tutorial. For example, I see you making SURs with concave surfaces. In my experience, those will either not register hits, or will cause FL to hard-lock when you bump into them. Are they actually working for you? If you say, "yes", then I would like to test that SUR you showed in your demo, because that would mean that concavity is not a problem, and we can just do single-mesh SURs, even for giant capships with docking bays, etc. However, I do not actually think that SUR you're showing will work right.

Since I got going on this, after all this time, I've sat down and knocked out all the SURs for the major non-FL ships in Toolkit 1.3. I haven't (yet) built unitary SURs for the other ships that need them, like the Train, etc., so that they can have shields and stuff and work perfectly, but it's OK, I've mainly been verifying that my techniques work properly.

To make a concave surface in a SUR, so far as I know, from all of my testing, you need to break it up into convex parts. Check out the wing for the Treefrog, which I just got done testing (and it works 100% perfectly):

In this shot, we can see my Treefrog SUR. It looks like the wings are one piece- and a concave object!


However, this isn't true. I actually used two pieces for the wings, and both of them are CONVEX.


Also, you're using far too many polygons, because you're using MS3D's default shapes. High-poly SURs are massively inefficient, and will cause lag, especially if they're ships which may come in large packs. Gotta keep the polycount as low as you can.

Lastly, I see all this stuff about using Dev's Sur Splicer Utility, and UTFEdit. You don't need to do either step, if you just want a SUR that acts like one piece, and does not have any breakable parts. Just follow the directions I posted, it's much easier :-) Also, if you follow my directions, you have a dummy CMP to use to set up the intial scaling/ centerpoint, if your final CMP is weird and has an offset center or other issues.

I guess what I'm trying to say here is that my method's a lot easier, and you're doing a lot of extra work in your example- my method takes about 20 minutes, including modeling time, per model, once you know what you're doing! And you never, ever, have to mess with a command-line tool or use UTFEdit

Plus you don't mention the very important steps of stripping the normal data from the meshes, or squashing the mesh you're going to export as a SUR, so that it all fits within a sphere, so that no part of the SUR, when exported, will be outside the SUR shield sphere. This is a really important step, and if you're going to do a modeling guide, don't skip it, or people will be making SURs with wings that don't register hits, long skinny SURs that don't actually work, etc. Believe me, if it's in the guide I wrote, it's there for a reason.

Edited by - Argh on 4/17/2007 10:14:46 PM

Dev

Post Tue Apr 17, 2007 10:01 pm

"(concavity thing)"

Just felt like dropping some commentary here on the whole concavity issue. I have found that the concavity requirement is not absolutely strict. To back this up, I experimented with a concave .sur for this ship (the Lancer frigate):


That is one cylinder, with two stacks of triangles, covering the whole ship. As you can see, the hit box is a bit concave. I was fully expecting it not to work, but I do like tinkering with stuff from time to time. And what do you know, it picks up projectile hits and ship collisions 100% of the time (I tested it extensively since I was doubtful). For completeness I really should have messed with it some more to see just how concave I could make things before it stopped working, but I had other fish to fry.

The point is, a little concavity doesn't seem to hurt. However, I guess it doesn't hurt to avoid the issue entirely and make sure everything is convex.

Edited by - Dev on 4/17/2007 11:02:26 PM

Post Tue Apr 17, 2007 10:08 pm

Hmm. I'm really surprised that worked! That may mean that convexity was not the problem with the SURs I made awhile back- they may have had other problems. I'll have to test this- if concavity is allowed, then a lot of things are possible. DA's SURs are all convex, however, so I'm still very surprised that this worked at all, and why.

Post Wed Apr 18, 2007 2:27 am

That sur was only ~1k tris the actual model is ~1.2k tris, this is by far manageable with todays computers and technology

About concave SURS, this SUR works perfectly and its far more detailed than the simple one I done in the tutorial. I tested this one pretty darn well and I haven't had any issues.

I haven't tested this one because I was because I haven't coded it yet, but I bet ya it works.

Edited by - rgriffin on 4/18/2007 3:39:28 AM

Post Wed Apr 18, 2007 8:35 am

Each SUR is checked for collisions every time a shot is within the Quick-Check Sphere Radius. So, if you have 1000 polygons, and 10 shots pass within the Quick-Check Sphere during a single frame (1/30th of a second), then you're passing 10,000 polygons through the code that does collision detection! It very quickly can and will cause lag- this is not very fast code! So keeping polycounts low is essential. You can just ignore me, of course, but don't complain when you've spent lots of time on this and your server lags terribly afterwards.

I will do comprehensive checks on the whole concave/convex thing tonight. If concavity works, then there's no reason to use lots of parts at all- SURs could just be one big mesh. That could save polygons and also allow for really unusual shapes more easily.

DA didn't do it that way, though, and their SURs are all convex, so far as I was ever able to determine, so I'm going to have to check this out and see what's up. Maybe it just "tolerates" nearly-convex objects... however, if it "tolerates" them, then quite frankly, it shouldn't really care- the math on that is straightforward, and there's no point in going partway.

Post Wed Apr 18, 2007 11:26 am

Can we move this to the tutorial thing? I LOVE IT

Post Wed Apr 18, 2007 6:12 pm

Well, I will be darned! It turns out that totally concave objects work just fine as SURs!

Check this out- it's so weird that I wouldn't have believed it, if I hadn't made it myself.

I took the lowest LOD-mesh from the Bretonian Gunship, and made it into a SUR. It is one closed mesh, so I thought, "what the heck, if it doesn't work, I'll just make a model".

It works! The only thing is that it will (very occasionally, and you really gotta try, frankly) cut into other, huge objects. I do not (yet) know whether this is because of the SUR having problems, or because large, multi-part meshes DA made have flaws. Now that I have two capship SURs made, though, I will find out. Maybe, just maybe, we can build SURs have tunnels through them... imagine giant asteroids, for example, with tunnels and secret pirate bases within them!


Edited by - Argh on 4/18/2007 7:12:50 PM

Post Wed Apr 18, 2007 6:39 pm

Aha! The DA mesh is not just one part. It's actually several, and they aren't all closed meshes!

So, I joined them all up, and exported them again, to see what would happen. That made the non-collision problems worse!

Ok... let's see what happens if I cap all the holes in the separate meshes...

Ogu

Post Wed Apr 18, 2007 6:40 pm

Now THAT would be interesting!

Post Wed Apr 18, 2007 7:04 pm


"Well, I will be darned! It turns out that totally concave objects work just fine as SURs!

Check this out- it's so weird that I wouldn't have believed it, if I hadn't made it myself."


Yeah dude, Ive not had problems with concave parts unless I push a face in (cant really explain it). Ive had only one SUR Ive made fail so far, and Im looking into the reasons for it. A group of us tested them for most of the night and we are all highly surprised. There is more than one way to skin a cat, but I know my method, tho a bit more tedious works great for what I need.

Post Wed Apr 18, 2007 7:13 pm

Ok... concave SURs work, but the concave parts do not register hits or collisions as well as convex parts do. Capping all the old DA geometry and making it into a SUR worked better than the original try, which worked better than just putting all the parts into one mesh with seams and holes. But this mesh does not work nearly as consistantly as the one for the Liberty Cruiser which I custom made. Ah well, it probably works "well enough" for most people, and still didn't take very long to do.

Edited by - Argh on 4/18/2007 8:13:58 PM

Return to Freelancer General Editing Forum