UT99 - BMP / PCX import in class error

Discussions about Coding and Scripting
1337GameDev
Experienced
Posts: 85
Joined: Thu Apr 16, 2020 3:23 pm
Personal rank: GameDev

UT99 - BMP / PCX import in class error

Post by 1337GameDev » Sun Oct 04, 2020 4:42 pm

I am making a basic mesh as a placeholder for an inventory item in making.

For some reason, when I build (using ucc make) it throws errors about being unable to find out, or am improper format.

I understand that you can import pcx or bmp, and it's advised to use bmp as pcx is very finicky.

For ut99, you need your texture size a power of 2 (mine is 128x128), and be color indexed (256 color indices).

I use gimp for this, and export as bmp.

I have a package folder structure like this:
<Root of ut99 install>/<mod name>

And then have a Textures, Models, and Classes folders. I also added my mod name to the correct ini and it is picked up by ucc to build.

I made a basic brown 128x128 texture (and have it in the Textures folder) and exported it's bmp and imported it into my uc class like this:

Code: Select all

#exec TEXTURE IMPORT NAME=SKIN_Brown FILE=Textures\brown.bmp GROUP="Skins" 
The exact error messages are:

Code: Select all

BMP uses an unsupported format (0/0)

Can't find file 'Textures\brown.bmp' for import

CustomItem.uc(8) : ExecWarning, Import texture SKIN_Brown from Textures\brown.bmp failed

BMP uses an unsupported format (0/0)
What could be the issue? I tried with pcx format, and it gave the same error.

I ensued the image is the right dimensions and 256 color indexed and located in the package folder structure.

Any ideas?

User avatar
UnrealGGecko
Godlike
Posts: 2433
Joined: Wed Feb 01, 2012 11:26 am
Personal rank: GEx the Gecko
Location: Kaunas, Lithuania

Re: UT99 - BMP / PCX import in class error

Post by UnrealGGecko » Sun Oct 04, 2020 5:16 pm

Try putting the texture you wanna import into C:/. My guess would be the directory has a space in there, and UEd hates spaces for some reason.

Then again, not a coder, but usually similar thing happens to me when I try importing a texture when I'm mapping.

User avatar
OjitroC
Godlike
Posts: 2334
Joined: Sat Sep 12, 2015 8:46 pm

Re: UT99 - BMP / PCX import in class error

Post by OjitroC » Sun Oct 04, 2020 5:48 pm

If what UnrealGGecko suggests doesn't work, then possibly the BMP or PCX are corrupt or, more likely, there is something about their format that is not recognised. Have you set any flags? A quick check of the .u file for two player/bot models and for one weapon model indicates that, in each case, 'Flags=2' has been included after 'Skins' in the Texture import line.

You could also test the PCX by trying to import it in UEd and see if that works OK - if not, then that would confirm that there is a problem with the file.

1337GameDev
Experienced
Posts: 85
Joined: Thu Apr 16, 2020 3:23 pm
Personal rank: GameDev

Re: UT99 - BMP / PCX import in class error

Post by 1337GameDev » Sun Oct 04, 2020 5:55 pm

UnrealGGecko wrote:
Sun Oct 04, 2020 5:16 pm
Try putting the texture you wanna import into C:/. My guess would be the directory has a space in there, and UEd hates spaces for some reason.

Then again, not a coder, but usually similar thing happens to me when I try importing a texture when I'm mapping.
Hmm, I'll try and see if that works, but I'm unsure if that's an issue.

Also, this is built using ucc and not unreal Ed.

=MERGED=
OjitroC wrote:
Sun Oct 04, 2020 5:48 pm
If what UnrealGGecko suggests doesn't work, then possibly the BMP or PCX are corrupt or, more likely, there is something about their format that is not recognised. Have you set any flags? A quick check of the .u file for two player/bot models and for one weapon model indicates that, in each case, 'Flags=2' has been included after 'Skins' in the Texture import line.

