6
$\begingroup$

I'm trying to recreate a Gameboy pixel-art style using a front-facing orthogonal view and freestyle for edges. My reference is this well-known picture from a pokemon game:

Style reference

My main problem is that edges and lights are not rendering constantly. On the render below, the three spheres are duplicated objects, but render differently:

Render result

The lightning is a simple sun facing the center of the scene as you can see here:

enter image description here

My output properties have 160*144px for the resolution. My render properties and other relevant settings are set like this:

enter image description here enter image description here enter image description here

Here is my very simple composition setup using only a color ramp:

enter image description here

What am I missing? It's like the only one rendering rather correctly is the one at the center of the scene.

I uploaded the file here.

$\endgroup$
2
$\begingroup$

What you can see is the effect of sub-pixel movement. If an area that produces a pixel, has different contents than another area producing a pixel, those pixels can differ. Therefore what you need is to snap your objects to pixels.

I've set up my camera at 60° angle, and scaled down the unit scale to get a satisfying grid - something that could be my resolution. I decided that I want a lower resolution than yours, so that I can count the pixels easier and the screenshots are more readable here on SE site. I made sure that the grid aligns with camera borders.

Keep in mind, this is only a pixel grid in the Top Orthographic View, while in the camera view, every grid cell has only half (perceived) height, so each pixel is two grid cells tall.

Now when I duplicate the sphere in camera mode, and move them with CTRL held, my sphere is aligned to the pixel grid:

And if I render the image, all spheres look the same:

However, if you look in a Free view, you might notice the positions of spheres don't exactly illustrate how you would position them in a real scenario:

So let's repeat, this time disabling Z axis (SHIFT + Z) when moving our balls:

The render:

Some balls are different. To be exact, there are two types of balls. This is because, as I said earlier, the grid on XY plane isn't the same as pixel grid - 1 pixel takes two cells. So we need to make sure to align all our objects to even vertical cells (or all objects to odd vertical cells, but we have to be consistent):

And the render:

$\endgroup$
3
  • 1
    $\begingroup$ Thanks a lot, I never would have thought of any of that. This is a very informative answer for my project. I'm going to redo the models and scale / move things around appropriately and see where it takes me. $\endgroup$ – MattOnyx Feb 8 at 17:51
  • 1
    $\begingroup$ @MattOnyx you don't have to redo your models, you only have to make sure you snap them to grid (to pixels). $\endgroup$ – Markus von Broady Feb 8 at 18:18
  • 1
    $\begingroup$ I did what you said, and with some adjustments, it's now pixel-perfect. Thanks a lot! $\endgroup$ – MattOnyx Feb 8 at 19:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.