Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regarding PCD2DDS #9

Open
Joonie86 opened this issue Sep 9, 2017 · 17 comments
Open

Regarding PCD2DDS #9

Joonie86 opened this issue Sep 9, 2017 · 17 comments

Comments

@Joonie86
Copy link

Joonie86 commented Sep 9, 2017

Hi there, first of all, thanks to your contribution to the scene, I really appreciate it!

however I came across to this issue that doesn't seem to find any references.

for some reason, your pcd2dds tool doesn't seem to convert ps3/pc's textures from Underworld [TR8]

Though I've seen your post about success with g_healthpack.drm, it doesn't seem to convert font textures for me.
I took some screenshots that may help you understand my issue.
http://i.imgur.com/RcAJ7fd.png
http://i.imgur.com/144zuFJ.png

I made sure to use the right executable from the release [04/05/2017] archive for each platform. Do you have any clue about this?

I also attached the files I was working on.
http://www.mediafire.com/file/yv9034urc0zykgd/font.7z

Thankd in advance!

@Gh0stBlade
Copy link
Owner

Tool should now support texture type 0x15 (32bpp) and export as targa (tga). Files have header stripped so I couldn't test reimporting but it should work fine. As for PS3, I may look at it later.

@Joonie86
Copy link
Author

Joonie86 commented Sep 9, 2017

Thanks for the quick support, however I have some compiling errors atm
http://i.imgur.com/QIFoT84.png

Could you possibly compile a new build ?

@Gh0stBlade
Copy link
Owner

Should be solved on most recent commit.

@Joonie86
Copy link
Author

I was able to compile it without any issue, however I don't think the PCD2DDS has a proper detection for PS3 textures
http://i.imgur.com/EMdNIt0.png

Was I supposed to construct the proper header (section) for PCD2DDS to recognize?

@Gh0stBlade
Copy link
Owner

Tool must be built with #PS3 defined.

@Joonie86
Copy link
Author

Joonie86 commented Sep 11, 2017

I tried removing 0 on PCD.H, adding 1 and also removing !if PS3 block and endif just to build PS3 tool, both result in the same compiling error

http://i.imgur.com/WP9975M.png

Could you give me some insight ?

@Gh0stBlade
Copy link
Owner

I didn't test PS3 building, looks like I made two small typos, should work now.

@Joonie86
Copy link
Author

I was able to compile your new build after typo fix, however the detection for PS3's section magic
doesn't seem working. Because it keeps saying "Failed to detect file type" for ps3's ps3t texture data.

Here's what my friend says.
"PCD.cpp's ConvertPCDToDDS is not made for anythin but SECT magic
if SECT magic is not detected it returns immediately
There's a check for PS3T magic further down, but it will never be reached, its a paradox
It checks for SECT, if not SECT returns"

What do you think?

@Gh0stBlade
Copy link
Owner

DRM files and their sections must be extracted with DRM.EXE. SECT header is a customised header added by the DRM tool only when REPACK_MODE is defined. I can make a small change to the tool to allow both variants (with/without section header) to work with PCD2DDS/WAVE2WAV. I didn't see any need to do this to minimise complexity. The WAVE2WAV/PCD2DDS tools were written purely to allow users to import new textures/sound files into DRM files. SECT header is actually the DRM section header, it's required to allow propper repacking since the DRM section header contains unique reference ids which cannot be reconstructed without updating every other section (and most of the other section formats are unknown)

@Joonie86
Copy link
Author

I have no idea why extracted files are missing SECT header that your DRM tool was supposed to generate

http://i.imgur.com/2OwPsOA.png

I ensured REPACK_MODE was defined (1) on DRM.h

@Gh0stBlade
Copy link
Owner

Can you upload a DRM file sample?

Cheers.

@Joonie86
Copy link
Author

@Gh0stBlade
Copy link
Owner

Bug is caused by refactoring, should work now (tested)

@Joonie86
Copy link
Author

Joonie86 commented Sep 12, 2017

Good job, now all my extracted files do have SECT header written in BE, however there are some texture format that doesn't seem supported, I was able to extract most of them except for a few,

http://www.mediafire.com/file/rhhp4lwh68lujid/tex.rar

I included both working and non-working ones, those dds files sized 0 byte are the ones that don't work.

EDIT

Looks like the tool is not supporting BPP_32 for PS3, so it fails to detect 0x85 from the header

@Gh0stBlade
Copy link
Owner

The files do indeed like 32bpp however the image data does not make sense. There's a chance these images are swizzled, only way to tell is finding the PC matching textures.

@Joonie86
Copy link
Author

Yeah it's morton + argb32, somebody wrote a py script for noesis that works with it

@Bxaa
Copy link

Bxaa commented Sep 5, 2021

PCD.h only for TR7?

#define SECTION_MAGIC (0x54434553)
#define PCD_MAGIC (0x39444350)
#define TEXTURE_SECTION_TYPE (5)

Need support for pcd9 (TRU)
Example pcd9:
https://drive.google.com/file/d/1pgYoAUVb0FN3wHJ27iDiMDRr72BHhRoT/view?usp=sharing
https://drive.google.com/file/d/1L1Ly96mwYChrIsM94iupl_2tS17XKAQq/view?usp=sharing
(Failed to detect file type)

EDIT:
All PCD2DDS not working (tr7 for .pcd, tr8 tr8pcd9)
Tested with latest release pcd2dds
(Failed to detect file type)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants
@Gh0stBlade @Joonie86 @Bxaa and others