Topic: Updated (probably final) with information about .modfile/model size limit.  (Read 7525 times)

0 Members and 1 Guest are viewing this topic.

Offline Kevlar

  • Lt. Junior Grade
  • *
  • Posts: 46
  • Gender: Male
Don't know why had this urge to play SFC again some weeks ago. Had not done that in some years but kickly caught up the pace on playing and, days after, on model tweaking/editing.

Even while non playing, every time I, somehow, found a decent looking 3d model, ended up saving on disk (habit that got me since sfc1). Some of them are from other games, some made by... skilled chaps like you guys . The ones from other games I ported to sfc for my own use (normally even mailed the authors  since well it takes 20 secs and I find it also a way to say "you made a great work" and tbh none ever replayed "don't")

 there is one  model tho, from BC,  that has been breaking my head. Author said sure, and I made the normal operations, have the mesh on a mod file format, taldren's model viewer displays it but both the SFC model tools and SFC3 itself don't really work with it, prompting me the message "couldn't create X mesh"

now...my question to the experts: is there a limit on the polys that sfc3/sfc3 models tools can "render" ? - this is a high count poly and maybe the taldren model viewer differs on that aspect (this is what is breaking my head, how can the model viewer display it and the game engine/sfc3 models tools can't)

anyone can give me some lights on this X mesh subject? Is there a work around?- tried researching myself but hadn't found any clue.
Should I fire, actually install, SFC2 (or SFC1) and try there?

best regards,

me:)
« Last Edit: April 25, 2009, 08:29:51 pm by Kevlar »

Offline Rod ONeal

  • D.Net Beta Tester
  • Commander
  • *
  • Posts: 3592
  • Gender: Male
Re: Need some help
« Reply #1 on: March 16, 2009, 12:10:31 am »
FWIU the X mesh limit is in the 13K poly range. Beyond that SFC3 can't generate the X mesh.
If Romulans aren't cowards, then why do they taste like chicken?

Offline Kevlar

  • Lt. Junior Grade
  • *
  • Posts: 46
  • Gender: Male
Re: Need some help
« Reply #2 on: March 16, 2009, 12:33:48 am »
thank you. does previous versions of sfc suffer from that limitation?

Offline GotAFarmYet?

  • Lt. Commander
  • *
  • Posts: 1189
Re: Need some help
« Reply #3 on: March 16, 2009, 12:54:06 am »
SFC 1 and 2 yes and no...
Basically depends somewhat on the system and allot to do with texture sizing and number of mapped ones you used, and number of ships you are loading. If the model viewer can load it usually the game will too, it just might take a week or so.
People always said they wanted the government to listen to them and now the government is listening, taking notes and names...and coming to see you soon!

America-Not the land of the free anymore...
 Its the land of the freeloaders

Remember the axiom of big government bureaucrats: If it moves, tax it. If it keeps moving, regulate it. When, finally, under the crushing weight of taxes and regulation, it stops moving, subsidize it.

Offline Kevlar

  • Lt. Junior Grade
  • *
  • Posts: 46
  • Gender: Male
Re: Need some help
« Reply #4 on: March 16, 2009, 01:13:39 am »
again thanks.
Don't think it will take a week . my system is pretty robust from cpu to ram and even a 1gb video card and the same model works in bridge commander . a pity on sfc3 tho, this is by far the best looking vor'cha mesh i saw.

Guess it is time to dig out SFC: OP from the treasure chest...

One more time, thank you and rod for the answers.

Offline marstone

  • Because I can
  • Commander
  • *
  • Posts: 3014
  • Gender: Male
  • G.E.C.K. - The best kit to have
    • Ramblings on the Q3, blog
Re: Need some help
« Reply #5 on: March 16, 2009, 02:02:05 am »
my thoughts on the x-mesh, since no one has seemed to answer what that is.

Looks like SFC pulls the information needed from the mod format (hardpoints, ect) and then converts the image to .x format (I would think that is the x-mesh).  The format you have 3d images in so direct x can display it.

My thoughts from what I have learned so far.  Haven't looked to see if .x has a limit on polies that SFC can't get around or if it is just a SFC thing.
The smell of printer ink in the morning,
Tis the smell of programming.

Offline Kevlar

  • Lt. Junior Grade
  • *
  • Posts: 46
  • Gender: Male
