Author Topic: PCS 2 Wishlist thread  (Read 26256 times)

0 Members and 1 Guest are viewing this topic.

Re: PCS 2 Wishlist thread
Think I asked about this years ago, but there were other things more important at the time.  I tried doing it for Saga, but it became nearly impossible with pcs2/collada not keeping the order.
That's cool and ....disturbing at the same time o_o  - Vasudan Admiral

"Don't play games with me. You just killed someone I like, that is not a safe place to stand. I'm the Doctor. And you're in the biggest library in the universe. Look me up."

"Quick everyone out of the universe now!"

 

Offline zookeeper

  • *knock knock* Who's there? Poe. Poe who?
  • 210
Wish: instead of displaying the poly/tricount, display the vertcount. That's what really matters, and it's easy to accidentally go over the current vertex limit of 65536 (*) while all you see is the poly/tricount which presumably doesn't really matter anyway (or at least tends to matter less often than the vertex limit).

(*) At least I believe that's what the limit is. PCS2 can save more than that, but it cannot open the resulting .pof anymore. FS2O can load and use those models, but the normals of vertices which went over the limit are garbled. There might be other issues too, but those are the ones I'm familiar with.

 

Offline Spicious

  • Master Chief John-158
  • 210
Wish: instead of displaying the poly/tricount, display the vertcount. That's what really matters, and it's easy to accidentally go over the current vertex limit of 65536 (*) while all you see is the poly/tricount which presumably doesn't really matter anyway (or at least tends to matter less often than the vertex limit).
Good idea. Done.

As far as I can remember, it's a POF format limitation.

 

Offline Kopachris

  • 28
  • send penguins
    • Steam
    • Twitter
Wish: instead of displaying the poly/tricount, display the vertcount. That's what really matters, and it's easy to accidentally go over the current vertex limit of 65536 (*) while all you see is the poly/tricount which presumably doesn't really matter anyway (or at least tends to matter less often than the vertex limit).
Good idea. Done.

As far as I can remember, it's a POF format limitation.