You could also test the PCX by trying to import it in UEd and see if that works OK - if not, then that would confirm that there is a problem with the file.
I have not set any flags, but I'll look at that and try it.
The bmp / pcx is freshly exported from gimp so I don't think it's corrupted, but it's possible I missed something else that ut requires for textures, but I have no idea :/

-------------------

I tested the textures at the c drive:
C:\UT99\HH\Textures

Didn't work and complained it couldn't find it still.

I tried setting
FLAGS=2
and that didn't work either.

I don't know what's going on....
Last edited by 1337GameDev on Sun Oct 04, 2020 7:25 pm, edited 1 time in total.

User avatar
papercoffee
Godlike
Posts: 9830
Joined: Wed Jul 15, 2009 11:36 am
Personal rank: coffee addicted !!!
Location: Cologne, the city with the big cathedral.

Re: UT99 - BMP / PCX import in class error

Post by papercoffee » Sun Oct 04, 2020 6:07 pm

@1337GameDev
Please avoid double posts within a 24 hours limit when no other member has posted after you.
We allow our members to edit their posts to add new content.

User avatar
sektor2111
Godlike
Posts: 5209
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: UT99 - BMP / PCX import in class error

Post by sektor2111 » Sun Oct 04, 2020 7:17 pm

Texture folder is not default UT "Texture" folder in this case, BMP/PCX file must be placed in a folder called Textures (a different one) from the same source-code location not outside of compiling project - at least I'm not using that way...
I have these in my assets:

Code: Select all

#exec texture import name=Skaarjw5_1 file=Textures\Skaarjw5_1.pcx group=Mskins
#exec texture import name=Skaarjw5_2 file=Textures\Skaarjw5_2.pcx group=Mskins
#exec texture import name=JPupae1_1 file=Textures\JPupae1_1.pcx group=Mskins
#exec texture import name=JPupae1_2 file=Textures\JPupae1_2.pcx group=Mskins
And the compiling place is something like here:
Compiling_Tree.PNG
You do not have the required permissions to view the files attached to this post.

User avatar
OjitroC
Godlike
Posts: 2334
Joined: Sat Sep 12, 2015 8:46 pm

Re: UT99 - BMP / PCX import in class error

Post by OjitroC » Sun Oct 04, 2020 7:46 pm

1337GameDev wrote:
Sun Oct 04, 2020 5:55 pm
I don't know what's going on....
The location, path etc are OK (confirmed by sektor as your 'set up' is the same as his). A further test you could do would be to export a 128 x 128 texture as a pcx using UEd (try exporting something from UnrealShare.u) and then use that as the texture to import along with your mesh using ucc make. If that texture imports OK then the problem is with your brown texture; if not, then the problem lies elsewhere.

1337GameDev
Experienced
Posts: 85
Joined: Thu Apr 16, 2020 3:23 pm
Personal rank: GameDev

Re: UT99 - BMP / PCX import in class error

Post by 1337GameDev » Sun Oct 04, 2020 9:22 pm

sektor2111 wrote:
Sun Oct 04, 2020 7:17 pm
Texture folder is not default UT "Texture" folder in this case, BMP/PCX file must be placed in a folder called Textures (a different one) from the same source-code location not outside of compiling project - at least I'm not using that way...
I have these in my assets:

Code: Select all

#exec texture import name=Skaarjw5_1 file=Textures\Skaarjw5_1.pcx group=Mskins
#exec texture import name=Skaarjw5_2 file=Textures\Skaarjw5_2.pcx group=Mskins
#exec texture import name=JPupae1_1 file=Textures\JPupae1_1.pcx group=Mskins
#exec texture import name=JPupae1_2 file=Textures\JPupae1_2.pcx group=Mskins
And the compiling place is something like here:
Compiling_Tree.PNG
Yup, exactly how I setup the project.
The textures folder I mentioned is NOT the folder for UT that has the utx files.

Hmmm, what do you think is going on?

