Godot: Impossible to make pixel perfect 2.5D

Created on 19 May 2020  路  6Comments  路  Source: godotengine/godot

Godot 3.2.1

OS: Windows 10

Issue description:

Pixel distortion (stretching and squashing) on low resolution pixel sprites is caused in both Perspective and Orthogonal camera mode when creating a game with 3D world and 2D pixel art characters.

I have attempted various window options and camera options and sought help in both Reddit and Godot forum. Users seeing the issue and unable to find a solution finally directed me to make a bug report.

Pixel distortion is especially noticeable in character eyes.

pixel_stretch3

archived rendering

Most helpful comment

@golddotasksquestions I'm not sure if pixel-perfect 3D billboarded sprites is possible given what the engine currently exposes. This may be more of a feature proposal than a bug at this point. In this case, I'd recommend creating a proposal instead.

All 6 comments

Here is a link to a stripped down project so that you can see the visual issue. https://www.dropbox.com/sh/e66udqft2up6rdh/AABW-nLk7sdZtRRzLksOlAuWa?dl=0

Project02.zip
You can attach a sample project here by dragging & dropping it.

Issue resolved. I used CptPotato's shader on my sprite. It can be found here: https://github.com/CptPotato/GodotThings/blob/master/SmoothPixelFiltering/SmoothPixel3D.shader

@Gyeff Thanks for letting us know :slightly_smiling_face: I'll close this then. Maybe we could document this somewhere, but I don't really know where this information could be added.

@Calinou @Gyeff

Gyeff initial desire was to make the Sprite pixel perfect. The SmoothPixel3D.shader does not make the Sprite pixel perfect. What the SmoothPixel3D.shader does is (kinda) similar to a bicubic upscale. Pixel perfect would mean nearest-neighbor upscale while all pixel keep their relative proportion.

Is this Engine issue therefore really solved?

I've poked at Gyeffs demo quite a bit the day before yesterday and could not get it to work.
My thinking is when the project uses Billboard Sprites, an orthogonal camera, only use integer values to up scale your Camera zoom/Test height and Display stretch mode "viewport", the result should be pixel perfect. But it is not.

Gyeffs current "solution" is giving up on pixel perfectness and instead embracing smoothly filtered pixels. Which is fine for his case I guess, but I would still think the engine should render the sprite pixel perfect if those conditions are met.

@golddotasksquestions I'm not sure if pixel-perfect 3D billboarded sprites is possible given what the engine currently exposes. This may be more of a feature proposal than a bug at this point. In this case, I'd recommend creating a proposal instead.

Was this page helpful?
0 / 5 - 0 ratings