Freelancer Community Network
Reminder: Internet Explorer 6 or below are NOT supported.
HomeHome
ForumForum
WikiWiki
DownloadsDownloads
ForgeForge
Multiplayer Connection Tutorial
Collapse/Expand Login
Username:

Password:

Remember me



Lost Password?

Register now!
Collapse/Expand Who's Online
17 user(s) are online (7 user(s) are browsing Forum)

Members: 0
Guests: 17

more...
Collapse/Expand Donations
Please make a donation if you want to help keeping The-Starport online:
Collapse/Expand Advertisement
There are currently 265 users playing Freelancer on 98 servers.
September. 10, 2010


Browsing this Thread:   1 Anonymous Users



 Bottom   Previous Topic   Next Topic  Register To Post

« 1 ... 5 6 7 (8) 9 10 11 ... 38 »


Re: CMP to SUR Conversion Tests
Not too shy to talk
Joined:
2008/6/9 9:32
Group:
Registered Users
Posts: 69
Offline
Quick question from a SUR newb:

Would the creation of a utility for triangle-by-triangle conversion create too memory intensive a SUR for practical use?

I only ask because of how vanilla SURs possess just as many polygons as the actual ship model, creating a 100% seamless fit for hit and collision detection.

Posted on: 2/2 16:33

Edited by Arvis Taljik on 2010/2/2 18:44:23
Report Top
Re: CMP to SUR Conversion Tests
Home away from home
Joined:
2008/2/10 22:00
Group:
Registered Users
FLServer Admins
Senior Members
Posts: 884
Offline
@ Arvis - that actually is not a good idea. For one is the concavity issue, another is the poly count. When I was working on the original version in 2008 i did exactly that. It killed my frame rate and if I shot the ship the server and client CTD...

As it is being built now, it generates a convex mesh for each sub-mesh in the model. Each mesh is actually based on the texture. Multiple textures, multiple meshes. As far as others have discovered, only the root sur has to be convex. This means that once I get the initial test version of the program going I will start working on Delaney triangulation. As it stands now a convex hull can't be used for a tradelane since it has holes in it. That is what Delaney triangulation would solve since it would help build a form fitting sur hull.

Posted on: 2/2 20:00
Resident alien database manager
Report Top
Re: CMP to SUR Conversion Tests
Not too shy to talk
Joined:
2008/6/9 9:32
Group:
Registered Users
Posts: 69
Offline
When I said "triangle-by-triangle" I was speaking of Delaney triangulation.

Essentially I was asking if having the converter split each triangle into it's own surface (meaning NONE of the verticies are acutally shared between triangles, essentially tripling the number of verticies in the model but the polycount remains the same) would cause haneous lag when hits and collisions are detected.

Posted on: 2/2 23:11
Report Top
Re: CMP to SUR Conversion Tests
Just can't stay away
Joined:
2008/5/28 21:00
From Muncie, Indiana, United States
Group:
Registered Users
Posts: 195
Offline
Quote:
I only ask because of how vanilla SURs possess just as many polygons as the actual ship model, creating a 100% seamless fit for hit and collision detection.


As far as I'm aware, this isn't true for vanilla SURs; vanilla SURs are much, much simpler than the ship models.

On a more practical note, will this utility directly create working SURs that, in theory, should work indentically to vanilla SURs, or will it simply be a model that we export from Milkshape?

MK

Posted on: 2/3 2:26
Report Top
Re: CMP to SUR Conversion Tests
Home away from home
Joined:
2008/2/10 22:00
Group:
Registered Users
FLServer Admins
Senior Members
Posts: 884
Offline
@ Arvis - that is possible but undesirable, too many sur polys for most ships

@ mknote - it creates a sur

Posted on: 2/3 3:08
Resident alien database manager
Report Top
Re: CMP to SUR Conversion Tests
Not too shy to talk
Joined:
2008/6/9 9:32
Group:
Registered Users
Posts: 69
Offline
Then I guess my second question/assumption/issue would be:

If we follow identical naming conventions, would it be possible to build a sur from a "dumbed-down" model of our ship (built from simple geometry with no concavities) and have the SUR function given that all model objects have identical names?

OR

Following the same idea, would all the objects be compressed down to the "ROOT" with only that single object in both the SUR and the CMP?

