Page 1 of 1

tony hawks project 8 a8r8g8b8 not opening correctly with NOESIS.

Posted: Thu Mar 14, 2019 11:57 pm
by GHFear
Hello.
So I have this texture here with the format a8r8g8b8 and it is the same format as some other textures I CAN open on Skate 3 and NHL, but it will not open for some reason. I am reading the correct format, width and height and everything seems to be fine, but it still won't open. Would really appreciate some help on this.
File is attached.
Script is attached.

Thanks!
/GHFear

Re: tony hawks project 8 a8r8g8b8 not opening correctly with NOESIS.

Posted: Fri Mar 15, 2019 1:52 am
by Acewell
make sure you read integers etc as unsigned if you sure they are meant to be positive.

Code: Select all

    imgFmt = bs.readByte()
should be

Code: Select all

    imgFmt = bs.readUByte()
the image is too small with no proper name to know if the result is correct though. :]

there is also a typo on line 45

Code: Select all

        data = rapi.imageUntile360DXT(rapi.swapEndianArray(data, 2), imgWidth, imgHeight, 83)
should be

Code: Select all

        data = rapi.imageUntile360DXT(rapi.swapEndianArray(data, 2), imgWidth, imgHeight, 8)
:D

Re: tony hawks project 8 a8r8g8b8 not opening correctly with NOESIS.

Posted: Fri Mar 15, 2019 2:08 am
by GHFear
Acewell wrote:
Fri Mar 15, 2019 1:52 am
make sure you read integers etc as unsigned if you sure they are meant to be positive.

Code: Select all

    imgFmt = bs.readByte()
should be

Code: Select all

    imgFmt = bs.readUByte()
the image is too small with no proper name to know if the result is correct though. :]

there is also a typo on line 45

Code: Select all

        data = rapi.imageUntile360DXT(rapi.swapEndianArray(data, 2), imgWidth, imgHeight, 83)
should be

Code: Select all

        data = rapi.imageUntile360DXT(rapi.swapEndianArray(data, 2), imgWidth, imgHeight, 8)
:D
I changed it, but I still get the error "TypeError: an integer is required". :/ Did it work for you?

Re: tony hawks project 8 a8r8g8b8 not opening correctly with NOESIS.

Posted: Fri Mar 15, 2019 7:33 am
by Acewell
GHFear wrote:
Fri Mar 15, 2019 2:08 am
Did it work for you?
yes or i wouldn't have posted. (:

Re: tony hawks project 8 a8r8g8b8 not opening correctly with NOESIS.

Posted: Fri Mar 15, 2019 12:57 pm
by GHFear
Acewell wrote:
Fri Mar 15, 2019 7:33 am
GHFear wrote:
Fri Mar 15, 2019 2:08 am
Did it work for you?
yes or i wouldn't have posted. (:
yeah I changed it all to read UInt and UByte and even changed the imgFMT to read as a UInt, but it just gives me the same error. Send me the script you have working and Ill see if it works on my end. If it doesn't, somethings up with my noesis.

[X360] Tony Hawks project 8 (*.thp8)

Posted: Sat Mar 16, 2019 3:46 am
by Acewell
GHFear wrote:
Fri Mar 15, 2019 12:57 pm
Send me the script you have working and Ill see if it works on my end. If it doesn't, somethings up with my noesis.
i already told you what i changed in your script to make it work, readByte() to readUByte(),
otherwise a negative number would be returned and wouldn't satisfy any imgFmt conditions.

Re: [X360] Tony Hawks project 8 (*.thp8)

Posted: Sat Mar 16, 2019 3:19 pm
by GHFear
Acewell wrote:
Sat Mar 16, 2019 3:46 am
GHFear wrote:
Fri Mar 15, 2019 12:57 pm
Send me the script you have working and Ill see if it works on my end. If it doesn't, somethings up with my noesis.
i already told you what i changed in your script to make it work, readByte() to readUByte(),
otherwise a negative number would be returned and wouldn't satisfy any imgFmt conditions.
It was the Noesis version I had. I updated to the latest version and now it loads correctly. Thank you for the information man.
I didn't know that about signed and unsigned's. So that's really useful.

Edit: Another problem I am facing now is that any textures larger than 16x16 will give me the error "bad array size". here is a sample on a larger texture with the same format.

Re: tony hawks project 8 a8r8g8b8 not opening correctly with NOESIS.

Posted: Sun Mar 17, 2019 12:10 am
by Acewell
after closer examination your 2 samples look like fx textures, the first one is a cubemap with a
canvas size of 32x128, the other looks like some color gradient with a canvas size of 64x512.
i only have the 2 samples, you may need to do more investigating into the header flags etc.