Re: Need some help
« Reply #6 on: March 16, 2009, 03:15:15 am »
my thoughts on the x-mesh, since no one has seemed to answer what that is.

Looks like SFC pulls the information needed from the mod format (hardpoints, ect) and then converts the image to .x format (I would think that is the x-mesh).  The format you have 3d images in so direct x can display it.

My thoughts from what I have learned so far.  Haven't looked to see if .x has a limit on polies that SFC can't get around or if it is just a SFC thing.

Not going to disagree with the battousai  ;)
At least sfc3.  I did some tests, including using the mod file of the model I wanted to port with an x file from the default vor'cha to see what would happen... sfc engine displayed the old mesh even when the default mod file was no in the models directory.
This x.mesh/.x file just killed my port to sfc3 >:(


Think previous sfc versions did not use a *.x file. At least hope so or else was searching for the OP cd's (and now installing) for nothing.

Offline marstone

  • Because I can
  • Commander
  • *
  • Posts: 3014
  • Gender: Male
  • G.E.C.K. - The best kit to have
    • Ramblings on the Q3, blog
Re: Need some help
« Reply #7 on: March 16, 2009, 07:00:40 am »
my thoughts on the x-mesh, since no one has seemed to answer what that is.

Looks like SFC pulls the information needed from the mod format (hardpoints, ect) and then converts the image to .x format (I would think that is the x-mesh).  The format you have 3d images in so direct x can display it.

My thoughts from what I have learned so far.  Haven't looked to see if .x has a limit on polies that SFC can't get around or if it is just a SFC thing.

Not going to disagree with the battousai  ;)
At least sfc3.  I did some tests, including using the mod file of the model I wanted to port with an x file from the default vor'cha to see what would happen... sfc engine displayed the old mesh even when the default mod file was no in the models directory.
This x.mesh/.x file just killed my port to sfc3 >:(


Think previous sfc versions did not use a *.x file. At least hope so or else was searching for the OP cd's (and now installing) for nothing.

Well, will say this, you got me to wonder now.  So, add another side project to me.  Ripping apart the MOD format to see how it ticks, and how to make a reder program for it (for learning of course).
The smell of printer ink in the morning,
Tis the smell of programming.

Offline Kevlar

  • Lt. Junior Grade
  • *
  • Posts: 46
  • Gender: Male
Re: Need some help
« Reply #8 on: March 16, 2009, 07:52:20 am »
SFC3 can create an xmesh on models upto 22k.... I've done it many times

What I was trying to port is above that -in fact I would dare say it is in the league of high detail  models used for CG artwork . Still good to know that SFC3 can go up to 22k .. I might give myself the trouble to gut the model of some of it's lower hull section (we never see that on sfc anyway) and try to reduce the poly count a bit...

Offline marstone

  • Because I can
  • Commander
  • *
  • Posts: 3014
  • Gender: Male
  • G.E.C.K. - The best kit to have
    • Ramblings on the Q3, blog
Re: Need some help
« Reply #9 on: March 16, 2009, 08:13:14 am »
wonder if the 22000 poly is hardcoded as a limit or after that point it errors.  If hardcoded, possible an edit could raise it in the game.
The smell of printer ink in the morning,
Tis the smell of programming.

Offline Adonis

  • Dark Slayer
  • Lt. Junior Grade
  • *
  • Posts: 475
  • Gender: Male
  • Da Death Squad ™®©
    • Star Trek Excalibur
Re: Need some help
« Reply #10 on: March 16, 2009, 08:27:30 am »
What is the model in question anyway?
Easy is the path to wisdom for those not blinded by themselves.


Offline Kevlar

  • Lt. Junior Grade
  • *
  • Posts: 46
  • Gender: Male
Re: Need some help
« Reply #11 on: March 16, 2009, 09:07:13 am »
What is the model in question anyway?


http://www.battleclinic.com/docks/dock/4566-Vor-Cha-Attack-Cruiser-details.html#4566

edited: was able to port it to orion pirates. still need to scale it and do some other things I don't really remember- haven't touched in SCF<3 in years, but at least it shows in game, getting some results was what a stubborn codfish head guy like me needed (yes, i'm objective driven. )
« Last Edit: March 16, 2009, 10:12:02 am by Kevlar »

Offline atheorhaven

  • Lt. Commander
  • *
  • Posts: 1801
    • Mare Imbrium Shipyards
Re: Need some help
« Reply #12 on: March 16, 2009, 12:14:07 pm »
Suggestion:

Try the SFC 3 Model tools.. the Recacher should be able to generate .X's for you.  If in doubt, delete the current .X's from the directory, create a blank file (you can open a new file in Notepad and save it as modelname.x without any data in it) in the same directory.  Then run Recacher, and it should work.. usually.  :)
..ooOOoo..totally useless information..ooOOoo..

Mare Imbrium Shipyards - http://mareimbrium.webhop.net

Don't bother checking out my website for the most recent updates, because I've
been too lazy to update it!  Check Battleclinic!

Offline Kevlar

  • Lt. Junior Grade
  • *
  • Posts: 46
  • Gender: Male
Re: Need some help
« Reply #13 on: March 16, 2009, 01:31:07 pm »
Suggestion:

Try the SFC 3 Model tools.. the Recacher should be able to generate .X's for you.  If in doubt, delete the current .X's from the directory, create a blank file (you can open a new file in Notepad and save it as modelname.x without any data in it) in the same directory.  Then run Recacher, and it should work.. usually.  :)

