CMP to SUR Conversion Tests
-
[wmp=320,240]http://www.digitalbrilliance.org/Videos/SUR_Export01.wmv[/wmp]
**This is the first working version, this sur is only the basic ROOT sur exported by my CMP Editor…
Double-click in video window to see it full screen.**
-
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