User avatar
OjitroC
Godlike
Posts: 2334
Joined: Sat Sep 12, 2015 8:46 pm

Re: UT99 - BMP / PCX import in class error

Post by OjitroC » Sun Oct 04, 2020 10:17 pm

1337GameDev wrote:
Sun Oct 04, 2020 4:42 pm

Code: Select all

#exec TEXTURE IMPORT NAME=SKIN_Brown FILE=Textures\brown.bmp GROUP="Skins" 
I've looked and looked at this for syntax errors and now just noticed something - do you have Skins as written there in inverted commas? Try it just as Group=Skins (none of the examples I've seen, including sektor's, have the inverted commas).

User avatar
sektor2111
Godlike
Posts: 5209
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: UT99 - BMP / PCX import in class error

Post by sektor2111 » Sun Oct 04, 2020 10:42 pm

Damn, I'm stupid, right now I checked again first post, it says: "BMP uses an unsupported format (0/0)" I believe it's about a wrong BMP type.
When I'm importing BMP files they are simple, no headers, no compression, nothing - and even at 24bit colors but nothing else as extra specifications.

User avatar
OjitroC
Godlike
Posts: 2334
Joined: Sat Sep 12, 2015 8:46 pm

Re: UT99 - BMP / PCX import in class error

Post by OjitroC » Sun Oct 04, 2020 10:57 pm

sektor2111 wrote:
Sun Oct 04, 2020 10:42 pm
Damn, I'm stupid, right now I checked again first post, it says: "BMP uses an unsupported format (0/0)" I believe it's about a wrong BMP type.
Yes, that's what I thought - there's something in the format of the BMP/PCX that wasn't recognised.

The way to test that is to try to import the PCX in the Editor - if it works, then the format is OK; if it doesn't, then the problem lies with the format.

User avatar
SteadZ
Average
Posts: 44
Joined: Mon Mar 10, 2014 11:19 pm
Personal rank: A Person
Location: Scotland

Re: UT99 - BMP / PCX import in class error

Post by SteadZ » Mon Oct 05, 2020 9:42 am

When using bmp images, they (unlike pcx) do NOT need to be indexed - that's most likely what the error is referring to.
"The problem with dreams is... you never know when you're gonna wake up"

Image

User avatar
OjitroC
Godlike
Posts: 2334
Joined: Sat Sep 12, 2015 8:46 pm

Re: UT99 - BMP / PCX import in class error

Post by OjitroC » Mon Oct 05, 2020 10:23 am

SteadZ wrote:
Mon Oct 05, 2020 9:42 am
When using bmp images, they (unlike pcx) do NOT need to be indexed - that's most likely what the error is referring to.
But if trying to import the PCX gives the same error, then presumably the error lies either in the process or, more likely, in the format of the BMP and PCX?

1337GameDev
Experienced
Posts: 85
Joined: Thu Apr 16, 2020 3:23 pm
Personal rank: GameDev

Re: UT99 - BMP / PCX import in class error

Post by 1337GameDev » Tue Oct 06, 2020 12:36 am

OjitroC wrote:
Mon Oct 05, 2020 10:23 am
SteadZ wrote:
Mon Oct 05, 2020 9:42 am
When using bmp images, they (unlike pcx) do NOT need to be indexed - that's most likely what the error is referring to.
But if trying to import the PCX gives the same error, then presumably the error lies either in the process or, more likely, in the format of the BMP and PCX?
What format should the PCX be in? Indexed color and power of 2 dimensions seem to be the only requirements....

Higor
Godlike
Posts: 1832
Joined: Sun Mar 04, 2012 6:47 pm

Re: UT99 - BMP / PCX import in class error

Post by Higor » Tue Oct 06, 2020 1:17 am

Game version?, I rewrote the BMP importer to support EVERY legacy format on v469.
ImageImage
Image unreal://23.111.157.138:7777
Image unreal://46.228.199.205:7788