igorseabra4 / HeroesPowerPlant

Level editor for Sonic Heroes (PC, GameCube, XBOX, PS2) and Shadow the Hedgehog (GameCube, XBOX, PS2). Integrates editors for various file types with a 3D view of the stage.
27 stars 14 forks source link

[Enhancement/Feature] Tri-Strip Imports / Optimized Import for GEO/COLI #60

Open dreamsyntax opened 1 week ago

dreamsyntax commented 1 week ago

Exporting original geometry and collision and re-importing shows higher vert/tri count. As such our importer is not as efficient as Sonic Team's original was for both GEO and COLI. This makes it difficult to create custom stages as limits are hit much sooner, and also costs more cycles per geometry rendered.

Flow: Geo/Coli: .DAE -> (Assimp) -> NVTriStrip -> RWFile -> Imported geometry

Use: https://github.com/tge-was-taken/NvTriStrip.Net

Example: image

dreamsyntax commented 10 hours ago

Geo optimization findings:

Xbox native and PC native 'obj' -> export -> import = 1:1 tri/vert
Gamecube native 'obj' -> export -> import = increased tri/vert
Not tri-strip related.
GC specific code has an issue in RWFile or importer func

It may be worth still exploring tri-strip support, but first this GC inconsistency must be fixed.