CMP to SUR Conversion Tests
-
When I make an automatic shed-building machine I won’t be happy if it leaves the door off, even if it is only now and then.
There are bits missing from the sur files, BW.
Not only from this model which is not important, but from BBalazs’ blooming great landscape. So it is a common problem, and the cause needs finding.
As I already said, in a small 5 metre ship it’s no deal.
BUT on a 3,000 metre dreadnought ship a missing hole 200m is a BIG problem.
Give me an ear here, I am not being pedantic just for myself - I know the use this is needed for, it is VERY important to FL modders, but it is not 100% done just yet.
Thanks for understanding, I realise you may not have the knowledge to find it, and like I said before many times I am not criticising, but on the contrary I am very grateful to you for your work.
But please talk to LS or others and try to make this perfect as possible, we have far too many 90% utilities where we need to know the “get-rounds” to avoid many hours lost.
Thanks.
-
I am not ignoring your report, StarTrader, but … I think that you are trying to do something that you should not.
The fact that you are able to make a CMP that fools the SUR Builder does not mean that there is anything wrong with the SUR Builder. It simply means that you should use another tool, such as splicing together some cylinders.
If the SUR works in-game, and is vaguely near the correct size, then it is “good”. A SUR is not supposed to look like the model.
You did not show a picture of your SUR, but it looks very much like the ship, which is above expectations for the SUR Builder:
Remember that a SUR is the computer’s view of the hit and collision area of a ship. In general, that should be a rough ellipsoid:
The fact that the SUR Builder is capable of making close-fitting SURs is great, but SURs should NOT look identical to the CMP. A SUR should look like a rough blob made up of a minimal number of polygons.
-
Ok, i also checked Bbalazs landscape. No bad geometry on first view, Fl-SurBuilder created 5 groups but left out the big plane. So the “error” must have been there. I tessalated a few more faces into it and “voila”, you have a proper sur. See the attached file.
So, yes, the surbuilder isnt perfect. But differently “not perfect”. It is building the sur on a part when the geometry is ok and enough polys are there. The bad thing is it just stops when it encounters a geometry on a part that it cannot handle and dont says nothing about. So you have to dig into it and look at all parts where no sur is build and find the reason behind. Bad thing about this is also that you dont know about the order it does that. So when it stops on a part which it cannot handle, you dont know which part that is and therefor also if the following parts are ok.
Basicly telling here, that it would be cool if the Sur-Builder would do at least a check if the amount of groups in the .cmp matches the amount of groups in the .sur and giveout a warning. Same on the order of building up the sur, if it tells you where it was on building up and it stumble, it makes it just way more easy to identifiy the part and fix it.
just my 2 cents
But again, THANK YOU Lancer & Bullwinkle for such an amazing tool, it just save a a hell of a lot time.
Slight hint : tell them that leaving out parts of the sur is a feature not a bug. M$ does the same.
cheers
CURSOR -
cursor wrote:
it would be cool if the Sur-Builder would … check if the amount of groups in the .cmp matches the amount of groups in the .sur and giveout a warning. Same on the order of building up the sur, if it tells you where it was on building up and it stumble, it makes it just way more easy to identifiy the part and fix it.Thank you for that report, Cursor, and for completing the answer to BBalaz’s question.
(also thank you to Schmackbolzen for giving BBalaz a working SUR)
I will look into the possibility of reporting mismatches in the number of groups. I am not sure whether it will be feasible to flag where a mismatch begins, because I am not sure the program will know that. But I will look into both for a future version.
Thanks!
-
i’m not sure to understand correctly so don’t hesite to correct me please
from now and if we want to use the sur builder, we have to redo a cmp with x groups ? right ?
so to use the sur builder we need a very good knowledge on the cmp format and uses of milkshape, import/export freelancer model, eventually in rebuilding a mat file alsoso clearly it’s not a “noob tool” if i can say, no ?
understand me well, i spent, spend and will spend a loooooooooooot of hours making sur, the most perfect i can in 3dsmax
for who don’t know i’m working on TOW, overfiend and me have done the hitbox, so i know how it’s hard to deal with those devilsso i’m very gratefull for all the work you can do but in my mind the tool is in first, done for all who don’t want to take a loooong time to learn how the sur works
therefore ideally, noob wants to launch the tool, select the ship/base, choose betwen bubble or wrapped and clic “make a sur”
believe me, i really appreciate any initiative to put myself unemployed
thank you to enlighten me
-
Mirkha wrote:
ideally, noob wants to launch the tool, select the ship/base, choose betwen bubble or wrapped and clic “make a sur”Good question, Mirkha!
Actually, the SUR Builder is very good for novices. It needs some work on the user interface so that it will be more obvious, but the default single-part SUR is a good approximation for most purposes.
The only time that you need to create your SUR in groups is when you want to make a multi-part SUR (shrink-wrap). And the most common case when you would want to do that is for a station. Or perhaps for BBalaz’s very cool terrain.
Sometimes there might be a purpose in a shrink-wrap SUR for a capital ship, but it would be the exception rather than the normal case.
Instead of creating a bubble-shaped SUR, the Builder wraps the outline of the model:
For most purposes the single-part SUR is an excellent compromise between bubble and shrink-wrap (multi-part). And it is the default, so just open your model and build the SUR. Two button clicks!
-
guess i have to disagree slightly with mirkha though it might have something to do with differences of experiences. fortunately gentlemen from TOW actually have figured out the cmp file structure and shared their knowledge. everyone who is used to basics of modding and usage of e.g. the utf editor and the model importers and exporters, can quickly deepen his knowledge of models in a way he can create qualities far above the expected possibilities of the old engine. i mean now models with hundreds of thousands of polys, LODs, wireframes and of course, surs. the sur builder is likely made for and nearly only good for small ships and solars as in many cases splicing a model into model parts is not worth the result. of course, such splicings could also be used for breakable parts and stuff like that but if we talk about efficiency, there is a safe way and it is called sur_splice. use a huge model and run the builder above it and you see what i mean. the amount of sur polygons is far too high and lets ignore that some pc’s get stuck for hours due to its resource consumption. yes, the splicing method has its issues and especially on large ships this might become very annoying while on small ships you can use the sur builder. maybe the splice codec has to be updated to the current knowledge of the sur file format. together with the sur builder these two would be the source of surs for every mod.
honestly, we won’t get a proper automatic sur creation tool. there will always be a model that will be surred differently than the artist wishes, if we talk about large models. we need a possibility to model surs ourselves making them working surs (isn’t it here in that topic, a geometry to sur converter in development?). the sur builder should be more a solution for minor unimportant works and/or lazy asses but not the main solution of sur creation. -
thanks Bullwinkle, but in my case, star wars ships, i assure you that for the moment one group sur is not good
imagine a x-wing or a tie like this :at the left the actual model done with the surbuilder and at the right by hand, done by Overfiend for TOW
so what i call “noob tool” is what is the tool ok, but doing the right one without any milkshape manipulations
-
Gisteron wrote:
-
the amount of sur polygons is far too high and lets ignore that some pc’s get stuck for hours due to its resource consumption.
-
honestly, we won’t get a proper automatic sur creation tool. there will always be a model that will be surred differently than the artist wishes
In general, YES, that is exactly my point, Gisteron.
Two minor details:
-
The default Single-Part SUR created by the SUR Builder uses far fewer polygons than Multi-Part. Single-Part SURS should be a good compromise for most purposes – both novice and expert.
-
We will not get a PERFECT automatic SUR creation tool. But I think that the current SUR Builder does a “proper” job for most purposes.
-
-
Mirkha wrote:
thanks Bullwinkle, but in my case, star wars ships, i assure you that for the moment one group sur is not good
imagine a x-wing or a tie like this :Your pictures do not display, Mirkha. You might try attaching them to your message.
However, I know what an x-wing and a tie fighter look like, so I can imagine what the single-part SUR would look like. And, from the computer’s point of view, I can tell you that the single-part SUR will be just fine.
You are looking at this the same way that StarTrader is; from a human POV. And that is simply not the intention of a SUR.
A SUR is the computer’s Point of View, and the computer does not care what your ship’s wings or accessories look like. The only thing the computer cares about is a blob in space that is quick to calculate. Hits are very approximate, so the precision of the SUR is unimportant.
If you want your wings to be blown off, then you will need to create your CMP in parts. In that case, a multi-part SUR will be fine.
But the single-part SUR is more than sufficient for the vast majority of models.
EDIT: A single-part SUR would even be OK for an Imperial Cruiser in most situations. An exception might be if you want to be able to destroy the shield generator bubbles behind the bridge, then you might want to create a multi-part CMP and SUR.
Another exception would be if you want to be able to land on the rear of the bridge superstructure (as Han Solo did in the Millennium Falcon), then you might want a shrink-wrap SUR.
Otherwise, the only thing that matters is that you can hit the SUR with your weapons and you bounce off if you get too close.
-
so here : http://img256.imageshack.us/img256/5662/tiecomp.jpg
for fighters you’re right i agree, the combat mod in freelancer is not really accurate … we always try to shoot the center of the ship
but i think also about the capships,http://img101.imageshack.us/img101/9498/nebbcomp.jpg
the same, at the left with surbuilder and at the right by hand
excuse me, but for me human or computer pov doesn’t mean anything
the only point of vue i can take in consideration is the players point of view
and the players want to flight near a capship, to be “closer to the action” if i can sayand i don’t talk about who want to fly through a base
http://img138.imageshack.us/img138/3397/depotcomp.jpg -
Mirkha wrote:
to fly through a baseMaybe ImageShack is down… your pictures still are not working.
However, as I said in my edit above, a single-part SUR is adequate even for an Imperial Star Destroyer, unless you want to land on it. Remember, a Star Destroyer has a shield, so the actual “hit box” is a bubble shape!
If you want to have more detail, then you can have it. It just takes more work, to make your CMP in groups.
Either way, the SUR Builder is easy to use (or will be somewhen).
As for flying through a base, yes, that is a case where you will want your CMP in groups and you will want a multi-part SUR. It is an “advanced” model, but it can be done (and has been done).
-
The sur builder requires a minimum of 5 vertices to even attempt to build a sur. You might get one out of 4 vertices if your lucky. It is due to the way the convex hull routine is made….
-
Bullwinkle wrote:
Remember, a Star Destroyer has a shield, so the actual “hit box” is a bubble shape!no, in SW, the shield is a projection between the atoms of the hull
as you can see in the Empire Strike Back, the millenium falcon is able to pass very close to the isd and stick to it
for exampleanyway i have my answers, thx
-
Mirkha wrote:
-
in SW, the shield is a projection between the atoms of the hull
-
as you can see in the Empire Strike Back, the millenium falcon is able to pass very close to the isd and stick to it
-
OK, that is consistent with some of the action in Star Wars, such as shooting off turrets and shield generators. Cool.
-
Yes, that is what I meant by “landing on the back of the superstructure”. As you say, that effect would require a close-fitting SUR.
-
-
LancerSolurus wrote:
The sur builder requires a minimum of 5 vertices to even attempt to build a sur.I assume that you mean 5 vertices per group? That might explain the leading tips of StarTrader’s Goran Wings.
Thanks, LS, I will add that to the documentation.
-
OK, stop, forget all of the above bloody nonsense!
I have made many tests including remodelling my ship more than 30 times, but we don’t need those.
It’s not to do with the ship. It fails to generate sur parts for boxes too. (And Bbalazs’ model had no sharp shapes either, all soft spherical).
Here is the problem better defined…
1. From 14 simple box shapes with 8 vertices each, only 6 boxes had surs made! This is the problem that needs fixing.
2. Secondary issue: The fin of the Goran test ship as you may remember, the forward vertex of the base is missed when the sur part is generated. The fin base is open but the wing ends were also open and those were generated correctly.
That is not a modelling problem, it is sur builder not reading all vertices, and this could be part of the 1st problem.
3. Bullwinkle, I have had it with you, don’t offend me any more, you have done that enough already and I’m really not a nice guy when I am goaded to the limit.
I am not trying to fool the tool, I need to understand why something happens, and I go to great lengths to get to that, instead of pooh-poohing it as ST’s or someone else’s whims because I am so overproud of the little that I have done and don’t want to do more, or don’t like the thought that something I have made isn’t 100%.
LS got the sur builder to where it is and it needs a little more debugging. Why ruin it for him and everyone else too?
Sur Builder does have a fundamental problem and it took some defining, because I was foolishly over-convinced that it was a problem in the model.
There is a formula / calculation problem in Sur Builder. It does not generate surs for certain simple boxes, dependent on where they are located in respect to the Origin.
So either get some help to fix it or dump it to someone else who is prepared to put in the effort, and stop trying to shift the focus on to me, I can simply throw the towel in and find better things to do with my fing time than play "dodge the sht" with you.
You seem to want to do the absolute minimum. That is not acceptable if you have taken on this project for everyone.
And as for telling them it’s the way they are doing it, or “they don’t need it”?
Bullshit!
Don’t want it /can’t be bothered? Give it to someone else who can and will, so others can get the benefit of a good tool.
A box sur around a small ship is fine, the distance from the hull is minimal. But on a huge ship of thousands of meters, the detection will be hundreds of metres away from the hull and that is not acceptable.
You seem to not want to understand that the problem is a huge problem for big ships when the sur builder makes surs with F*ing great holes in the detection. It will be useless as a tool. Get your head around it.
Thank you.
–------------------------------------------------
Files attached below.
Once Sur Builder can generate the sur part for every box in this file it should be able to generate for every shape too.
Note - I have not tested for vertical position of shapes, there may be room for testing that too.
-
It also fails with “fat triangle” shapes too - I use a box with two corners welded together to make one. Those have 6 vertices each.
And again it depends on which side of the centre-line that the shape is on.
So there could well also be similar problem in vertical position of shapes too.
-
OK, so let’s recap:
-
The majority of test reports are successful.
-
The shape of the SUR makes little difference for small models, since hit calculations are based on a percentage probability of a hit. The main concerns are SUR size and whether the SUR works in-game.
-
Shape does matter on some larger models but, even then, low poly count is more important than the exact shape.
-
Bejaymac pointed out that single-vertex “points” do not work properly in-game. He added that “knife-edge” shapes may not work, either (such as your six-vertex shape that cannot be made with any real material). My suggestion: Use 8-vertex trapezoidal prisms, with some of the vertices close together. That is a more realistic shape, anyway:
-
Lancer Solurus said that shapes need a minimum of 5 vertices, and Cursor demonstrated that some shapes may need even more vertices than that (tessellation).
-
Cursor demonstrated that closing your fin shape and tessellating satisfies the builder.
-
We have yet to see a correctly-made model that produces a SUR that is “hundreds of meters away from the surface”.
-
Your 14-box model demonstrates that shapes must be properly welded in order for the SUR Builder to follow them.
The above points cover all models and shapes that we have discussed.
It is not a matter of “wanting to do the minimum”. It is a matter of “I cannot fix something that is not broken”.
(However, you are partially correct in that I am reluctant to invest hundreds of hours in sparsely documented code that I can neither publish nor reuse. Especially when that investment would not provide a real benefit to anyone.)
What I can do – and have already begun to do – is to create a Forge repository for Lancer’s projects and to invite a couple of developers to participate in continuing to maintain them. I have not announced this because it is not finished, but I just wanted you to know that we are doing the things that can be done… and that I am not the only person involved.
-
-
OK, sorry for my grizzly moment, I was very disgruntled.
But - I do want all shapes to have a sur part generated, they do NOT have to be welded together, this has been proven.
There IS a bug in sur builder as described above, it is very easy to reproduce, and that does need fixing. I think when that is found the sur builder will be one of the most useful tools available. It IS a very important tool and should be as good as it can be.
The failing shapes in the test model are identical to ones that are detected and “sur’d” correctly, but in different locations, hence indicating a formula problem.
When the builder can detect all meshes in a model cmp without missing them accidentally as it does now, then it may be beneficial to issue a message when a mesh will not have a sur generated, e.g. if it has less than the requisite minimum vertices or when there is a knife-edge that will probably not work correctly in-game. Then the modeller can address those parts hilmself fairly easily.