Had tried that. neither the rechacher or the model attribute editor can display the mesh, both end up giving a " can't generate x-mesh" message.
think that either there is a limit on polys that an x file/mesh can have or/and the sfc3 engine/model tools have a hard cap on polys and this model bypasses it for much.

In sfc 2/Orion Pirates, after scalling the mesh in gmax (default mesh was bigger than the SFC skirmish map 8) ) it is working. Not perfectly yet but i'll get there eventually and for the time being it is enough for me. Just hate to get beated by this stuff without having anything to show for the time lost- at least porting to SFC:OP feels like a bronze medal...

Can't do a thing about sfc3 tho.
« Last Edit: March 16, 2009, 02:24:31 pm by Kevlar »

Offline Kevlar

  • Lt. Junior Grade
  • *
  • Posts: 46
  • Gender: Male
Re: Updated with information about .mod file
« Reply #14 on: April 23, 2009, 11:50:09 pm »
So, after checking several things , finally found exactly why I couldn't port a BC ship to sfc(3).....

little info about mod file....this is valid for sfc3 only:

While taldren's mod format is  robust and capable to sustain models with +200 000 polys (just converted something with 220k polys and can use it in OP),  the .x file system/loader used by sfc3 is not, and stops converting any mod file with more  than 2.55 megabytes (around ~25  k polys)**  to .x mesh and so, objects are not loaded in the game, making a error/crash.
 

since sfc1*/sfc2/OP doesn't use a x-mesh system, they can, in theory, load any 3d model in mod format independent of the size or detail of it.


*expeculative, since have not tested with sfc1.

**ps: limit is 2.59 mb, (more like 2.5899) and it is independent of poly numbers.
« Last Edit: April 24, 2009, 05:28:22 am by Kevlar »

Offline marstone

  • Because I can
  • Commander
  • *
  • Posts: 3014
  • Gender: Male
  • G.E.C.K. - The best kit to have
    • Ramblings on the Q3, blog
Re: Updated with information about .mod file
« Reply #15 on: April 24, 2009, 01:45:23 am »
So, after checking several things , finally found exactly why I couldn't port a BC ship to sfc(3).....

little info about mod file....this is valid for sfc3 only:

While taldren's mod format is  robust and capable to sustain models with +200 000 polys (just converted something with 220k polys and can use it in OP),  the .x file system/loader used by sfc3 is not, and stops converting any mod file with more  than 2.55 megabytes (around ~25  k polys)  to .x mesh and so, objects are not loaded in the game, making a error/crash.
 

since sfc1*/sfc2/OP doesn't use a x-mesh system, they can, in theory, load any 3d model in mod format independent of the size or detail of it.


*expeculative, since have not tested with sfc1.

Makes since, from what I was looking at in the game and in the MOD files themselves, it didn't look like it used DirectX to display it out.  But couldn't look deep anough to be sure.  Another reason why SFC:OP might be glitchy on Vista.
The smell of printer ink in the morning,
Tis the smell of programming.

Offline Kevlar

  • Lt. Junior Grade
  • *
  • Posts: 46
  • Gender: Male
