3d Pixel Art (Pixelated) Games

Is there a simple example for 3d Pixelated rendering in Defold?

I have searched in various places but all I found is LowrezJam and Pixel Planet (youtube). Is there a more basic project that directly implements Pixelated rendering in 3d games?

![Screenshot_2023-06-12-07-31-07-646_com.google.android.youtube|690x310](upload://rQVAs6sLjKctcP9rBsIhI61G9Dh.jpeg)

I was very inspired by the project made with godot and I really wanted to make a game like that.

We cover pixel art graphics here: Adapting graphics to different screen sizes

2 Likes

3D pixelation is just using low resolution textures and setting the nearest filter in the project settings, according to the link above.

But 3D in Defold is a wider topic. You can take a look at this or this thread.

Since you are specifically interested in pixel 3D, if this example is what are you looking for then take a look at the demo that comes with the trenchbroom extension.

Unfortunately, your picture didn’t load, so it’s not clear what type of 3D we are talking about.

2 Likes

Oh, 3d pixelation! Ignore my previous reply!

Yeah, Its my first time post on this forum, and i am not using english so, sorry if there is a “wrong translated word”.

I end up found “defold team explain” series on YouTube (uploaded 4 years ago) and that’s give me better understanding of render and shader work.

Then i render all models to render target, make a quad and get the texture from render target, finally i set the quad material and tweak the fragment program.

In the fragment program i add the glsl script for Pixelated Effect from Defragments Project that’s i found on github.

@britzl btw thanks, for quick respons!

It’s my 1 week of using defold and i already feel so accepted…

2 Likes

First week and already doing custom rendering with render targets, well done! :slight_smile:

Thanks, but i’m still struggle to make the projection of quad fit entire screen but still fixed aspect ratio when window resized…

Can you give me some example code, i use this for projecting the quad material

render.set_view(vmath.matrix4())
render.set_projection(vmath.matrix4_orthographic(-1,1,-1,1,-1,1))

Can you show the output effect?

In the example I did for simple lighting (or could be utilised for any postprocessing effect) I fill the screen with quad:

There I use a projection function (default is stretch, the same as explained in default render script: The render pipeline in Defold)

When you set projection always to:

render.set_projection(vmath.matrix4_orthographic(-1,1,-1,1,-1,1))

You won’t have it dynamic to e.g. window size, so take a look how projection matrices are calculated in default render script for different kind of projections :wink:

1 Like