SUR Exporter v1.3
-
All right, I’m not sure if the SUR Exporter v1.3 is under development, but rather it is not, I’m throwing in my $0.02. Now, I have heard that when v1.3 was being worked on, only v1.1 was being used as a base, which is a damn shame because v1.2 has some good, nay, great qualities. Let me first post the SUR that v1.1 spat out for me:
The Good:
1. Everything is shaped normally.
2. If I export the SUR as a single group, I get full hit detection.The Bad:
1. If I export it in multiple groups, as is required for multi-part SURs, then the two main wings in front of the ship don’t have hit detection, among other areas of the ship.
The Ugly:
1. The shield. Ugh.
Next is what v1.2 gave me:
The Good:
1. I get full hit detection on the forward wings, even if I export it in multiple groups.
2. The shield. It’s centered and more properly shaped. Still a bit large, though…The Bad:
1. See that area between the two forward wings? I get hit detection there, too, despite it being empty space. That’s just one example.
The Ugly:
1. Note how badly it messed up the shape of the SUR in some areas. Gah!
I should point out that it might be a good idea to visit another thread related to this issue:
http://the-starport.net/index.php?option=com_smf&Itemid=26&topic=396.0
Well, I’ve dumped a lot of info, now let me explain some of it. There are good and bad parts of both v1.1 and v1.2. A decent 1.3 would eliminate the bad and combine the good. The code is there, really, we just need to fish it out and combine it with other good code and make sure no bad coding gets in. Of course, I have no actual experience in coding, so I may be completely wrong, but the point stands that both 1.1 and 1.2 are good bases for 1.3 in their own respect. Thoughts? Ideas? Homicidal tendencies?
MK
edit
I should also mention that a feature that I think should be in 1.3 would be an option to export with no shield bubble. I ask this because of destroyed components, which in Vanilla have no shield bubble in their SUR, but it could also be helpful in other areas.
-
I haven’t spoken to Colin in almost a year, but 3-4 months ago Louva mentioned that Colin wasn’t working on any Freelancer projects, so I don’t know if v1.3 will ever appear.
As it stands we have nothing that will create a properly functioning SUR, even the SURs I make don’t work as well as I’d like, but then I’m a fussy so & so
The problem you encountered with 1.2 is the reason it’s been scrapped, it just doesn’t form the components properly, that and the problem where some people can’t even get milkshape to load the DLL, is what’s made it unuseable.
For me v1.1 isn’t far away from working properly, the shield bubbles are a pain but considering they don’t get used by FL means I can ignore that flaw. Atm I’m making “primitive” SURs purely because of a flaw with the exporter that makes complex SURs useless for destructible components, and if Colin ever fixes it I’ll have no problems creating SURs that look & work like DA’s, ie with all 3 levels of collision detection rather than the 2 levels I’m currently having to make do with.
I haven’t had much time of late so it’s taken me longer than normal to finish this, the SUR was created with v1.1 and works well in game.I use the same methods for testing all of my SURS, using God mode and no shields -
Test one, try to slowly push all sides into Newark, don’t fly fast as you can’t see anything that way.
Test two, fly to Buffalo and let them shoot the crap out of you, in turret view watch for impacts and take note of any areas that don’t register.
Test Three, missile salvo, these will crash any bad SUR, but you need 2 or more coming at you at the same time to guarantee the SUR works.The only test I haven’t been able to check today is the missile salvo, as they just do not want to throw missiles at me today.
I should also mention that a feature that I think should be in 1.3 would be an option to export with no shield bubble. I ask this because of destroyed components, which in Vanilla have no shield bubble in their SUR, but it could also be helpful in other areas
Atm the exporter ONLY does the type 4 SUR format (ships/stations), damage SURs are either a type 2 or 3 and are nothing more than a primitive shrink wrap with no internal structure. There’s no easy way to make them so I haven’t bothered to try yet, but you could probably make it useing v1.1 & the splicer and convert it to the proper type with FlModelTool.
PS. MK I’ll send the files in an email later.
-
ive created more than 200 single component surs and tested them all (without problem)
i just want to share a method of testing surs effectivly for those which dont know it alreadymake the ship a solar object and place it into a system directly infront of a gate
jump through the gate and back (so the game gets saved)
now you can simply replace the object and its sur with other ones and shoot at the parts of the ships
the good is that you dont have moving objects like on npcs or other player ships
and you always spawn infront of your test object
that way you effectivly can test 30-40 ships per hour and make sure that your custom surs are working -
Lancer Solarus is working on a CMP to SUR so i r a waitin lol
-
ive created more than 200 single component surs and tested them all (without problem)
i just want to share a method of testing surs effectivly for those which dont know it alreadymake the ship a solar object and place it into a system directly infront of a gate
jump through the gate and back (so the game gets saved)
now you can simply replace the object and its sur with other ones and shoot at the parts of the ships
the good is that you dont have moving objects like on npcs or other player ships
and you always spawn infront of your test object
that way you effectivly can test 30-40 ships per hour and make sure that your custom surs are workingMany thanks Swat, nice tip.
Bejay:
I think you (and Argh too) mentioned in other posts long ago that you have also been able to make concave sur parts that worked as long as the root sur is convex, or did I read this incorrectly? It would save me a lot of time if I could make a 2-part or 4-part sur this way and export it as a single sur, instead of many-part surs and then have to use sur splicer.
Can anyone else throw some light here? Swat? I only need basic close-fitting surs for my big ships, as I don’t use break-off parts in my modelling?
Thanks in advance.
-
I believe he answered it in the other thread, as in yes…
-
Yes he did, I saw it later, thanks Lancer.
On Opr8r’s tip on making your test ship a solar, for others who are not so familiar with how to do that here’s how I did it just now…
Ensure that your test ship sur file is named the same as your test ship’s .cmp file, and that it is in the same folder.
Open DATA\SOLAR\solararch.ini and add the following at the bottom (so you can find it later!)…
[Solar]
nickname = testship
type = STATION ; you can have SATELLITE if you prefer
DA_archetype = ships\babylon\CeVorchan\vorchan.cmp ; change yours to your ship cmp file
material_library = ships\babylon\CeVorchan\vorchan.mat ; change yours to your ship mat file
material_library = fx\envmapbasic.mat
envmap_material = envmapbasic
LODranges = 0, 6000
surface_hit_effects = 0, small_hull_hit
mass = 100000.000000
docking_camera = 0
solar_radius = 160
shape_name = NAV_smallstation
hit_pts = 999999961690316250000000000000000000.000000Open the .ini file of the system where you want to place your test ship, mine is DATA\UNIVERSE\SYSTEMS\CE01\ce01.ini…
Find a jumpgate or jumphole where you want to place your testship, note the pos = xxx, zzz, yyy values and add 1000 to the xxx and to the yyy values. Or just add 2000 to the zzz value to put it 2000 metres above the gate/hole.
My jumpgate’s pos line was
pos = 78500, 0, 27000So I added 1000 to the xxx and to the yyy values and got
pos = 79500, 0, 28000Do your own calc for yours!
Now add the following lines at the bottom of the file (again so you can find it easily later)…
;My Sur file tester in CE01
[Object]
nickname = surfile_test_ship
pos = 79500, 0, 28000
visit = 0
rotate = 0, 0, 0
archetype = testship; this calls out the solararch.ini entryYou too will probably get the following red line message in the FL Server console window…
E:\FL\Scratch\Source\Common\CSolar.cpp(109) : *** ERROR: 0xa093144d is dockable, but doesn’t have a valid base or system to go toJust ignore it, go into your system, go to the jumpgate and nearby you will see your test ship, it will be shown as Object Unknown in your radar screen but this does not matter. Just shoot it up all over, it won’t be destroyed. Unless you lower the hit points. I just want to test sur files.
When you have finished, delete the entries from your system’s ini file and from solararch.ini or restore the backup copies you made earlier. Heheheh… you DID make backups, didn’t you? ;D
Many thanks once again Opr8r
-
Just so your aware this testing method will only work on very basic SURs, the more advanced SURs will not register with this. The construction of solar & ship SURs are completely different, as is FL’s way of using them in game. There is only one real way to test a ship SUR and that is to fly the sucker and pick a fight, as only by having it classed as a ship will FL use it properly.
-
to avoid the dockable error described above change the type to "type = sattelites
oh and this method is for sure able to test all kinds of surs (even complex ones)
ive created several hundred surs already… simple and complex surs and all have been tested -
In that case OP I’ll leave you to explain to mknote why the SURs weren’t working, he was testing his using a wreck, yet every time he shot the wreck he got no hits, even with the CMP & SUR I’d sent him, which I’d spent an hour testing before I sent it to him.
Just to clarify for everyone what I mean by basic, primitive & complex SURs.
Basic - resized vanilla, a primitive shape, anything made using Argh’s tutorial - all of the hitboxes in these are usually called Root, making them a general purpose no frills SUR.
Primitive - What I create & try to teach people - these have a convex Root, a shield bubble & a hitbox for each component for collision detection, a shield bubble & a hitbox for each component for weapon hit detection, these are basically a stripped down version of a vanilla SUR.
Complex - What DA made - these have a convex Root & hitboxes for equipment assigned to the Root, a shield bubble & a hitbox for each component & equipment assigned to the component for collision detection, a shield bubble & a hitbox for each component & equipment assigned to the component for weapon hit detection, mixed in with these are what I call “Colateral damage” hitboxes, these are shrink wraps that only cover a component that has an equipment hitbox assigned to it.
Now I can make these Complex SURs, but because of the amount of work involved I wont be teaching anybody how it’s done, especialy as you all tend to bitch at the small amount of work involved in doing multiple components.
Now where does the SUR splicer fit in, believe it or not but this is an anomaly, in a SUR all hitboxes between the Root and bubble/shrink wrap (internal order) are either called Root or ‘tagged’ with the Roots abilities ie both collision & weapon detection, because a spliced SUR doesn’t have a bubble or shrink wrap FL is forced to ‘tag’ the other components.
-
as i have not seen that sur i can only guess but usually my guesses are quiete exact
so here it is
the sur might have been currupt all the time (even on the ship)
when you test surs on ships those ships usually have equipment mounted
equipment has its own surs… therefore if a gunshot its something like a gun… a shield or anything else the ship takes damage even if the ship sur does not work correctly
thats why i initially started to test surs on solar objects and after creating a few hundred surs i can say for sure that this method is working finei also can not imagine a single explaination why the sur of a solar object should work different from a ship sur… they are based on the same “code”
extentionally to that explaination i need to say that i consider DA surs ineffective
they contain details which are unneccessary for hit detection as the projectiles of guns and their hits are 5-10m big in FL so 1m big details or details in similar size dont make any sense to me
the more complex a sur is the more serverload is created on a server because a part of the hit detection (guns) is only calculated serverside and the more polygons a sur does have the more FL needs to calculateneedless to say that the current sur exporters also create surs with MUCH unneccessary information
just create a sur based on one single box and export it and you will notice that the file size is bigger than some of the original DA surs which contain more complex objectswe are still far away from creating real good surs… but from my own experience with the different methods i can only say that simple surs work best… expecially if you have a mod with many new ships
and the method testing those surs always worked for me… and if i noticed that a sur on a solar object didnt work correctly then i knew that i made something wrong with creating that sur -
Sorry, BJ, but I need to side with OP on this one, at least partially. Â You’re comparing apples and oranges; the multi-part SURs that you sent me don’t work as wrecks, true, but the SURs OP uses, which are exported as a single group, do work on wrecks. Â Since you don’t use OP’s method, I can understand why you’d think it’d be universal for all SURs, but the SUR I made for my ship worked perfectly (sans having multiple components) as a wreck. Â Since my ship has multiple components, however, said SUR was rather useless.
By the way, my SUR is working now ;D. Â Thanks, BJ.
MK
edit
Huh. Strike that. I just tested the fully working SUR file that BJ helped me create, and I’m still getting full hit detection on wrecks. BJ, I think you’ve outdone yourself; you helped me do something you thought was impossible.
-
Just a brief note here…
I am happy to try anything to get a working sur, I spent hours trying Argh’s way and got 1 sur working out of the 5-6 that I made. I tried to understand your way BJ and got some results but had to guess at some of the steps, exporting as multiple groups worked some of the time, exporting as a single group worked some of the time, but the only sure-fire way was all convex groups welded together and exported one at a time and then sur-spliced.
To cut out some of the work (cons_fix) I gleaned from some of cold_void’s replies that I could rename the surs as xxx_lod1 and this worked, I no longer have to import cons_fix into my surs.
However - sometimes, one or more parts of the spliced sur will not detect hits. I am not sure why, it could be because in exporting the groups singly, I have to delete the remaining groups and export the remaining one - deleting the other groups must surely break my careful welds? But yet the majority of parts still detect hits in these cases.
BJ - when my surs do work completely, they detect hits and damage without needing a shield bubble, which I prefer to not include. SO I am bemused as to why this is.
BJ - I am happy to test out your complex method, if you do not want to publish it I would appreciate a PM to give you my email if you would be happy to part with your method for my personal knowledge? I don’t intend to make another mod once this is finished, but I am curious and would like to some day know why yours works and others’ don’t, by testing your method please.
Opr8r, I am always fascinated by the time you have spent on intricacies of FL and your greater knowledge. Would you also be prepared to compare notes with me to see where mine are failing from time to time (even when a simple re-export seems to fix it?)
I know how you have both contributed a great deal of effort and knowledge to this community, and I would hate to see any confrontation, it’s simply because you have approached the same problem from different angles.
Thank you both for not only this contruibution but for your many past contributions too, and I hope you will humour me on this guys.
-
Primitive - What I create & try to teach people - these have a convex Root, a shield bubble & a hitbox for each component for collision detection, a shield bubble & a hitbox for each component for weapon hit detection, these are basically a stripped down version of a vanilla SUR.
Am I getting this right?
There is a hitbox for the root which is both, weapon and collision detection, then there is a weapon detection hitbox and a collision detection hitbox for component X?
That means every component has 2 hitboxes??? ? -
Just import a vanilla fighter sur like bw_fighter into MilkShape and you will see.
You will need to hide each sur piece one by one and move the remaining ones about to see what they are, there are some duplicates that I mention in my other post.
Too tired to investigate myself, pc problems and sleepless nights…
zzzzzz…