Re: Need some help
« Reply #16 on: April 24, 2009, 06:38:49 pm »
wonder if the 22000 poly is hardcoded as a limit or after that point it errors.  If hardcoded, possible an edit could raise it in the game.

Been thinking about that a lot.  I am curious  and since i'm rebuilding a model with high detail elements, i'm often borderline to the limit . strangely enough , the .x file image created by sfc3 can't be read by .... well anything except sfc3 and the sfc3 model tools.

 Sadly I don't have the knowledge  to go sniffing the sfc modelling tools files MeshLoaderR.dll and ModelRendererR.dll to find out.

Offline marstone

  • Because I can
  • Commander
  • *
  • Posts: 3014
  • Gender: Male
  • G.E.C.K. - The best kit to have
    • Ramblings on the Q3, blog
Re: Need some help
« Reply #17 on: April 24, 2009, 06:52:36 pm »
wonder if the 22000 poly is hardcoded as a limit or after that point it errors.  If hardcoded, possible an edit could raise it in the game.

Been thinking about that a lot.  I am curious  and since i'm rebuilding a model with high detail elements, i'm often borderline to the limit . strangely enough , the .x file image created by sfc3 can't be read by .... well anything except sfc3 and the sfc3 model tools.

 Sadly I don't have the knowledge  to go sniffing the sfc modelling tools files MeshLoaderR.dll and ModelRendererR.dll to find out.

Looked into the MOD format (hex editor of a file or three), nothing in there that seems to limit anything.  I need to learn alittle bit more of 3D modeling and how the skins are put on (the MOD file has a ton of floats in it so was hard to read).  The limit has to be the .x convertion in SFC3.  I've done some searching around and don't see a listed limit on the .x format so it is probably something in the game.
The smell of printer ink in the morning,
Tis the smell of programming.

Offline Kevlar

  • Lt. Junior Grade
  • *
  • Posts: 46
  • Gender: Male
Re: Updated with information about .mod file
« Reply #18 on: April 25, 2009, 12:13:21 am »
I suspect it is some sort of artificial hardcap. Might be wrong ofc.  I lack the computer knowledge  to go beyond a  hex sniff try on the .x file myself.

At first sight there isn't a reason limiting the .x file size to 22k pols. But whatever reads the mod file and creates the "x-image" stops doing it at around ~22k pols or 2.58 mgb mod file size (and crashes) . without the x image, the model is not loaded iin game. why? no idea.


Might even be a case of taldren deciding that 22k pols per model  is more than enough or else people will convert anything to mod file and start whinning because of performance drops- Not saying that's the reason but might be.



Offline Rod ONeal

  • D.Net Beta Tester
  • Commander
  • *
  • Posts: 3592
  • Gender: Male
Re: Updated with information about .mod file
« Reply #19 on: April 25, 2009, 01:20:44 am »
The X file might be their for the dynamic LOD since there's no difference in the .MOD file itself?
If Romulans aren't cowards, then why do they taste like chicken?

Offline marstone

  • Because I can
  • Commander
  • *
  • Posts: 3014
  • Gender: Male
  • G.E.C.K. - The best kit to have
    • Ramblings on the Q3, blog
Re: Updated with information about .mod file
« Reply #20 on: April 25, 2009, 01:56:17 am »
The X file might be their for the dynamic LOD since there's no difference in the .MOD file itself?

I am assuming the X file is used for compatibility.  Using the DirectX would make the code easier in some respects, also use the newer Vidio cards without having to recode.
The smell of printer ink in the morning,
Tis the smell of programming.

Offline Kevlar

  • Lt. Junior Grade
  • *
  • Posts: 46
  • Gender: Male
Re: Updated with information about .mod file
« Reply #21 on: April 25, 2009, 02:15:49 am »
well who knows? :) I was going to say that the  .x file is connected with the introduction of the dynamic lod system. Strongly doubt they would have gone to the trouble of changing how the models were loaded into the game just to add glows :P, but marstone has a point also, since it does increase compatibility.

 And maybe even performance also, since the x-file is always considerably smaller than the mod file. for example the mod file of the model i'm working has about 2384 kb, the corresponding x-file only has 726, almost 3.3 times smaller. in this age where everyone has 1 gb ram or more, a couple of kb's sound irrelevant, but it does add up when rendering several objects in the screen and  this games were made in a time where people had..... maybe 256 mb ram?...think sfc3 min reqs were 128 mb ram.
 
