Jump to content


RobertZenz

Member Since 25 Jan 2024
Offline Last Active Yesterday, 03:12 PM

Posts I've Made

In Topic: Pool of Radiance maps

19 December 2024 - 08:43 AM

I've finally managed to finish the write-up on how to read the models. I hope it's as interesting to you all as it was to me to dig through the files.


In Topic: Pool of Radiance maps

26 October 2024 - 08:43 AM

The 1.2 version of the tool is now available. Please read the release notes rather carefully, it is rough around the edges and it will misbehave if not treated in certain ways, I'm afraid. Java 8 or higher is required to be installed.

 

For you specifically, you want the file "Pool of Radiance/data/Anims/Objects/spnspire.nat", which is the Spinning Spire/Stone. You can open that file in the GUI and export it as Wavefront obj file, which should be importable and usable by every 3D software that is around (I've only tested Blender, though).

 

The model support is limited to "static" models, like the Spinning Spire, I haven't figured out how the "animated" (character) models work so far. I'm working a write-up again which I will publish in some time.


In Topic: Pool of Radiance maps

07 October 2024 - 01:56 PM

Just so you know that I'm still working on this, I've updated the repository with the latest knowledge about the models. The README contains everything I've learned about the PoR:RoMD files so far.

 

I'm able to read the textures (INK), texture archives (CNK) and model files (NAT) itself. However, the later only has limited support. Mostly I'm able to restore "static" models, for example the standing stone. I've put together a GUI program which allows to view the files before exporting them.

 

ar7qxds.png

 

There is currently no ready-to-use build, though, sorry.

 

The next steps are to write an obj-exporter for the models (for the textures and maps everything is already in place and working), updating the build so that a release version can be build and the help-text in the application itself must be updated (as must the CLI logic), and then I feel comfortable preparing and releasing a version with preliminary NAT/model support. That is my plan for the next weeks.

 

Afterwards I guess I need to figure out how the "animated" models work, because so far I have failed to reconstruct their surface/faces from the NAT files.


In Topic: Pool of Radiance maps

29 August 2024 - 11:33 AM

I'm very pleased to tell you that the textures are stored in the INK files. I've said before that they are dBASE files, but that was a false positive (and looking at the file header I can see why the file util got confused), they are actually images with a prepended header.

 

AoczkEn.pngdrJBCuM.pngSFetTuf.pngaxXfb0Y.pngqPskoLl.pngkVxeqZM.png

 

As you can see from the last image, for some the color channels are still distorted. I'm assuming there is a field in the header which tells me about how treat the image and its channels.

 

The INK files themselves are images with a prepended 68-byte header. The width and height are in the bytes at 0x34 and 0x38 and the length of the image that follows is in byte 0x40. The image itself is padded with zeros at the end to fill a 512 byte block (so an image with the length if 900 is padded to 1024). It's 2-byte-per-pixel, which was a pain to brute force, to be honest, with 5/6/5 bits per red/green/blue channel respectively. The last part most likely changes depending on some flag in the header.

 

I've updated the README of the por-romd-map-extractor with the file description and also added the first version of the reader to the source tree. Currently there is no functionality to convert images, that comes later on, this is just to let you know that the textures are there and available.

 

There's still a lot to do, fixing the color channels, improving the NAT reader for the models, combining them with textures and at the end writing an exporter for them. The viewer I've written (screenshot from before) also needs to become a lot better as it is currently broken. Animations are out of scope for the time being, while I can already read CNB files, they contain NAB files which seem to the animation data, I cannot parse those. As I've never worked before with skeletal animations, that might get difficult. I'll try to push new state to the repository and README to make sure that knowledge is there as soon as I gain it. Eventually I'll write another article, but only after I'm done with this.


In Topic: Pool of Radiance maps

26 August 2024 - 11:52 AM

I can confirm now that the *.nat files are the objects themselves. To be exact, they contain vertices (points), faces (polygons) and texture (UV) coordinates split into segments. I'm already able to reconstruct objects which consist of a single segment.

 

qUqZdif.png

 

Completely and correctly parsing the file will take more effort and some time to come.

 

Another problem are the textures. I'm very convinced that the *.wsm files are related to them, or even are them, but currently they still elude me. WSM files start with the value "5" in four bytes, followed by 48 bytes as name, and towards the end they contain some form of index with filenames, like "========spnspire.tga", the end looks fishy, too. But I can't tell how to process these files yet. They might contain RLE compressed TGA files, but so far I could not identify the length of each part, nor file header, nor footer of the TGAs.