READ THE RULES: Click here

Follow us on Facebook: https://www.facebook.com/xentax/ :)

tony hawks project 8 a8r8g8b8 not opening correctly with NOESIS.

Get your graphics formats figures out here! Got details for others? Post here!
Post Reply
GHFear
advanced
Posts: 44
Joined: Tue Dec 04, 2018 9:29 am
Has thanked: 3 times
Been thanked: 7 times

tony hawks project 8 a8r8g8b8 not opening correctly with NOESIS.

Post by GHFear » Thu Mar 14, 2019 11:57 pm

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
You do not have the required permissions to view the files attached to this post.

User avatar
Acewell
VIP member
VIP member
Posts: 1263
Joined: Wed Nov 05, 2008 12:16 pm
Has thanked: 2392 times
Been thanked: 730 times

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

Post by Acewell » 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

GHFear
advanced
Posts: 44
Joined: Tue Dec 04, 2018 9:29 am
Has thanked: 3 times
Been thanked: 7 times

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

Post by GHFear » Fri Mar 15, 2019 2:08 am

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?

User avatar
Acewell
VIP member
VIP member
Posts: 1263
Joined: Wed Nov 05, 2008 12:16 pm
Has thanked: 2392 times
Been thanked: 730 times

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

Post by Acewell » 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. (:

GHFear
advanced
Posts: 44
Joined: Tue Dec 04, 2018 9:29 am
Has thanked: 3 times
Been thanked: 7 times

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

Post by GHFear » Fri Mar 15, 2019 12:57 pm

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.

User avatar
Acewell
VIP member
VIP member
Posts: 1263
Joined: Wed Nov 05, 2008 12:16 pm
Has thanked: 2392 times
Been thanked: 730 times

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

Post by Acewell » 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.

GHFear
advanced
Posts: 44
Joined: Tue Dec 04, 2018 9:29 am
Has thanked: 3 times
Been thanked: 7 times

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

Post by GHFear » Sat Mar 16, 2019 3:19 pm

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.
You do not have the required permissions to view the files attached to this post.

User avatar
Acewell
VIP member
VIP member
Posts: 1263
Joined: Wed Nov 05, 2008 12:16 pm
Has thanked: 2392 times
Been thanked: 730 times

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

Post by Acewell » Sun Mar 17, 2019 12:10 am

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.

Post Reply