Hard Light Productions Forums

Modding, Mission Design, and Coding => FS2 Open Tools => Topic started by: Askahain on August 27, 2019, 09:44:25 am

Title: PCS2 Dae->POF conversion problem
Post by: Askahain on August 27, 2019, 09:44:25 am
Hello,

i have a question about the conversion of a specific model.

I have done this many times before but with this model strange things happen.

I export the model from blender as "dae" and load it to PCS2.

see attachment pcs2-dae.jpg

i save the model as *.pof.

After i load the pof file it shows up like this.

see attachment pcs2-pof.jpg

I have tried to change the uv-map / i delete the uv-map / i try several methods to lower the faces / ...

i have no idea why other models are working but this will not work. Can somebody give me a hint ?

With kind regards

Askahain

[attachment eaten by a Shivan]
Title: Re: PCS2 Dae->POF conversion problem
Post by: Nightmare on August 27, 2019, 09:53:34 am
Obviously PCS broke something. Have you tried saving the model as PMF instead of POF? Using different formats often fixes the issue, but sadly not always.
Title: Re: PCS2 Dae->POF conversion problem
Post by: Askahain on August 27, 2019, 10:46:34 am
Hello,

the export to *.pmf works fine.

If i try to convert the *.pmf to *.pof the same error appeard.

I think i can't use *.pmf files in FS2.

With kind regards

Askahain
Title: Re: PCS2 Dae->POF conversion problem
Post by: The E on August 27, 2019, 10:53:38 am
This kinda looks like index corruption. How many polygons does that model have?
Title: Re: PCS2 Dae->POF conversion problem
Post by: Askahain on August 27, 2019, 11:07:03 am
Hello,

the model have 283683 faces.

Is there a limit that PCS can handle ?

With kind regards

Askahain
Title: Re: PCS2 Dae->POF conversion problem
Post by: Nightmare on August 27, 2019, 11:09:29 am
There shouldn't be a limit.
Title: Re: PCS2 Dae->POF conversion problem
Post by: Askahain on August 27, 2019, 11:13:36 am
Hello,

i lowered the faces to 109352 but still the same problem.

Strange .. any more things i can test ?

With kind regards

Askahain
Title: Re: PCS2 Dae->POF conversion problem
Post by: Nightmare on August 27, 2019, 11:28:38 am
Safe as PMF in PCS-2.1

Open PMF in PCS-2.0.3

Safe as COB

Open COB, safe as POF (both with 2.0.3)

COB format was kinda broken but useful for circumnavigating such issues, sadly it got depracticed in 2.1
Title: Re: PCS2 Dae->POF conversion problem
Post by: The E on August 27, 2019, 12:20:26 pm
There shouldn't be a limit.

Not entirely correct.

What you should do is subdivide the model into chunks with no more than 65536 polygons.
Title: Re: PCS2 Dae->POF conversion problem
Post by: Nightmare on August 27, 2019, 01:26:35 pm
There shouldn't be a limit.

Not entirely correct.

What you should do is subdivide the model into chunks with no more than 65536 polygons.

There is? Is it possible that corrupted models being more common with higher polycount or is that just coincidence?
Title: Re: PCS2 Dae->POF conversion problem
Post by: The E on August 27, 2019, 01:36:17 pm
There is? Is it possible that corrupted models being more common with higher polycount or is that just coincidence?

Higher polycount models are guaranteed to cause this issue. It's a "feature" (in the heaviest air quotes possible) of the POF format itself; it represents vertices using indices into a giant array of vector values, and the index is stored in an unsigned short, i.e. an unsigned 16-bit integer. This means that no subobject can have more than 65536 vertices; if there are more, the index loops around and you get effects like what's pictured above.

The way to go around this (and this is something models like BP's Erebus use) is to have parts of the model as subobjects under detail0. Since these are not tabled as subsystems, the engine treats them as part of the LOD0 geometry.
Title: Re: PCS2 Dae->POF conversion problem
Post by: The E on August 27, 2019, 01:41:27 pm
You can find out whether or not a model is safe to convert to POF by looking at the Subobject Info box in PCS2.

(https://i.imgur.com/QJbMjaI.png)
Title: Re: PCS2 Dae->POF conversion problem
Post by: Nightmare on August 27, 2019, 01:45:04 pm
Ah ok. I was just wondering as I had this good looking Corvette from TI that Nyx upgraded which spits out its entire debris LOD when it gets hit by something (without being dead).
Title: Re: PCS2 Dae->POF conversion problem
Post by: Nightmare on August 27, 2019, 01:58:45 pm
OK the Corvette has 75.201 Vertices and Normals. Probably that's the explination.
Title: Re: PCS2 Dae->POF conversion problem
Post by: Askahain on August 28, 2019, 01:29:11 am
Hello,

the problem was the amount of the normals.

After i split the model in subparts the conversion was working as expected.

With kind regards

Askahain