Not a POF format limitation specifically, but more of a general limitation (which should be implemented by the engine), since your POF files better damn well not be near 2GB anyway (the "number of vertices" variable stored in the file is a signed int32, according to http://www.hard-light.net/wiki/index.php/Bsp_data_structure).
----
My Bandcamp | Discord: Kopachris#0001 | My GitHub

 

Offline zookeeper

  • *knock knock* Who's there? Poe. Poe who?
  • 210
Good idea. Done.

Cool, thanks.

However... looking at what the vertex count field says, it seems I really don't understand what the limits are, after all. The (PCS2) code is difficult enough for me to read that I can't find anything in there; can you give any kind of pointers as to where the low-level mesh data read/write operations are? For one, the displayed vertcount implies that vertices aren't getting split the way I thought they were, and I can get models with corrupted normals even when neither polycount nor vertcount exceeds 30k, let alone 65k.

I'm starting to think that it's more along the lines of vertcount+polycount+normalcount having to remain below a limit (of 65536?) or some other combination like that, instead of there being too many of any single thing.

 

Offline Kopachris

  • 28
  • send penguins
    • Steam
    • Twitter
Out of curiosity, is the source on Sourceforge still the latest source?  It looks like the last commit was sometime in March.
----
My Bandcamp | Discord: Kopachris#0001 | My GitHub

 

Offline Spicious

  • Master Chief John-158
  • 210
Not a POF format limitation specifically, but more of a general limitation (which should be implemented by the engine), since your POF files better damn well not be near 2GB anyway (the "number of vertices" variable stored in the file is a signed int32, according to http://www.hard-light.net/wiki/index.php/Bsp_data_structure).
The limitation here is on the indexing, not the total:
Code: [Select]
ushort vertnum[i]
ushort normnum[i]

However... looking at what the vertex count field says, it seems I really don't understand what the limits are, after all. The (PCS2) code is difficult enough for me to read that I can't find anything in there; can you give any kind of pointers as to where the low-level mesh data read/write operations are? For one, the displayed vertcount implies that vertices aren't getting split the way I thought they were, and I can get models with corrupted normals even when neither polycount nor vertcount exceeds 30k, let alone 65k.

I'm starting to think that it's more along the lines of vertcount+polycount+normalcount having to remain below a limit (of 65536?) or some other combination like that, instead of there being too many of any single thing.
Vertices don't have to be split, but for each vertex we need to store all of its normals, which is somewhere between 1 and the number of polygons containing that vertex, depending on smoothing. There's no sharing of normals, so a normal used by two vertices is stored twice. Unless your model is completely smooth (one normal per vertex), you're going to overflow normal indexing long before you hit the vertex limit.

Out of curiosity, is the source on Sourceforge still the latest source?  It looks like the last commit was sometime in March.
Pushed.

 

Offline zookeeper

  • *knock knock* Who's there? Poe. Poe who?
  • 210
Vertices don't have to be split, but for each vertex we need to store all of its normals, which is somewhere between 1 and the number of polygons containing that vertex, depending on smoothing. There's no sharing of normals, so a normal used by two vertices is stored twice. Unless your model is completely smooth (one normal per vertex), you're going to overflow normal indexing long before you hit the vertex limit.

A-ha, thanks, I think I finally get it now. That explains why normals of vertices past a given point are made of seemingly garbage data; it can't index all the normals it wants to, so the indexing wraps back to 0?

So, in theory (and I'm not saying this would be a good idea, just that it'd be possible), one could sort of fix the issue like this: for all normal index numbers which would not fit in an ushort, find the closest matching existing normal and point to that one instead. Right?

 

Offline Talon 1024

  • 29
  • How do you turn this on?
    • Mods, Games, and Stuff
I would want to use a set to store each unique normal, and then, convert that set to a list, and index all of the normals by finding the index of the normal in the list.
To understand religion, you need to understand morality first. | WCSaga website | WCSaga Forum | 158th website | 158th forum | Project Leader: WC: Hostile Frontier | WCHF Thread at CIC | Wing Blender | Twist of Fate | Multipart turrets on angled surfaces, tutorial included. | My Google Drive stuff | To convert speeds from WC to WCS, multiply both the cruise speed and the Afterburner speed by 0.15625 (5/32)

FS2 Mods I'm waiting on: Inferno 10th Anniversary
Current Project: Contestant Android app, Learn4Life iOS app, Blender Commander (importer).
The FreeSpace Font Foundry is back in action!

 

Offline Spicious

  • Master Chief John-158
  • 210
It seems
Code: [Select]
+offset vertex_data // Each vertex n is a point followed by norm_counts[n] normals.
is misleading and normals don't actually need to be stored with their positions. Without that constraint, the limit is now 64k total normals per submodel. Please give it a try: pcs2_2014-01-04.7z. As an added bonus, this build includes some performance fixes for POF load and save and Collada imports. It will most likely require the x86 Visual C++ 2013 redistributable.

So, in theory (and I'm not saying this would be a good idea, just that it'd be possible), one could sort of fix the issue like this: for all normal index numbers which would not fit in an ushort, find the closest matching existing normal and point to that one instead. Right?
Yes. I think we could choose which normals to keep a bit better with clustering though.
« Last Edit: January 03, 2014, 07:09:50 am by Spicious »

 

Offline zookeeper

  • *knock knock* Who's there? Poe. Poe who?
  • 210
It seems
Code: [Select]
+offset vertex_data // Each vertex n is a point followed by norm_counts[n] normals.
is misleading and normals don't actually need to be stored with their positions. Without that constraint, the limit is now 64k total normals per submodel. Please give it a try: pcs2_2014-01-03.7z. As an added bonus, this build includes some performance fixes for POF load and save and Collada imports. It will most likely require the x86 Visual C++ 2013 redistributable.

Seems to work! :yes: Super awesome, thanks a lot. I'll do more testing on it and tell if I find anything amiss.

 

Offline The E

  • He's Ebeneezer Goode
  • 213
  • Nothing personal, just tech support.
    • Steam
    • Twitter
This build seems to have a bug where subobject normals are concerned. Opening the Solaris pof yields these results:

If I'm just aching this can't go on
I came from chasing dreams to feel alone
There must be changes, miss to feel strong
I really need lifе to touch me
--Evergrey, Where August Mourns

 

Offline Nyctaeus

  • The Slavic Engineer
  • 212
  • My "FS Ships" folder is 582gb.
    • Minecraft
    • Exile
I have the same problem with some hi-poly model I converted. Half of the ship looks the same as the Solaris from The E's screenshot. It causes both PCS2 and a game to crash, while PCS is sometimes able to open the model.
Exile | Shadow Genesis | Inferno | Series Resurrecta  | DA Profile | P3D Profile

Proud owner of NyctiShipyards. Remember - Nyx will fix it!

All of my assets including models, textures, skyboxes, effects may be used under standard CC BY-NC 4.0 license.

 

Offline Spicious

  • Master Chief John-158
  • 210
And that's why you scope variables as tightly as possible. New build is at pcs2_2014-01-04.7z.

 

Offline MatthTheGeek

  • Captain Obvious
  • 212
  • Frenchie McFrenchface
This build shows textures with UV flipped on the V axis.
People are stupid, therefore anything popular is at best suspicious.

Mod management tools     -     Wiki stuff!     -     Help us help you

666maslo666: Releasing a finished product is not a good thing! It is a modern fad.

SpardaSon21: it seems like you exist in a permanent state of half-joking misanthropy

Axem: when you put it like that, i sound like an insane person

bigchunk1: it's not retarded it's american!
bigchunk1: ...

batwota: steele's maneuvering for the coup de gras
MatthTheGeek: you mispelled grâce
Awaesaar: grace
batwota: oh right :P
Darius: ah!
Darius: yes, i like that
MatthTheGeek: the way you just spelled it it means fat
Awaesaar: +accent I forgot how to keyboard
MatthTheGeek: or grease
Darius: the killing fat!
Axem: jabba does the coup de gras
MatthTheGeek: XD
Axem: bring me solo and a cookie

 

Offline Spicious

  • Master Chief John-158
  • 210
Overwrite your old dlls with the ones in the archive.

 

Offline Bryan See

  • Has anyone really been far as decided to use even go want to do look more like?
  • 210
  • Trying to redeem, but under Tiger Parents
    • Skype
    • Steam
    • Twitter
And that's why you scope variables as tightly as possible. New build is at pcs2_2014-01-04.7z.

Hello. I downloaded the file, but I can't run because the required DLL file, MSVCP120.dll is missing from my computer. I downloaded that DLL file, and put it inside the same directory as the new PCS build, but it won't start correctly (0xc000007b). I am currently running Windows 7.
Bryan See - My FreeSpace Wiki User Page (Talk, Contributions)

Full Projects:
Shattered Stars

Campaigns:
Lost in the Mist - Cyrene vs. Psamtik
FreeSpace: Reunited

Ships:
GTS Hygeia, GTT Argo, SC Raguel

Tools:
FSO TC/Game template

I've been under attack by Tiger Parents like Jennifer Pan...

 

Offline Spicious

  • Master Chief John-158
  • 210

 

Offline Bryan See

  • Has anyone really been far as decided to use even go want to do look more like?
  • 210
  • Trying to redeem, but under Tiger Parents
    • Skype
    • Steam
    • Twitter
I managed to get it running. Thanks a lot, Spicious :)
Bryan See - My FreeSpace Wiki User Page (Talk, Contributions)

Full Projects:
Shattered Stars

Campaigns:
Lost in the Mist - Cyrene vs. Psamtik
FreeSpace: Reunited

Ships:
GTS Hygeia, GTT Argo, SC Raguel

Tools:
FSO TC/Game template

I've been under attack by Tiger Parents like Jennifer Pan...

 
Re: PCS 2 Wishlist thread
Hey Spicious, could you please take a look at the file attached? (Collada, Blender exported) As far as I can tell, the texturing is stored correctly in the DAE, but it's not being imported in PCS2...

[attachment deleted by an evil time traveler]