One added (happy) side feature of the dx/.x file implementation is that sfc3 "reads" a lot of texture/image formats, including dds (one thing most people have not took advantage of, it can actually reduce the file size of textures by half, and, while i'm not that wise about it, a co worker tells me it increases overall performance and should make gameplay smoother )

Offline Kevlar

  • Lt. Junior Grade
  • *
  • Posts: 46
  • Gender: Male
Re: Updated with information about .mod file
« Reply #22 on: April 25, 2009, 04:03:45 am »
ok i made some progress. the limit appears to be artificially hardcapped. it is bellow 22 k polys actually, like in the region of 2187x polys or 2,57 megabites size. i am in  doubt if the limit  is poly related or just an ARTIFICIAL harcap limit on the mod file size- sounds stupid but i just deleted the hardpoints and materials of a mod, without changing the geometry, and bingo, it loaded it .

another concuring factor is that the direct x mesh loader will simply check for "something"- might be the mod file size or the number of polys and then decide if it will create the x.file "image" or not. If it doesn't find or like whatever it looks forward to, it will simply  abort, displaying the unable to create x-mesh message without actually trying to create.

Offline Kevlar

  • Lt. Junior Grade
  • *
  • Posts: 46
  • Gender: Male
Re: Updated with information about .mod file
« Reply #23 on: April 25, 2009, 08:28:39 pm »
one more small step ... apparently i was wrong. it appears to be a poly limit, and that limit is, until proven otherwise, in the vicinity of 21814 polys.

If the model has between 21815 and  around 21850, the x loader will still try to read it, but will normally stop responding . I write normally since in 20 attempts, one time, at 21823 it actually worked, but for some reason was specific for one particular mod file.  19 out of 20 times  it will not display any error, just enters a state of guru meditation ( little bit of commodore amiga/workbench vocabulary revival). 

Once the poly number goes bellow 21815 , there is almost 100% chances the mod file will be converted to x-mesh. Luckly one of the models i have been working caps at 21810 so for a bit, i have some momentary relief.

In the end tho, I got some satisfation in pushing the "game" to it's limit, and probably having the most geometrical complex model ever to be deployed in sfc3.

Would like to end  with a escatological insight.
 Despite whatever problems sfc3 had and has (some of them psycological tbh, some people are so attached to the SFB ruleset that dismissed the game for not being sfb canonic, but that is another discussion), can't avoid feeling that the game engine was/is particularly robust considering the time it was created.

Most models that come with sfc3 had around 1000 polys, with a few exceptions going to 1500 or so. Most ambitious fan/community models made with game play (and multi player aspect) in mind  rarelly exceeded 7000 polys at that time (and those 7000 leviathans were exceptions , norm was around 5000) , even today, considering what was been released from the ST:excalibur project, most models that they use sit around 10-11 k polys. and, yet, this *little* game shipped with the ability to support single models up 3 times more complex than anything being made for games at the time.

Whatever ramblings I have made about the x-file and it's limit, need to be contextualized with the above written. almost 22000 poly margin to model was HUGE . it still is. ANd i don't know why , but have the gut feeling that this 21.81k poly limit is more a hardcaped limitation of the direct x loader than of the game engine itself.

regards,

Kevlar
« Last Edit: April 25, 2009, 09:09:02 pm by Kevlar »

Offline marstone

  • Because I can
  • Commander
  • *
  • Posts: 3014
  • Gender: Male
  • G.E.C.K. - The best kit to have
    • Ramblings on the Q3, blog
Got to say, thanks for the Guru Med ref.  Had an Amiga (A1000, A500, A2000HD). 

Finding the limits of the game is good, even tho I do not like SFC3 personally (yes one of those SFB people) but I don't say the game is a POS.  Just not one I like.  That said, I hope we can get both OP and SFC3 into the next gen in the near future.
The smell of printer ink in the morning,
Tis the smell of programming.

Offline Kevlar

  • Lt. Junior Grade
  • *
  • Posts: 46
  • Gender: Male
I have .mods with poly counts of over 22k In my SFC3 install, SFC3 can also use most image formats. PNG's and TGA's if set up right can be used for creation of transparencies without having to flip faces. JPGs for very low file space, and so forth.

can you re-check the size of any those models, or point me out to one of them. NOt a question of not trusting you, but  I can't really get anything inside with + 21815. and I really needed those ~200 more polys. ...I am doing something wrong ... hmm do you know how the models were transformed in mod form? maybe the importer I am using bugs out ,, or something....

Offline Kevlar

  • Lt. Junior Grade
  • *
  • Posts: 46
  • Gender: Male
They are scene models (a single .mod file that uses multiplue models) i.e a planet with atmosphere, moon, starbase, 2 drydocks and a ship. The one that I did was made in Gmax. Its about 22108+ The .mod file itself is only 2.56MB

They aren't released yet as the are planned for my Omega Mod.

hmm k that (might) explain a bit. Probably 21815 is the limit for a single object . your multiple models in the mod file are probably treated in a different way by the "x.loader".  or something. 
thank you.

Offline marstone

  • Because I can
  • Commander
  • *
  • Posts: 3014
  • Gender: Male
  • G.E.C.K. - The best kit to have
    • Ramblings on the Q3, blog
They are scene models (a single .mod file that uses multiplue models) i.e a planet with atmosphere, moon, starbase, 2 drydocks and a ship. The one that I did was made in Gmax. Its about 22108+ The .mod file itself is only 2.56MB

They aren't released yet as the are planned for my Omega Mod.

hmm k that (might) explain a bit. Probably 21815 is the limit for a single object . your multiple models in the mod file are probably treated in a different way by the "x.loader".  or something. 
thank you.

I was wondering if someone was to make a high poly scene instead of a single object if it would be loaded.  (make the ship in parts).  Anyone try this?
The smell of printer ink in the morning,
Tis the smell of programming.

Offline Kevlar

  • Lt. Junior Grade
  • *
  • Posts: 46
  • Gender: Male
They are scene models (a single .mod file that uses multiplue models) i.e a planet with atmosphere, moon, starbase, 2 drydocks and a ship. The one that I did was made in Gmax. Its about 22108+ The .mod file itself is only 2.56MB

They aren't released yet as the are planned for my Omega Mod.

hmm k that (might) explain a bit. Probably 21815 is the limit for a single object . your multiple models in the mod file are probably treated in a different way by the "x.loader".  or something. 
thank you.

I was wondering if someone was to make a high poly scene instead of a single object if it would be loaded.  (make the ship in parts).  Anyone try this?

was thinking the same. when i get one i'll try.

Offline Kevlar

  • Lt. Junior Grade
  • *
  • Posts: 46
  • Gender: Male


I was wondering if someone was to make a high poly scene instead of a single object if it would be loaded.  (make the ship in parts).  Anyone try this?
[/quote]

it goes over the limit. I am not entirely sure of the how's (didn't had much time to expirement) but it is possible to go above 22k polygons that way. Aparently 21815 is the limit for a single seamless object. iI'll experiment further this weekend

