Puxtril / Warframe-Exporter

Converts Warframe's custom file formats into standard formats
34 stars 0 forks source link

Landscape Models #19

Closed Puxtril closed 1 month ago

Puxtril commented 11 months ago

Open-world areas have (in addition to many others) their own model format for landscapes. Inside the cache, they often have the .lndscp file extension, but they always have the Enum value 42 (as of writing this). I have not taken a close look at these, but these would be very good to support full level extraction.

Examples provided by the --print-enums flag:

/Lotus/Levels/InfestedMicroplanet/InfFleshscapeA/2.lndscp
/Lotus/Levels/InfestedMicroplanet/InfFleshscapeA/12.lndscp
/Lotus/Levels/Duviri/WarframeArenas/WFArenasEchoesOfDuviri/FractalPasturesCombat/0.lndscp
/Lotus/Levels/Duviri/MainlandAEast/0.lndscp
/Lotus/Levels/TheNewWar2021/Part1/CetusFire/0.lndscp
/Lotus/Levels/TheNewWar2021/VenusLandscapePostWar/0.lndscp
/Lotus/Levels/TheNewWar2021/CetusPostWar/0.lndscp
/Lotus/Levels/TheNewWar2021/PlainsLandscapePostWar/0.lndscp
/Lotus/Levels/NightWave/TheGlassMaker/CetusCrimeScene/0.lndscp
/Lotus/Levels/CivilianHubs/CetusRemaster/0.lndscp
Puxtril commented 6 months ago

Levels are stored using Nvidia PhysX models, specifically Height Fields. I could either parse these manually or add the PhysX library. I would still need to parse that data into an exportable glTF, but reading data is the first issue.

PhysX is a PITA to build manually from source. And the cross-platform support seems more difficult to setup. So I probably wont do this.

Warframe does utilize PhysX meshes in other formats, and I've yet to see a custom deserializer for these kinds of models. I think it would be worthwhile to make a separate repository that simply deserializes all PhysX model formats.

Puxtril commented 5 months ago

Landscape header file contains a list of materials and textures. These are located inside the Lightmap package.

From building a basic Physx mesh reader, Height Fields are capable of assigning materials to individual triangles. This means a single Height Field can contain many materials. I believe the Landscape header contains the array of materials indexed by the Height Field.

Puxtril commented 2 months ago

Height Field parsing is stored in a separate repository (which lays the groundwork for all Physx types, just in case): https://github.com/Puxtril/PhysxParser

Puxtril commented 1 month ago

Added full landscape support. a766de309c5b4b05c9de6764c5707fe06a878306