Importing textures...

Tutorials and discussions about Mapping - Introduce your own ones!
Isotoxin
Adept
Posts: 285
Joined: Tue Mar 15, 2011 5:01 pm
Personal rank: Mapper
Location: Belgium

Importing textures...

Post by Isotoxin »

So...I've made a rly fast texture thinggy, which I wanna import into my map, the problem is, I'm getting a weird crash the whole time.

What I did is :
-I opened photoshop. (little bit logic, lol.)
-I made a new file/canvas. (256 by 256 pixels.)
-I wrote my text one it, with a blood font.
-I saved it as a ''PCX'' file.

If someone could help me...Thanks!

Here is the thing which I made...


Image


I want to use it as a masked texture.
Bloeb
Experienced
Posts: 95
Joined: Tue Apr 06, 2010 11:07 am

Re: Importing textures...

Post by Bloeb »

Did you try to decrease the color-depth to 256 colors (use dithering if you need to do this) ? Also, in order to make a masked texture the first color in your colorpalette should be the same as your background.
JackGriffin
Godlike
Posts: 3774
Joined: Fri Jan 14, 2011 1:53 pm
Personal rank: -Retired-

Re: Importing textures...

Post by JackGriffin »

Image mode should be "indexed color" too. I miss that sometimes.
So long, and thanks for all the fish
Isotoxin
Adept
Posts: 285
Joined: Tue Mar 15, 2011 5:01 pm
Personal rank: Mapper
Location: Belgium

Re: Importing textures...

Post by Isotoxin »

And how to change the colordepth? 8-)
User avatar
Creavion
Godlike
Posts: 4497
Joined: Sun Feb 17, 2008 7:23 pm
Personal rank: About to be non-act.
Location: Germany, Lower Saxony

Re: Importing textures...

Post by Creavion »

First of all, PCX is can act strange (although I doubt that in the case of photoshop), I only know it does not work (correctly) with programms like Xnview (although they support it).
Many programms seem to mess up the PCX files. So you better trust BMP.

Look at the upper menu
File________Edit________Picture (I think), click on Picture -> first entry .. something with "Mode" I think (I have a german PS version, so I dont know for sure), there you will find Indexed Colours.
About to be non-active
My very last UT map project: CTF-FacePalm (tropical CTF-Face remake)
Why do I leave? click here
What I want to do next: Joining an UDK team (uncertain however) and improve 3D modelling and texture editing skills
Thanks to those who visibly supported me until/at the end!
My reactivated account on indiedb.com.
Myth
Inhuman
Posts: 988
Joined: Tue Feb 12, 2008 5:57 pm
Personal rank: Low Poly Freak

Re: Importing textures...

Post by Myth »

To clear up confusion:

• Unreal engine stores textures in uncompressed 8-bit BMP files inside UTX files. (your files get converted to this anyway...)
• Unreal editor can import uncompressed 8-bit BMP files and even truecolor 24-bit BMP files.
• Unreal editor can also import rle compressed 8-bit PCX files, and only this kind of PCX files.
• The width and height of a texture must be power of 2. All of these combinations should work: (2,4,8,16,32,64,256,512,1024,2048,4096)x(2,4,8,16,32,64,256,512,1024,2048,4096)
• Masked textures have the first color in the palette set as transparent.
• Always set to generate mip-maps. You always want your textures get mip-mapped. Some renderers have settings to not to use textures beyond a specific size. The standard direct3d has it's limit at 256x256 If mip maps are not available the game will crash.

What you're doing wrong is not having RLE compression enabled when you save as PCX.
Also make sure it's in 8-bit and has a palette with a maximum of 256 color entries.

However I agree with Creavion, you should only use 8-bit BMP files because:
• Unreal engine stores them in this form anyway
• You can view them in windows when you set the folder view to thumbnails
• You can upload them on the internet and browsers can display it

There is more to it, but this 100% correct and works.
Last edited by Myth on Thu Mar 31, 2011 6:25 pm, edited 1 time in total.
User avatar
Hook
Inhuman
Posts: 754
Joined: Tue Apr 22, 2008 11:21 pm
Personal rank: UT99 Promoter/Admin
Location: Minnesota USA
Contact:

Re: Importing textures...

Post by Hook »

Myth, can you clear something up about your post?

