|
Post by joeschmoe on Apr 25, 2011 13:36:11 GMT -5
Hi guys,
I've been creating graphics with MS Paint and Paint.net and saving them as .png. They're pretty clean and sharp but when I use them in my programs they become blurry and lose definition. This is especially bad with buttons that have printing on them...poor definition and hard to read. I've tried resizing the sprite area. They get bigger and smaller but still have almost the same loss of definition. What am I missing on this?
Thanks.
|
|
|
Post by matthew on Apr 25, 2011 13:43:33 GMT -5
What sizes are your sprites?
|
|
|
Post by joeschmoe on Apr 25, 2011 14:59:55 GMT -5
They vary, but all are even numbered dimensions like 32x32 or 64x24. Is that what you mean or actual sizes?
|
|
|
Post by shadow008 on Apr 25, 2011 16:01:59 GMT -5
How are you loading them?
Best to use LoadTex() But to remove the mipmaping from a texture you can try LoadTexture(), not recommended, but it keeps the textures the way they are.
Better yet, just post the code.
|
|
|
Post by matthew on Apr 25, 2011 16:13:25 GMT -5
The sizes of your sprites & textures should be a power of two, 64 is 24 isn't.
Sizes such as 8, 16, 32, 64, 128 & so on are acceptable. Also your sprite doesn't have to be square, sizes such as 32x64 or 128x32 are okay too because both dimensions are a power of two.
|
|
|
Post by joeschmoe on Apr 25, 2011 18:30:16 GMT -5
Shadow: I didn't know that made a difference! I've been using the loadtexture(), but just changed the small part of my latest project to loadtex() and don't see any difference. Here's an example of the section I'm using:
LineBt(1) = NewSprite(LoadTex("Data/Football/PBTop_Splits.PNG")) SprSetXCentre(0) SprSetYCentre(0) SprSetSize(80,24) SprSetPos(10,14) Sprsetzorder(10)
Matthew: I guess I've been out in left field! I thought it meant any even number, like 12x10 or 26x44 but not something like 15x25. Won't be hard to change the images and just make the extra part transparent.
Thanks.
|
|
|
Post by joeschmoe on Apr 25, 2011 18:41:50 GMT -5
Matthew,
That definitely improved the appearance. Thank you!
|
|
|
Post by DJLinux on Apr 25, 2011 20:21:33 GMT -5
In some cases power of 2 textures can be blured rendered too in this case mipmapping must be disabled to keep it sharp
Joshy
|
|
|
Post by joeschmoe on Apr 26, 2011 9:45:02 GMT -5
Thanks, everyone, for all the help. I've been coming in here for almost three years, asking dumb questions, and somebody always takes the time to help me out. I really appreciate it.
|
|