Download

How to pixelate a material?

So I’ve been searching across the web for the past 30 mins and found loads of ways to unpixelate and render things better…
But I am making a pixel themed game, and I can’t find anything besides using post process…

have borrowed a water material (free-to-use) and I wish to pixelate it…
Is there a way to pixelate this material? (it’s animated btw)

Hello!

Here is a video by project-Shasta, which should help you out:

The only thing he does is putting in into a material function, which you can create by right clicking in your project’s folder view and select “Materials & Textures” -> “Material function”.

For you convenience I made the material without a material function and it looks like this:

The “PixelSize” is just a parameter. You can create one by right clicking in the material editor and type in “scalar parameter”.Give it a name and a number. If you don’t want to recompile everytime in the material editor and you only want to change the pixelation, just create a material instance and apply it to your object.^^

Hope it helps :slight_smile:

Is there a way to pixelate a texture in world space? Not sure if that’s the correct way to word it, but with the above method you get pixels of different sizes based on how UVs are scaled, but I would like all pixels to be the same size regardless of how the UVs are. This may not be possible but I figured I’d ask someone with some more know how

It’s exactly the same, but instead of using the texture coordinate node, you use a absolute world position node. ( you often have to scale the UV quite dramatically when using world space ).

Maybe I’m missing something but that doesn’t work for me at all? Here’s what I’m doing, I appreciate the help!

Yes that’s right. But when you use world position, even if you’re not pixelating, the UVs get very compressed ( or expanded, I can’t recall, sorry, not at a machine right now ), so you have to compensate by multiplying by a very small ( large ) constant, like .001.

I think you’re on the right track…

There is a content example for this.
It also shows a function called MosaicUVs.
Screencap: