05-17-2010, 02:14 PM
This method is the more "advanced" and tedious version, but normally has a 100% success rate unless you screw up somewhere along the way. furthermore, if you were to make a base model, you have no choice but to use this method to make a hitbox, since a base model cannot have a shield bubble, or it will cause the game to crash if i remember correctly.
I thought why write a tutorial when Star Trader (from the starport) has already written one which explains everything in a rather simple fashion? here we go:
===============================================================================
Hello gang.
Ready for another mammoth tutorial from StarTrader?
I had a lot of problems making close-fitting .sur files for my big odd-shaped ships because of following other tutorials to the letter.
But anyway, many thanks to Argh, Cold_Void, Bejaymac and Dev, and all the other guys who made my life miserable for months!
Well, I learned from my mistakes and from theirs too.
Their way is not entirely needed for what I do.
BUT - the principle is most definitely the same, the ship MUST be in several groups. You need to have them for sur file part names. The sur file CANNOT be in one part for a concave ship. I don't need break-offable bits, for me it's enough that the ship breaks apart when it is destroyed, and as long as it is made in more than one group this happens automatically in FL. But I do need a surface file that follows the outline of my ships, so that firing into empty areas between ship parts does not hit the ship. And I do NOT want big shield bubbles on my big ships.
So - here is another mammoth "My Way" tutorial again.
Tools
You will need:-
MilkShape 1.82 or 1.83
CMP Importer plugin for MilkShape
Exporter v03 plugin for MilkShape
SUR Exporter plugin for MilkShape
MAT Exporter plugin for MilkShape
The GIMP or PAINT.NET for making or editing materials / textures / colouring.
DDSConverter2 to convert your textures to DDS format
OR Photoshop + the NVIDIA Photoshop Plugin (this achieves the same result with using the dds converter)
HardCMP
UTF Editor (I use v3)
Sur-Splicer
Method
1. Import your ship model into MilkShape using the CMP Importer plugin, or make it using MilkShape or your favourite modelling program (that is Beyond The Scope Of This Tutorial (BTSOTT)!) and then import it into MilkShape by whatever means your modelling program allows. There are many plugins for MilkShape for most modelling formats, including 3DS.
Make sure your ship is NOT in a single MilkShape group before going to step 2!
If it is, then you need to break it up into several groups. This is easy to do, follow my Tutorial on splitting a model into multiple groups. But remember the max that the exporter can handle is 18 main groups. and the same applies to the number of sur main groups too!
Make sure your ship groups are named (shipname)_Hull and (shipname)_LWing etcetera. I will again use the Excalibur as my ship name for this tutorial, so my main groups are named Excalibur_Hull, Excalibur_LWing etc. Replace "Excalibur" with your own ship name. This will make your life easier when making the similar-named sur groups to match the ship groups. If you choose not to follow this naming scheme then you will need to translate my tutorial naming example more difficultly!
2. Making The SUR file
Firstly, what were my biggest problems?
a) Making the ROOT sur convex.
Why? Because I always thought the ROOT sur had to follow the shape of the largest part of the ship, the hull.
It does NOT.
b) Getting the sur group names correct.
Because some tutorial writer, who shall remain nameless and shall stay uncredited here, named his ship parts and sur parts zomgxxx_blah_blah and then failed to describe to me how to undo this correctly. Wrong!
Cost me days and weeks and months, 'cos I tried too hard to follow their way closely. Wrong - of me!
OK - the ROOT of the problem is easily solved...
c) I was until last week under the impression that ONLY the ROOT sur should be convex. WRONG! According to Bejaymac, only the root sur needs to be convex if your ship will have a shield bubble.
I bow to his greater knowledge.
I don't fit shield bubbles as I'm working on large ships and they would be dead ducks with huge great shield bubbles.
So for ships similar to the ones I am working on, ALL sur groups MUST BE CONVEX!!
And this means they cannot have sub-components either as those would make them concave somewhere or other.
Solving these problems
a) Open your new ship model. Make a sphere of at least 6 stacks and 12 slices in MilkShape that fits neatly anywhere inside the main body (fuselage) of your ship. Make sure it's not visible outside the ship body. I like to put mine in the main ship body where it is thickest, but it's not too important. Try to get it fairly central because we will give this sphere the biggest part of the ship's total mass later, and doing this will give more handling stability.
BUT - it MUST be named Excalibur_Hull_lod1 or similar, where the name is EXACTLY the same as your own ship's hull group, and with the suffix "_lod1" at the end.
And it MUST be the FIRST group that you list in Sur-Splicer's input file later on. So it's good practice to put this group at the top of the Groups tab list in MilkShape.
Why a sphere and not an oblongular globule or cube or...???
'Cos... a SPHERE is the MOST CONVEX shape EVER!
So - the CONVEX ROOT SUR problem is neatly and swiftly SOLVED!
OK - now it's your turn for the remaining sur shapes (we call them groups here to match MilkShape)!
Go and make whatever simple, low-polygon shapes you want to follow the contours of your own ship. Use ONLY spheres and cylinders. Do not use boxes, and definitely NOT faces and NOT vertices! (Boxes sometimes work but often do not, and will waste your time and effort).
Make one sur part for each of the main ship groups (the groups starting with Excalibur_ in their name).
Each time your sur group takes on a concavity, remove it and start with a new sphere or cylinder. Don't try to fix a sphere or cylinder that's gone bad on you, it takes too long and you can make it worse.
NOTE:- You will need to inspect your sur shapes very closely, sometimes when you make a bent surface it looks convex, but the faces can crease between two vertices lower into the surface than the others next to them, and this will cause a dip (concavity) in the surface. Even if it's only slight, it will still cause your sur to make the game freeze or bomb out. Mine did!
If you are lucky, reversing the direction of the face crease and making it between the two higher vertices (called Turn Edge in MilkShape) can cure the concavity. It worked for me at times. At other times I had to delete the faces and reconstruct new ones with additional vertices.
If your sur group will take on a concavity as you continue to follow your ship's contours, remove the concavity, stop that group and start a new one. You can overlap sur parts to get the coverage you want.
None of your sur groups should have any sub-components, to be sure each one remains completely convex.
Ensure that EVERY sur group is completely closed all round (i.e. it has faces on ALL surfaces) including ones that meet up with other groups or are overlapping with other groups or are inside other groups!
Ensure that each and every sur group has WELDED vertices! Pretend it's a water tank and has to hold water!
Of course if you use only spheres and cylinders you will not have these problems.
Remember again, the max number of main groups that the exporter can handle is 18, so limit your sur groups to max 18 too, or you will definitely have nowhere to anchor your 19+ ones!
Unhide all, select all, and WELD the vertices again.
If you were careful, you will have solved the ROOT and sur group concavities problems.
b) ENSURE that each SUR group is named EXACTLY the SAME as the SHIP group it will be associated with, plus ending with the "_lod1" suffix.
So if it's for Excalibur_TopLFin then it MUST be named Excalibur_TopLFin_lod1
Done them all? SAVE your model as a NEW name, e.g. ExcaliburNewSurs.cmp
CHECK that you have named all of your sur groups in the format xxxx_lod1
CHECK that you have NOT assigned any materials to any of the SUR groups. This can happen accidentally when you duplicate a shape.
So - Problem b is SOLVED! We don't need to faff about updating the cons_fix data in the sur file manually now!
Well Done!
Let's go EXPORT!
I thought why write a tutorial when Star Trader (from the starport) has already written one which explains everything in a rather simple fashion? here we go:
===============================================================================
Hello gang.
Ready for another mammoth tutorial from StarTrader?
I had a lot of problems making close-fitting .sur files for my big odd-shaped ships because of following other tutorials to the letter.
But anyway, many thanks to Argh, Cold_Void, Bejaymac and Dev, and all the other guys who made my life miserable for months!
Well, I learned from my mistakes and from theirs too.
Their way is not entirely needed for what I do.
BUT - the principle is most definitely the same, the ship MUST be in several groups. You need to have them for sur file part names. The sur file CANNOT be in one part for a concave ship. I don't need break-offable bits, for me it's enough that the ship breaks apart when it is destroyed, and as long as it is made in more than one group this happens automatically in FL. But I do need a surface file that follows the outline of my ships, so that firing into empty areas between ship parts does not hit the ship. And I do NOT want big shield bubbles on my big ships.
So - here is another mammoth "My Way" tutorial again.
Tools
You will need:-
MilkShape 1.82 or 1.83
CMP Importer plugin for MilkShape
Exporter v03 plugin for MilkShape
SUR Exporter plugin for MilkShape
MAT Exporter plugin for MilkShape
The GIMP or PAINT.NET for making or editing materials / textures / colouring.
DDSConverter2 to convert your textures to DDS format
OR Photoshop + the NVIDIA Photoshop Plugin (this achieves the same result with using the dds converter)
HardCMP
UTF Editor (I use v3)
Sur-Splicer
Method
1. Import your ship model into MilkShape using the CMP Importer plugin, or make it using MilkShape or your favourite modelling program (that is Beyond The Scope Of This Tutorial (BTSOTT)!) and then import it into MilkShape by whatever means your modelling program allows. There are many plugins for MilkShape for most modelling formats, including 3DS.
Make sure your ship is NOT in a single MilkShape group before going to step 2!
If it is, then you need to break it up into several groups. This is easy to do, follow my Tutorial on splitting a model into multiple groups. But remember the max that the exporter can handle is 18 main groups. and the same applies to the number of sur main groups too!
Make sure your ship groups are named (shipname)_Hull and (shipname)_LWing etcetera. I will again use the Excalibur as my ship name for this tutorial, so my main groups are named Excalibur_Hull, Excalibur_LWing etc. Replace "Excalibur" with your own ship name. This will make your life easier when making the similar-named sur groups to match the ship groups. If you choose not to follow this naming scheme then you will need to translate my tutorial naming example more difficultly!
2. Making The SUR file
Firstly, what were my biggest problems?
a) Making the ROOT sur convex.
Why? Because I always thought the ROOT sur had to follow the shape of the largest part of the ship, the hull.
It does NOT.
b) Getting the sur group names correct.
Because some tutorial writer, who shall remain nameless and shall stay uncredited here, named his ship parts and sur parts zomgxxx_blah_blah and then failed to describe to me how to undo this correctly. Wrong!
Cost me days and weeks and months, 'cos I tried too hard to follow their way closely. Wrong - of me!
OK - the ROOT of the problem is easily solved...
c) I was until last week under the impression that ONLY the ROOT sur should be convex. WRONG! According to Bejaymac, only the root sur needs to be convex if your ship will have a shield bubble.
I bow to his greater knowledge.
I don't fit shield bubbles as I'm working on large ships and they would be dead ducks with huge great shield bubbles.
So for ships similar to the ones I am working on, ALL sur groups MUST BE CONVEX!!
And this means they cannot have sub-components either as those would make them concave somewhere or other.
Solving these problems
a) Open your new ship model. Make a sphere of at least 6 stacks and 12 slices in MilkShape that fits neatly anywhere inside the main body (fuselage) of your ship. Make sure it's not visible outside the ship body. I like to put mine in the main ship body where it is thickest, but it's not too important. Try to get it fairly central because we will give this sphere the biggest part of the ship's total mass later, and doing this will give more handling stability.
BUT - it MUST be named Excalibur_Hull_lod1 or similar, where the name is EXACTLY the same as your own ship's hull group, and with the suffix "_lod1" at the end.
And it MUST be the FIRST group that you list in Sur-Splicer's input file later on. So it's good practice to put this group at the top of the Groups tab list in MilkShape.
Why a sphere and not an oblongular globule or cube or...???
'Cos... a SPHERE is the MOST CONVEX shape EVER!
So - the CONVEX ROOT SUR problem is neatly and swiftly SOLVED!
OK - now it's your turn for the remaining sur shapes (we call them groups here to match MilkShape)!
Go and make whatever simple, low-polygon shapes you want to follow the contours of your own ship. Use ONLY spheres and cylinders. Do not use boxes, and definitely NOT faces and NOT vertices! (Boxes sometimes work but often do not, and will waste your time and effort).
Make one sur part for each of the main ship groups (the groups starting with Excalibur_ in their name).
Each time your sur group takes on a concavity, remove it and start with a new sphere or cylinder. Don't try to fix a sphere or cylinder that's gone bad on you, it takes too long and you can make it worse.
NOTE:- You will need to inspect your sur shapes very closely, sometimes when you make a bent surface it looks convex, but the faces can crease between two vertices lower into the surface than the others next to them, and this will cause a dip (concavity) in the surface. Even if it's only slight, it will still cause your sur to make the game freeze or bomb out. Mine did!
If you are lucky, reversing the direction of the face crease and making it between the two higher vertices (called Turn Edge in MilkShape) can cure the concavity. It worked for me at times. At other times I had to delete the faces and reconstruct new ones with additional vertices.
If your sur group will take on a concavity as you continue to follow your ship's contours, remove the concavity, stop that group and start a new one. You can overlap sur parts to get the coverage you want.
None of your sur groups should have any sub-components, to be sure each one remains completely convex.
Ensure that EVERY sur group is completely closed all round (i.e. it has faces on ALL surfaces) including ones that meet up with other groups or are overlapping with other groups or are inside other groups!
Ensure that each and every sur group has WELDED vertices! Pretend it's a water tank and has to hold water!
Of course if you use only spheres and cylinders you will not have these problems.
Remember again, the max number of main groups that the exporter can handle is 18, so limit your sur groups to max 18 too, or you will definitely have nowhere to anchor your 19+ ones!
Unhide all, select all, and WELD the vertices again.
If you were careful, you will have solved the ROOT and sur group concavities problems.
b) ENSURE that each SUR group is named EXACTLY the SAME as the SHIP group it will be associated with, plus ending with the "_lod1" suffix.
So if it's for Excalibur_TopLFin then it MUST be named Excalibur_TopLFin_lod1
Done them all? SAVE your model as a NEW name, e.g. ExcaliburNewSurs.cmp
CHECK that you have named all of your sur groups in the format xxxx_lod1
CHECK that you have NOT assigned any materials to any of the SUR groups. This can happen accidentally when you duplicate a shape.
So - Problem b is SOLVED! We don't need to faff about updating the cons_fix data in the sur file manually now!
Well Done!
Let's go EXPORT!