|
-
Aug 24th, 2009, 01:51 PM
#1
Thread Starter
Addicted Member
[RESOLVED] XNA: Poor Texture Quality
I am having some problems with my 2d textures in XNA. For some reason the quality is coming out all blury. I am using PNG format files for this. Is there anything obvious that may be making it blury?
-
Aug 24th, 2009, 02:46 PM
#2
Re: XNA: Poor Texture Quality
Are you scaling the textures? Have you made sure that they are drawn with the scale 1.0f?
-
Aug 24th, 2009, 02:52 PM
#3
Thread Starter
Addicted Member
Re: XNA: Poor Texture Quality
Where about's would this be done?
-
Aug 24th, 2009, 03:01 PM
#4
Re: XNA: Poor Texture Quality
When you draw the texture using the SpriteBatch there's an overload that lets you set the scale as a floating point number, where 1.0f would be original scale.
-
Aug 24th, 2009, 03:16 PM
#5
Thread Starter
Addicted Member
Re: XNA: Poor Texture Quality
Ok would it go in this line?
Code:
MainSB.Draw(Textures("Frame"), FrameRect, Color.White)
-
Aug 24th, 2009, 03:31 PM
#6
Re: XNA: Poor Texture Quality
Yeah, it appears as if you are not using the overload that sets the scale..so it should default to 1.0f. But still, try explicitly setting the scale to 1.0f by using an appropriate Draw overload.
-
Aug 24th, 2009, 03:35 PM
#7
Thread Starter
Addicted Member
Re: XNA: Poor Texture Quality
To be honest I don't really know what you mean by draw overload. Could you explain an maybe give an example?
-
Aug 24th, 2009, 03:46 PM
#8
Re: XNA: Poor Texture Quality
Try something like this:
Code:
MainSB.Draw(Textures("Frame"), FramePosition, null, Color.White, 0.0f, Vector2.Zero, 1.0f, SpriteEffects.None, 1)
Where FramePosition is a Vector2 denoting the position of the texture. Try that.
-
Aug 24th, 2009, 03:54 PM
#9
Thread Starter
Addicted Member
Re: XNA: Poor Texture Quality
Ok when using that I am getting the following error:
'Null' is not declared. 'Null' Constant is no longer supported, use 'system.DBnull' instead
-
Aug 24th, 2009, 03:55 PM
#10
Re: XNA: Poor Texture Quality
Ah yes, you appear to be using VB.NET, use Nothing instead.
-
Aug 24th, 2009, 04:13 PM
#11
Thread Starter
Addicted Member
Re: XNA: Poor Texture Quality
Ok that work's without any errors but doesn't solve problem it seems a bit more clearer but it is not the original size i created it. Maybe if i post some screen shots. The left image is what it looks like rendered and the right is the original image created in photoshop.
-
Aug 25th, 2009, 07:36 AM
#12
Re: XNA: Poor Texture Quality
Try this. Double the size of your texture images in Photoshop, then in the game, apply a 0.5 scale to them. They should retain more of their crispness.
Also, let me look at how to tell XNA to turn on anisotropic filtering. This will definitely help your texturing issues.
-
Aug 25th, 2009, 02:20 PM
#13
Thread Starter
Addicted Member
Re: XNA: Poor Texture Quality
I have tried that and for some reason it wasn't drawing it to half the size it was stretching the width out. I don't really understand why it's doing this as i'm not doing anything different to the last game and that textured came out perfect on there.
By the way still haven't got the installer to work on the last game. If I open the exe from the prject file it works fine but if i create an installer using the exe file it brings up the windows error message.
Not having much luck with XNA
-
Aug 30th, 2009, 03:44 PM
#14
Thread Starter
Addicted Member
Re: XNA: Poor Texture Quality
Ok problem solved. In my first game the graphics were done in Photoshop CS2 and in this I did them in Photoshop 7. I have re-installed CS2 and redone the graphics and for some reason they now look fine.
-
Aug 31st, 2009, 07:37 AM
#15
Re: [RESOLVED] XNA: Poor Texture Quality
Weird. PS7 must have done something funky with anti aliasing.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|