Problems with making SUR files? Ask here!
-
Thought it better to start this thread anyway instead of clogging up the SUR Generator thread.
BBalazs wrote:
Hi ST!The regular export convex meshes using sur exporter 1.1 has never been perfect for me… The hitbox worked, but I got a red error message in the server console, and random crashes.
Anything involving sur splicing has never worked. The hull part worked perfectly, but nothing beyond that. Even Mirkha’s methods ended up like this, no matter how subtle I’ve been. Guess I’m unlucky?Hi BBalazs, nice to see you again.
OK now I see why - you are not clear on the part (milkshape group) names and you haven’t been making them match. So the only one you have that matches is “root”, and that is why only root works.
When you look at a part name in Milkshape which is for example “ship_LeftWIng”. The matching sur part must be named “ship_LeftWing_lod1”. That is all. And every sur part must have a matching part in the cmp. The confusion comes in because many people add dummy groups and name them silly names. (zomgbayxx). I entirely disagree with silly names. If you need extra cmp groups then split up a larger Milkshape group and rename the second part, and use that name for the additional sur part. Simples.
When you use SUR Splicer you must be sure to use the same names and also ending with _lod1.
To make it easier for myself, when I use the convex tool I immediately rename the new part as the same name and with _lod1 on the end.
So for ship_LeftWing it becomes ship_LeftWing_lod1.
Then when I export each part individually from Milkshape to use with SUR Splicer, I keep the same name so it ends up as ship_LeftWing_lod1.sur
Then when I make the input file for the SUR Splicer, the entry line for this part becomes:
ship_LeftWing_lod1.sur ship_LeftWing_lod1And then there is no need to import the Cons_fix.dat file, because this is what that file is fixing. It is already fixed.
BBalazs wrote:
However, remember LS’s SUR Builder? The very last version works great. The only problem was that it forgets some meshes
Yes it is important to remember this problem with SUR Builder for those who did not use it before.
BBalazs wrote:
- here is the solution: create a copy of your model, use milkshape’s Subdivide 4 on the problematic part’s meshes, export as CMP, and build a SUR for that. As group names are the same, it will work for your original model. And no errors, no nothing. Perfect collission detection.
Exactly. The only problem I have with sur builder is that it does not tell us that it missed a part. It would speed things up dramatically as we would not need to manually check every part on a large model to see that it has a sur part.
And a shield bubble option for small ships would make it absolutely great.
BBalazs wrote:
On the other side, however, I sometimes recognise the need for SUR files that have more than 18 convex meshes. This is a problem inherent to the CMP Exporter - it badly needs this limit extended. If it could export 256 parts instead of 18, the SUR Builder could create SURs of incredible detail, useful for extra large objects.
Yes, correct.
Note - the SUR Exporter version 1.1 does not always make working sur files. Unfortunately, version 1.2 is much worse.
BBalazs wrote:
The SUR Builder, nevertheless, has an option for this - in theory. It could remap an existing single-part mesh into a multi-part mesh based on your Groups in Milkshape. By building a new CMP, this feature could counter the CMP exporter’s limitations. Unfortunately, this doesn’t seem to work all the time, particularly if you have a very lot of groups in your single-mesh CMP.
There is a misunderstanding here….
SUR Builder cannot separate a single-group ship into multiple groups. Single-group / single mesh means the modeller exported the CMP model as “Number of Groups = 1”, instead of setting “Number of Groups = n” and then setting the “Group Quantities:” to the correct number of parts in each of the “n” groups.
For SUR Builder to be able to generate a separate SUR part for each Milkshape group, the groups must be already separated, and exported as distinct groups by setting “Number of Groups = n”. Then if each group has only 1 part the “Group Quantities:” for that group should be set to 1.
When a group has more than one part (for example in some of my models I will have an engine intake, the engine, and the engine exhaust = 3 parts in this engine’s group), then this value should be set to the number of parts in that group (in this case = 3).
But the same limitation is 18 groups max to export from Milkshape.
Then SUR Builder can see the separate groups.
If the model has more than 1 group, then SUR Builder can either treat the whole model as 1 group and make only 1 sur part to cover all of the model, or generate a sur part for each group separately.
This is what is meant by single-part and multi-part in SUR Builder.
BBalazs wrote:
So, if this unlucky fellow that could never get a working sur made was pulled out of the trouble by LS’s SUR Builder, I’d say it is -the ultimate- SUR tool to all your needs.
Nevertheless, for high resolution SURs (tha need far over 18 convex meshes, like planetary terrain), either a fix to the SUR Builder’s CMP remapping method, or a massive expansion to the CMP Exporter’s part limits would fill in that last gap.
Yes, we’re just back to if SUR Builder at least told us which cmp groups were not generated, then we could easily fix those groups by dividing and convexing them out a little. But it can take a long time to spot which ones have no sur part manually.
TheDVDMan: Yes.
-
Allow me to clear that misunderstanding a little, ST. What I said there - I did mean it. Permit me to explain. Better yet, I will provide an example file.
Please download the attachment - it contains a fighter’s cmp, built by my brother as his first experimentations with milkshape. Also, please follow the next few steps to see what I -exactly- mean.Open the file in UTF Editor - see that it only contains one part: Elf.3db. Conclusion, it was exported using number of groups = 1.
Unzip anywhere, except Sur Builder’s output folder. Now, open SUR Builder. You can generate a sur file for it, it will be a single shrink wrap for the whole ship - but this doesn’t matter for our point. In SUR Builder, you can see a button called “ReMap Single-Part CMP into One-Part-per-Mesh (for Multi-Part SUR) –---- (still buggy)”
Go ahead and click. Select pmi_fighter.cmp. SUR Builder will inform you that it has created a new file: output\pmi_fighter.cmp.
(This is the point where you will get all sorts of error messages if you have many milkshape groups in your model. pmi_fighter should work, though)If you check output\pmi_fighter.cmp in UTF Editor, you will see that it now contains many more .3db groups. Just as if it was exported with “number of groups = n”
Now, open output\pmi_fighter.cmp in SUR Builder. I used the settings: duplicate radius 0.1, Min-Max sort type 2, Secondary sort (default, active), no animation (to save my machine from slowing down to a crawl), and the most important: multi-part.
Sur is generated, and saved. Open pmi_fighter.cmp in HardCMP and check the new sur. It is a per-milkshape-group, form-fitting, multi-part sur.
Of coruse, quite a few parts are not present in the sur, like the wings. That can be solved by subdividing the base model.So, when I said that this gives us a possibility to override the cmp-exporter’s 18 part limit, I did mean it.
Nevertheless, I attempted to export my planetary terrain mesh (127 milkshape groups) as a single-part (number of groups = 1) cmp, and then remap it with SUR builder. Unfortunately, I got an error message - nevertheless, a faulty cmp file did actually get built. It did not load in hardcmp, but I could load it in SUR Builder, and I’ve seen it generate all the 127 sur parts, one after the other. Still, poor SUR Builder failed to save the sur file, probably because it failed to remap the cmp correctly.Technically, sur builder is a 2 in 1 tool, and it would solve all our sur-related problems if it could just cope with massive multi-milkshape group CMPs.
-
OK, now I got you, sorry, I have not used SUR builder in this way before.
I will check it out when I get time but I see what you mean.
But I do know it works also in the way I described it.
So in any case, we do need a better sur tool then, to stop the long manual trial-and-error methods.
EDIT: Correct, I checked it out. It makes 33 groups.
And it does make a sur that looks right in HardCMP from the new cmp but I haven’t tested it.
-
I got a question too:
With every method I tried, one problem appeared:
All Meshes, but not the root mesh, won’t collide with any obejct. But this just happens if players fly this ship!I tried it with sur splice, sur builder, tutorials or Mirkha with infinite hitboxes… no success (multipart Sur).
My group names are correct, the cons fix file is correct too, surmeshes are convex.
-
i experienced that as well. seems that the sur splicer is somewhat outdated. however, with the multipart sur method all parts detect projectile impact. only thing is object collision and missile impact. oh and the aiming lead is always in the middle of the sur mesh attached to root.
-
It is frustrating, many hours and painful testing with lots of failures.
OK - put up your sur file and cmp and we’ll take a look for you.
-
Hi ST, I know request this may greedy, but after many of fail on sur made me “terrified” on sur and related CTD…. So for avoid the “sur problem” become a shadows of my heart… i want to know all detail about “How to make a right and 100% working sur for a Ship/Station/Asteroid model”, Please can you make a video tutorial for this? I believe many other people need this too.
-
Hi NeXoSe
A video already exists here
Play it a few times, it should become clear.If you still have questions or problems after that just ask again.
-
StarTrader wrote:
Hi NeXoSeA video already exists here
Play it a few times, it should become clear.If you still have questions or problems after that just ask again.
Well, actually i already seen the video long time before, but still no idea with it.
The video showing how to import SUR data to CMP file and make model fit with hitboxs… but that not all i want to know. I want to know the full step: First create a SUR for a simple multi part model Then Import SUR data to Model…
Setps in the video:
1, Create a box, change group name to z_kalida_shoals_root, add Materials to the model, name it z_kalida_shoals_sur;
2, Output file using CMP exporter v 1.2.1, file name kalida_shoals_root.cmp, scale down 1, group 1;
3, Open kalida_shoals.cmp and kalida_shoals_root.cmp (Notice that, this one is a box, why it can be root?). Drop z_kalida_shoals_root_lod0.vms and z_kalida_shoals_root.3db to kalida_shoals.cmp;
4, Change Cmpnd->Root->File name to z_kalida_shoals_root.3db, this will change cmp root to z_kalida_shoals_root.3db right?
5, Open a author file? for using other cmp’s data? But how the data fit with this cmp?Humm many problem…
-
The video is showing how to add the extra parts to the CMP to match all the .sur parts.
He already exported the sur parts, so it is a bit confusing there.
I don’t have a video but here is my old tutorial:-
Tutorial - Simple SUR files for big ships - My Way!
Try it, I made it very easy and step-by-step, but you must follow it closely.
You can use the Convex Tool in MilkShape to get every sur part convex, and watch the group and sur part names, they must match.
I’ve reformatted and attached the tutorial below as a .pdf file in the .zip
-
@StarTrader: Say, this whole bible works also with stations and insainly big turrets? Or capital ships is the only purpose of it?
BTW can you link me up to a download of this SUR Splicer? -
I don’t know about turrets or terrain using sur splicer, I only make this type of sur for ships.
For turrets I resized existing surs.
No, I will not give you the link to sur splicer, it is easy and so you need to find it yourself in the downloads section.
Once you find it you will know how to find other things you need too.
It’s for your own good, believe me.
-
Skotty. wrote:
I got a question too:With every method I tried, one problem appeared:
All Meshes, but not the root mesh, won’t collide with any obejct. But this just happens if players fly this ship!I tried it with sur splice, sur builder, tutorials or Mirkha with infinite hitboxes… no success (multipart Sur).
My group names are correct, the cons fix file is correct too, surmeshes are convex.
Discovery Mod developer here.
I have this exact issue. Ship works perfectly as a solar object but only the root registers hits when I fly it.
The thing is that when I have other developers test the hitbox, it works perfectly for them. As in, I give them the same CMP/SUR that doesn’t work for me, and when they fly the ship in question, all hitboxes respond accordingly. Meaning something must be wrong either with my machine, my Mod installation, or something similar.
Has anyone found a solution to this issue?
-
Very odd.
Did you try launching yourself in the ship, switch accounts, start another game, launch in another ship type and test the other ship by collisions & gunfire? This is a bit tricky the first time but you get used to doing it. Choose a quiet system!
There is also this way:
http://forums.seriouszone.com/showthread.php?55840 -
StarTrader wrote:
Did you try launching yourself in the ship, switch accounts, start another game, launch in another ship type and test the other ship by collisions & gunfire? This is a bit tricky the first time but you get used to doing it. Choose a quiet system!
I tested the ship in Single Player mode. Nevertheless, I crashed it into structures and got the result I mentioned.
There is also this way:
http://forums.seriouszone.com/showthread.php?55840Thanks, but as I already said, I tested the ship as a stationary solar object and all of the hitboxes work. It’s only when I fly it that it does not work. Once again, my fellow developers have tried the same exact CMP/SUR files on their machines and all hitboxes registered hits in flight. I thought I was an oddball in this situation but with others reporting the same issue, it makes me wonder…
-
For me the hitboxes are working good for players.
The only thing that does not work for players flying the ship: physical collisions with other parts than the root.