Hard Light Productions Forums

Community Projects => The FreeSpace Upgrade Project => Topic started by: Kazan on September 19, 2008, 01:12:03 pm

Title: SLDC Trees
Post by: Kazan on September 19, 2008, 01:12:03 pm
Just FYI: all ships with shield meshes need to be opened and saved in PCS2 (latest build pls) and saved if they haven't been recently.  This sill build Shield Collision Trees for them, this should improve game performance.
Title: Re: SLDC Trees
Post by: blowfish on September 19, 2008, 11:21:07 pm
Is SLDC implemented and working in FS2_Open yet?
Title: Re: SLDC Trees
Post by: Kazan on September 19, 2008, 11:28:13 pm
been since around when PCS 2.0.3 was released

literally took me less than an hour
Title: Re: SLDC Trees
Post by: WMCoolmon on September 19, 2008, 11:31:28 pm
I realize you've probably been asked this a gazillion times, but can you implement the IBX chunk in PCS2 at some point? I don't know what you'd need to do to generate it from PCS2, but the ability to copy an existing IBX file into the POF would be a good start, provided it wouldn't break forwards compatibility.
Title: Re: SLDC Trees
Post by: Kazan on September 19, 2008, 11:43:00 pm
i have NFC the format of that data or how to generate it.

FS2 caches the IBXes anyway in a separate file, and moving such information into POF would best be done by creating an SOBJ3 chunk

get to designing it :P
Title: Re: SLDC Trees
Post by: Goober5000 on September 20, 2008, 12:44:15 am
I realize you've probably been asked this a gazillion times, but can you implement the IBX chunk in PCS2 at some point? I don't know what you'd need to do to generate it from PCS2, but the ability to copy an existing IBX file into the POF would be a good start, provided it wouldn't break forwards compatibility.
Er, why?  The two formats store the same information but in (naturally) different formats.  So putting them in the same file would be redundant.

Now in a lot of cases redundancy can be useful.  But in this case, I'm worried about the POF file supplying IBX information that isn't actually correct/up-to-date.

Considering that mods are supposed to be supplying IBX files anyway, and also considering that FSO will regenerate IBX files if it needs to, I really don't think PCS2 needs this functionality.
Title: Re: SLDC Trees
Post by: WMCoolmon on September 20, 2008, 01:52:13 am
Er, why?  The two formats store the same information but in (naturally) different formats.  So putting them in the same file would be redundant.

Now in a lot of cases redundancy can be useful.  But in this case, I'm worried about the POF file supplying IBX information that isn't actually correct/up-to-date.

Considering that mods are supposed to be supplying IBX files anyway, and also considering that FSO will regenerate IBX files if it needs to, I really don't think PCS2 needs this functionality.

The entire point of IBX files was for them to be included in VPs.  There was never supposed to be this crap of having to clean out the cache folder.  You just generate a good set of IBX files, put them in a VP, and that's the end of the story.  Having an IBX file existing outside of a VP simply means that you are doing something wrong.  This responsibility is almost entire on the mod makers of course, but individuals could fix things for themselves if they simply bothered to do it.  Remember it stands for Index Buffer eXchange: you generate it once, then distribute it to everyone else.

I added this feature as a courtesy, but years later people still refuse to use it the way it was intended.  So I simply refuse to make it easier for people to do stupid things, which is why I will never allow code to be added which makes it easier to use IBX files other than how they were intended.  And IBX files were never even supposed to exist at this point anyway, instead being included in the POF itself by something like PCS. 

i have NFC the format of that data or how to generate it.

FS2 caches the IBXes anyway in a separate file, and moving such information into POF would best be done by creating an SOBJ3 chunk

get to designing it :P

I assume that FS2 relies on the data, internally, being of some specific format so rewriting the SOBJ chunk would either mean keeping the present data around, in which case you'd be better off doing what I was saying and putting it in an IBX chunk, or rewriting the collision checks.

As for generating the data, it seems if you do a search for "ibuffer_info" in modelread.cpp and modelinterp.cpp you'll get most of the generation code. Most of the actual geometry processing seems to occur in 2d.cpp (make_index_buffer) and gets called from modelinterp.cpp, but that's just from skimming it.
Title: Re: SLDC Trees
Post by: Bobboau on September 22, 2008, 08:26:11 pm
a new subobject format SHOULD be a goal, it is insaine to have your game specific model files needing to be JIT converted to a more engine friendly form and cached in a second file. however simply pasting the current IBX files into the POF is almost as silly.

oh, look at the time.... /*runs*/
Title: Re: SLDC Trees
Post by: Vasudan Admiral on September 25, 2008, 01:37:15 am
Just FYI: all ships with shield meshes need to be opened and saved in PCS2 (latest build pls) and saved if they haven't been recently.  This sill build Shield Collision Trees for them, this should improve game performance.
This has now been done. :)
Title: Re: SLDC Trees
Post by: chief1983 on October 07, 2008, 12:55:03 pm
It doesn't even have to be JIT, you can always just tick the box in the launcher to generate all IBXs for you so you don't have to worry about it later.  If a mod supplies them then you also don't have to worry about it.
Title: Re: SLDC Trees
Post by: Zacam on October 07, 2008, 02:38:00 pm
However, the generate IBX box in the launcher does not generate the same IBX's (or the TSB's at all) as running the game and viewing in F3.
Title: Re: SLDC Trees
Post by: chief1983 on October 07, 2008, 02:46:57 pm
That sounds like a bug to me then.  Is it mantised?
Title: Re: SLDC Trees
Post by: karajorma on October 07, 2008, 02:51:25 pm
However, the generate IBX box in the launcher does not generate the same IBX's (or the TSB's at all) as running the game and viewing in F3.

That would explain a hell of a lot actually. I think I've seen that bug myself but given that I'd used the projects FTP in between using a ship in the lab and using it in FRED I assumed I must have downloaded a newer version of either the models or IBX files in the meanwhile and didn't think much of it.