2D Toolkit Forum
2D Toolkit => Support => Topic started by: Noodle on June 29, 2013, 11:47:34 pm
-
Hi
I am currently evaluating 2DTK in order to use it in a 2d hd game.
I am quite happy with the product so far. But I have been struggling a bit to get pixel perfect with point point filetered texture.
I don't use bilinear because it makes things look blurry, which is not great for 2d game.
I use a tk2d camera and animated sprite, I'm getting a result that is nearly perfect but has a small artefact ( please take a look at the example )
(http://mogpandora.free.fr/artefact.png)
It will be very nice to you if you could check and tell me if you manage to get this sprite pixel perfect without those artefact ( here is the link : http://mogpandora.free.fr/avatar.png (http://mogpandora.free.fr/avatar.png) )
Thanks !
-
Hi, What artefact are you looking at here? I think I'm failing to see the error.
-
Hello,
Too small to see without magnification, but the 'chin' on the opposite side to the tongue, the circle is not round, it has a dent in it.
I'm assuming this is what's wrong?
I don't know how to fix it tho' :-[
cheers
evs
-
Hello thanks for your answer.
Yes the problem is hard to see, but if you look closely at the chin like evs says, you will notice it.
I think it's pffseted by one pixel on the right and one on the top.
Thanks !
-
Is this when running the game, or in the editor viewport?
Is the sprite at a round number position?
-
It happens both in editor and in game.
yes the sprite is at a round number position, I try to move it a little bit, but couldn't see any difference.
I also manage to get ride of the artefact by destroying/recreating the camera, and playing with reset scale and pixel perfect several times, but after resizing the windows the artefact came back.
Did you try to render the asset I put in my first post using point filter ? Cause if you have the same issue it might help you to figure out whats really happening.
Thanks
-
Yup I can get this working pixel perfect fine, using a point filter.
Your sprite looks to be one pixel too small, is your camera configured properly?
What I did
1. Create new sprite collection, set to use tk2dCamera, and add this sprite, set point filter & commit.
2. Create a tk2dCamera with no overrides. (default settings)
3. Add sprite to scene, move to 100, 100, 0 - its correct in game view.
* Might need to press play once and stop just to make sure its detected resolution correctly.
No scaling or clicking pixel perfect or anything there. Just the steps above.