CMP to SUR Conversion Tests
-
Thanks, I was going to make the old CMP 2 SUR conv program work again but after attempting to compile it I discovered I had used way too much of the code in the CMP Editor. That code is now part of my common code library making it useless to try and rebuild it. Plus, the CMP editor has the full CMP file already decoded into structures making it real easy to get at the node and leaf data. It only took about 4 hours of messing with it to get it to this point, including an autoscaling root sur…
-
Here is a request, anyone who has made a working sphere sur with at least 128 faces, would you please send me a copy of it for the program? A radius of 1.0 would be the optimal size….
-
Guess this can be taken as a Christmas present
-
**Hehehe, nobody needs a automatic SUR creator do they?
I really need a high poly sur file plz plz plz, anyone with a working high poly sphere sur would be really useful, right now I’m working with an 18 face sur which isn’t much good for making form fitting sur files.
BTW, I have already tested this in-game, see the video, no errors popping up in the server. If you want this I’m only asking for a single SUR with at least 128 faces…**
-
There’s a reason why we call him the “Hitbox King” at FWToW
-
**Thanks alot Mirhka, that will help quite a bit. The one I’m using now has so few faces I cant get it to even halfway fit any meshes.
BTW, while I’m making this exporter, I’m documenting everything I can figure out about the sur file format. I had it 99% done once before but lost the text file in a HD crash last year…**
-
Agreed, this tool is for general purpose FL surs, the best SUR will always be the one you build yourself. But for lazy butts like me it will be a very useful tool
-
lol Sushi, i think Gibbon talked about Lancer
well, a little in late but done
here the file : borg sphere
http://www.filefront.com/15224793/Borg.rara sur with 288 faces, not tested more but if you need don’t hesitate to ask
done in 3dsmax
export to .3DS
import in milkshape
export as a .sur
spliced
no modifications of the cmp done with mikshape -
OPR8R wrote:
regardless of the good work done here i still would use custom build surs for the simple fact that a complex sur being result of a complex cmp will cause way too much lagSure, I was under the impression though that we still dont know everything about the sur file format, otherwise we would be able to make surs that are working just like the vanilla ones. If LS can figure out the sur format completely, that would really be a leap forward.
-
OPR8R wrote:
regardless of the good work done here i still would use custom build surs for the simple fact that a complex sur being result of a complex cmp will cause way too much lagI keep hearing that… I’ve used some extensive surs in the past but have never really noticed a lag effect. Can someone provide me with a SUR that does cause lag?
-
Here is a start for the format….
SUR File Format Compiled By Lancer Solurus All values in HEX unless otherwise noted (Size in decimal) ***************************************** Size(d) Type Comment ** Header 4 byte 'vers' - Version 4 float 2.0 ** Section header 4 ULONG CRC 4 ULONG Surface Type 0-, 1-, 2-, 3-Equip/Ammo/Damage, 4-Ship/Station 4 byte '!fxd' - Part header 4 byte 'exts' - Tag 12 XYZ Box minimum 12 XYZ Box maximum ** Surface tag 4 byte 'surf' - Surface ** Surface header 0x00000038 4 ULONG Surface offset, bytes to next HPID or section (this addr + offset) 12 XYZ Center 12 XYZ Inertial damping 4 float Radius 1 byte Flag? 3 byte Duplicate of surface offset above 4 ULONG Bits section offset (surface header start addr + offset) 4 ULONG ? 4 ULONG ? 4 ULONG ? ** Face list header 4 ULONG Vertex list offset (this addr + offset) 4 ULONG Cmpnd/HP CRC, also something else, see last entry in manufacturing_platform_lod.sur for an example (0x00002540) 1 byte DirectX vertex type 3 byte Referenced vertex count 4 ULONG ? 4 ULONG Face count ** Face list 12 bits Face number nn xn xx xx (4 bytes) max 16,384 faces 12 bits Index or options? xx nx nn xx 1 byte Flag xx xx xx nn 2 WORD Vertex index 1 nn nn xx xx 1 byte Offset? xx xx nn xx 1 byte Flag? xx xx xx nn 2 WORD Vertex index 2 1 byte Offset? 1 byte Flag? 2 WORD Vertex index 3 1 byte Offset? 1 byte Flag? ** Vertex list 12 XYZ Vertex position 4 ULONG Cmpnd/HP CRC ** Bits section (as in 24 bit bitmap) 4 ULONG Sibling offset {Bits base addr + offset) 4 ULONG Triangle offset (triangle base addr - offset)? 12 XYZ Center 4 float Radius 4 ULONG Color (RR GG BB xx) - xx is always 00
-
BTW, thanks Mirhka, I will play with that, good thing I wrote a sur scipter so it writes the C++ code for me, I just copy and paste it into the program
-
**Mirhka, is it possible I could get the cons_fix.dat file for that borg sphere? I am nearly done with the second phase of the exporter but only my root sur is showing up. I did get one of the hardpoint surs to show up by screwing up the root sur (setting it to type 3 instead of 4).
At least FL isn’t flagging any errors on it and I can still shoot the ship. Due to one of the errors I did have I found the sur code in Common.dll ;)**
-
well if you want but the .dat have no data at all
i explainwhen a 3d object have only one sur, there is a problem
i export it with the 1.1 plugin, and have a first sur
this one doesn’t work in game
it’s a problem i encounter for a long time and i fix it like thatmake a sursplicer ini with only one part assigned to the root
splice it and obtain another sur file who works as you can see on the screenbut the .dat is blank, if i can say that, and we don’t need to import any data to the cmp
well, if it’s a problem i can do a 2 part sur with the sphere and a hide component into the borg sphere
which would be a more usual way because we meet rarely a 3d object that needs only one part
also do you want some others complex models for comparison ?
tell me.