(If that confuses anyone, I apologize in advance. I'm a veteran FL modder but VERY new to the SUR arena.)

Posted on: 2/3 17:56
Report Top
Re: CMP to SUR Conversion Tests
Home away from home
Joined:
2008/2/10 22:00
Group:
Registered Users
FLServer Admins
Senior Members
Posts: 884
Offline
@ Arvis - if you want to do that simply use the sur exporter in Milkshape, it will do exactly what you are asking about...

I am posting here that I have successfully built a fully working single hull sur file based off of a cmp model. I have also successfully built a routine to calculate the scaling value in the bits section (aka the color value).

Code:

SUR File Format
Compiled By Lancer Solurus with Adoxa's help
All values in HEX unless otherwise noted (Size in decimal)
*****************************************
Size(d) Type Comment

** Header
4 string 'vers' - Version
4 float 2.0

** Section header
4 ULONG CRC
4 ULONG Surface Type Count (!fxd, exts, surf & hpid)
4 string '!fxd' - Part header
4 string 'exts' - Tag
12 XYZ Box minimum
12 XYZ Box maximum

** Surface tag
4 string 'surf' - Surface
** Surface header 0x00000034
4 ULONG Surface offset, bytes to next HPID or section (this addr + offset)
** Surface base pointer 0x00000038
12 XYZ Center
12 XYZ Inertial damping
4 float Radius for visibility (set this large enough to surround entire object to keep it from 'popping', 1.5*radius is good)
1 byte Flag or Scaler?
3 byte Duplicate of surface offset above
4 ULONG Bits section offset (surface header start addr + offset)
4 ULONG 0 unused
4 ULONG 0 unused
4 ULONG 0 unused

** Face list header (size = 16*face lists)
4 ULONG Vertex list offset (this addr + offset)
4 ULONG Cmpnd/HP CRC or bits offset if 'last face group flag' is set
1 byte Type 4-normal face, 5-face linkage (final face list entry)
3 byte Referenced vertex count, unused by FL, simply set to 0
4 ULONG Face count

** Face list (size = 16*Face count)
12 bits Face number nn xn xx xx (4 bytes) max 16,384 faces
12 bits Opposite face xx nx nn xx
1 byte Flag xx xx xx nn
2 WORD Vertex index 1 nn nn xx xx
15 bits Opposite offset xx xx nn nn (bits 0-14)
1 bit Last Face Group Flag xx xx xx nx (bit 15) (only set if more than 1 face group)
2 WORD Vertex index 2
15 bits Opposite offset
1 bit Last Face Group Flag
2 WORD Vertex index 3
15 bits Opposite offset
1 bit Last Face Group Flag

** Vertex list (size = 16*Vertex count)
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 (this bits base addr - face base offset (0-fbo)) (if sibling offset is not 0, this is 0)
12 XYZ Center
4 float Radius
4 ULONG Scale (XX YY ZZ xx) - xx is always 00 since it's unused

** HpID section - hardpoint IDs
4 ULONG Count
4 ULONG Hardpoint CRC list (size = 4*Count)


Posted on: 2/7 3:07
Resident alien database manager
Report Top
Re: CMP to SUR Conversion Tests
Home away from home
Joined:
2008/3/18 20:44
From Planet Helsingborg
Group:
Registered Users
FLServer Admins
Posts: 948
Offline
Does this mean we can marry you now?

Posted on: 2/7 13:17
Open in new window
Report Top
Re: CMP to SUR Conversion Tests
Home away from home
Joined:
2008/2/10 22:00
Group:
Registered Users
FLServer Admins
Senior Members
Posts: 884
Offline
I'm afraid Darkness would have something to say about that.

Posted on: 2/7 19:40
Resident alien database manager
Report Top
Re: CMP to SUR Conversion Tests
Home away from home
Joined:
2008/2/10 22:00
Group:
Registered Users
FLServer Admins
Senior Members
Posts: 884
Offline





Posted on: 2/8 5:56
Resident alien database manager
Report Top
Re: CMP to SUR Conversion Tests
Home away from home
Joined:
2008/2/10 22:00
Group:
Registered Users
FLServer Admins
Senior Members
Posts: 884
Offline
Open in new window

Posted on: 2/8 6:06
Resident alien database manager
Report Top
Re: CMP to SUR Conversion Tests
Just can't stay away
Joined:
2009/10/3 20:34
Group:
Registered Users
Posts: 346
Offline
Love is in the air lol

Posted on: 2/8 10:17
* My Blog - view and download all my models*
* Miner Wars - Destructible Universe *
Open in new window
Report Top
Re: CMP to SUR Conversion Tests
Home away from home
Joined:
2008/12/26 16:55
From Xarania
Group:
Registered Users
Posts: 589
Offline
I could stare at that all night....

Posted on: 2/8 11:41
Open in new window
http://freexlr.forumotion.net - FL-XLR MOD http://www.smfweb.com/forums/MERCHQ - [MERC]
Report Top
Re: CMP to SUR Conversion Tests
Home away from home
Joined:
2008/6/2 10:17
Group:
Registered Users
Posts: 1074
Offline
ST drooooooolllllzzzz silently in the dark corner with one eye on Darkness, the other on LS, the next on everyone else... and the last one scanning the dropzone ready to pounce on the beta release as soon as it's dropped...

His straggly wispy white beard now 15" longer and 15 shades whiter on the Tide Scale...


Posted on: 2/8 23:25
Report Top
Re: CMP to SUR Conversion Tests
Starport Admin
Joined:
2008/6/24 16:40
From http://www.freeworlds-tow.net/dev
Group:
Registered Users
Starport Admin
$$$ Supporters $$$
Posts: 715
Offline
Wow. Incredible, LS. Congrats on this accomplishment!

Posted on: 2/9 2:39
Check us out on:
Twitter
Youtube
Facebook
Report Top
« 1 ... 5 6 7 (8) 9 10 11 ... 38 »