Hi All,
I just stumbled across this little engine the other day and I have started playing around with it. I apologize in advance if this has been asked, I did search the topics and couldn't find anything relative.
Using love.graphics.draw(ImageObject,x,y, math.rad(45)) produces are very fuzzy image, whereas love.graphics.draw(ImageObject,x,y, math.rad(90)) produces are nice clean image.
The image I am using is a 32x32 png file.
It seems like a bug in the draw the rotation code. Is there any way to achieve clean rotated images without needing an image for every rotation?
Thanks!
Rotated images are Fuzzy
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
Re: Rotated images are Fuzzy
You could try setting the filtermode on the image, although I'm not sure if it's used for rotating as well.
http://love2d.org/wiki/(Image):setFilter
You'd need to set it to 'nearest'.
If that doesn't work, you'll have to wait for one of the more experienced guys to show up
http://love2d.org/wiki/(Image):setFilter
You'd need to set it to 'nearest'.
If that doesn't work, you'll have to wait for one of the more experienced guys to show up
-
- Prole
- Posts: 10
- Joined: Wed Jun 05, 2013 6:05 pm
Re: Rotated images are Fuzzy
I will give that a try and see if it helps. I'll post my findings.
Thanks!
Thanks!
-
- Prole
- Posts: 10
- Joined: Wed Jun 05, 2013 6:05 pm
Re: Rotated images are Fuzzy
I tried the setFilter method. setFilter("nearest","nearest") took the outside fuzz away but it distorted the colors inside the image.
It almost looks as if the rotated image on a non N,S,W,E direction is being anti-aliased.
It almost looks as if the rotated image on a non N,S,W,E direction is being anti-aliased.
Re: Rotated images are Fuzzy
Can you post the code and the image and then tell us what you see and what you were expecting?
Shallow indentations.
-
- Prole
- Posts: 10
- Joined: Wed Jun 05, 2013 6:05 pm
Re: Rotated images are Fuzzy
The code is in my original post. It's two lines of code. If you use that code and load an image it won't look clean when it is rotated. This should be very easy to reproduce. My exact code is a little convoluted as I have positions stored on an object. None of this is relevant however as the issue is with the draw function and not my image or the preceding code. This is proven by rotating the image at 90 and 45 and getting varying results in the visual impact of the image.
-
- Prole
- Posts: 10
- Joined: Wed Jun 05, 2013 6:05 pm
Re: Rotated images are Fuzzy
Ok. This is interesting. I tried a different image and it looks correct. It must be something to do with the image itself that causes the distortion.
This post can be ignored for now
This post can be ignored for now
Re: Rotated images are Fuzzy
That's why I specifically asked for the image. The whole graphics pipeline has a lot of details and can have certain effects on special data. Some of them may be outside of your expectations and look "wrong".EvilSheepLord wrote:It must be something to do with the image itself that causes the distortion.
Shallow indentations.
-
- Prole
- Posts: 10
- Joined: Wed Jun 05, 2013 6:05 pm
Re: Rotated images are Fuzzy
Gotcha. It was a spaceship I found online that I was using to try out the engine. When I get a chance I will post a link to the image I was using.Boolsheet wrote:That's why I specifically asked for the image. The whole graphics pipeline has a lot of details and can have certain effects on special data. Some of them may be outside of your expectations and look "wrong".EvilSheepLord wrote:It must be something to do with the image itself that causes the distortion.
Thanks!
- substitute541
- Party member
- Posts: 484
- Joined: Fri Aug 24, 2012 9:04 am
- Location: Southern Leyte, Visayas, Philippines
- Contact:
Re: Rotated images are Fuzzy
It isn't a bug, it's rather a limitation in the filters. If you rotate any image in a graphics program, it will look fuzzy (unless that graphics program has a super-awesome filter we don't know about >_>*.) Same is true for scaling images. To fix this, either use a higher resolution image and scale it down, or use separate images for each rotation.
Edit: *or if the image you are rotating is a high resolution image.
Edit: *or if the image you are rotating is a high resolution image.
Currently designing themes for WordPress.
Sometimes lurks around the forum.
Sometimes lurks around the forum.
Who is online
Users browsing this forum: Bing [Bot], Google [Bot] and 4 guests