In this part: " and ever truecolor 24-bit BMP files."
What does "ever" mean? - Is it a typo? (should it be: never? or even? or?)
=Hook=(Member# 626)
HUTP Active Forums: https://hooksutplace.freeforums.net/forum
HUTP UT99 Community Portal: https://hooksutplace.freeforums.net/
OR: https://hermskii.com/hook/ut99_hutp/
UT99 Server -> CROSSBONES Missile Madness {CMM}

* Newest Versions of: PRO-Redeemers | PRO-SNIPER-Redeemers | PRO-SEEKER-Redeemers <-(the Original)
and Now with FOOD FIGHT and Frying Pan arena !!!
IP: 68.232.181.236:7777 <-(NEW IP to come)
UT99 MH Server -> {CMH} CROSSBONES Monster Hunt (MH) by Mars007 (The Original) - IP: 108.61.238.93:7777
Myth
Inhuman
Posts: 988
Joined: Tue Feb 12, 2008 5:57 pm
Personal rank: Low Poly Freak

Re: Importing textures...

Post by Myth »

Yes, that's a typo.

ever>even
JackGriffin
Godlike
Posts: 3774
Joined: Fri Jan 14, 2011 1:53 pm
Personal rank: -Retired-

Re: Importing textures...

Post by JackGriffin »

Ferali did a long and detailed explanation to me about the positives of BMP versus PCX. If he gets time and posts it here it is worth the reading. I strictly use BMP now.
So long, and thanks for all the fish
Bloeb
Experienced
Posts: 95
Joined: Tue Apr 06, 2010 11:07 am

Re: Importing textures...

Post by Bloeb »

I'm pretty interested to hear about those advantages, because I can only think of a disadvantage. I could be wrong but when you import a 24bits bitmap it still has to be converted to a 256 indexed color bitmap. Unfortunately you can't choose the conversion-methods (e.g. dithering) yourself.
User avatar
Creavion
Godlike
Posts: 4497
Joined: Sun Feb 17, 2008 7:23 pm
Personal rank: About to be non-act.
Location: Germany, Lower Saxony

Re: Importing textures...

Post by Creavion »

Bloeb wrote: you can't choose the conversion-methods (e.g. dithering) yourself.
Thats why you have do to something like that in photoshop (or gimp). In most cases even problematical textures can be somehow converted (sky textures excluded). I would not make use of 24 bit textures there in any way.
truecolours.jpg
That happens if you import an 24 Bit texture into UEd 2.0 (UT). Since the user did not limit the texture to 256 colours the ued forces a limitation which lets the texture somehow look darker and/or lower in contrast. (at least for Software Rendering)
truecolours2.jpg
In UEd 2.1 (Unreal 1 227g) I have both the Window Render and the viewport render set to D3D9. The texture will be shown correctly. BTW: I only opened the map I created in UT UEd 2.0. So as you might see, the Editor converted this to DXT1. (the 256 colour limited textures are P8)
truecolours3.jpg
I changed the 3D viewport window to software and it looks again like in the UT UEd 2.0.
About to be non-active
My very last UT map project: CTF-FacePalm (tropical CTF-Face remake)
Why do I leave? click here
What I want to do next: Joining an UDK team (uncertain however) and improve 3D modelling and texture editing skills
Thanks to those who visibly supported me until/at the end!
My reactivated account on indiedb.com.
Isotoxin
Adept
Posts: 285
Joined: Tue Mar 15, 2011 5:01 pm
Personal rank: Mapper
Location: Belgium

Re: Importing textures...

Post by Isotoxin »

K, that worked. thanks alot.
SzGergo
Skilled
Posts: 213
Joined: Fri Aug 27, 2010 2:48 pm

Re: Importing textures...

Post by SzGergo »

Ok, i tell you something funny, how i usualy import textures.
No, this is not the proiper way, i am just sharing this
- I draw something in PS.
- save it in .bmp. (usualy in 24bit) since I could not import the .pcx created with ps into the ued
- i manualy change the extension .bmp to .pcx in total commander or whatever, since i could not import such .bmp files into UEd properly either (maybe i never set to indexed colors, hm, who nows)...
- UEd now imports that bmp-pcx thingy...

however sometimes i get small "holes" in the texture, more likely in the mipmaps: some pixels become transparent.
I think somehow when the picture get compressed some pixels get the first value of the palette... however it is still stange, since i never set the texture to be masked, so it should not be a hole there.

Well, i think when i go home i will read the wiki about how palettes work and what does "indexed color" and "dithering" mean exactly and such. :)
User avatar
Creavion
Godlike
Posts: 4497
Joined: Sun Feb 17, 2008 7:23 pm
Personal rank: About to be non-act.
Location: Germany, Lower Saxony

Re: Importing textures...

Post by Creavion »

Jesus. PS is not the only way to save as 256 colours. Xnview can do this as well, although the results are not that great IMO. Thats really not difficult^^.

Those holes: Actually it can/should only happen if you import them as mask or try to set them to Mask?
About to be non-active
My very last UT map project: CTF-FacePalm (tropical CTF-Face remake)
Why do I leave? click here
What I want to do next: Joining an UDK team (uncertain however) and improve 3D modelling and texture editing skills
Thanks to those who visibly supported me until/at the end!
My reactivated account on indiedb.com.
SzGergo
Skilled
Posts: 213
Joined: Fri Aug 27, 2010 2:48 pm

Re: Importing textures...

Post by SzGergo »

But i did not imported it as masked. (and neither set it to masked in its properties window)
As far as i remember in some cases the mipmaps got punctured.
Apart from never been set to masked it is still strange, since how can a value of any pixel become 0 by the compression process generating those mipmaps, when not a single transparent pixel were ever drawn in the base texture.
Also as far as i remember the phenomenon is not completely reproducable, the location of the transparent pixels varies.
I assume the error is caused by my stupid process of changing the extendsion of an anyway improper bitmap.
Actualy exporting it and importing back sometimes eradicates those holes, but not always.
Well i will try some importing scenarios later today to find out what happens when :)
Post Reply