Offline Kevlar

  • Lt. Junior Grade
  • *
  • Posts: 46
  • Gender: Male
this is what i found after some trials- this is just very early empirical knowledge, subject to revision

mod files with "sectioned" objects (divided in parts) can go above 22k polygons.

the ~21815 poly limit is for seamless objects only. when 1 object is divided in parts, the "x mesh maker" (in lack of a better name), treats each object  like a different x-mesh.

There is sitll a maximum amount of polys that can be associated with a mod file but right now can't pinpoint it, since trying this stuff out can be very stressing, in many situations sfc3 will crash and take your system with him, forcing a reboot.

it is possible to section a model in 2 (or more parts), make it go above 22k polys  and have it displayed in game, tho visual results may not be the best, if the object is divided in more than 3 parts.


this is purely speculative, but I suspect there is a legacy aspect from SFC1/2/OP. where there were 3 "seamless" objects per mod file (the different levels of detail). When using a "mod file with 3 lods", SFC3 apparently displays all of them at the same time, giving preference (I suspect) to the more complex model, that, in theory comes on top of all others.  (this might open the possibility of makiing each object complement each other, but probably requires a lot of work/effort)
 
mod files with the _brk termination (aka break models) are treated in a different way- tho exactly how much different, I still can't precise.

that's about it