Doing some fun tests making sprites with normal maps from low poly models and toon lighting them.
#gamedev #blender #godot #shader very late #screenshotsaturday
I've made a little setup in blender where I can animate the 3D model and get a rough idea of the pixelated sprite in real time. It's not exactly the same as the render output, but does help give an idea.
After exporting both an albedo and normal sprite I light it within godot. Where I make small modifications to the fragment and light pass to add a global ambient light variable and a curve texture that I use to define my toon shading.
There are clearly some drawbacks to this whole pipeline. The main one being that the size of small features (like eyes) tend to change with different poses.
In the future I'll likely render the character without eyes and manually add those in.
@KelvinvanHoorn very cool!
What is the reason for that?
For performance?
Or are you gonna apply some sort of paintover that cannot be achieved in real time?
@Calined
You mean instead of using the 3D models directly and doing some pixelation post processing?
It's primarily because I'm curious what I can do with it and that it would allow me to make a standard 2D game (instead of 2.5D).
Also certain small features, like eyes, get a bit muddy with this approach so I will likely remove them from the renders and do a paintover instead so that they stay consistent.
@KelvinvanHoorn ah yeah
Ah ok then I understand =)
I also didn't know you were looking for this pixilated look
@KelvinvanHoorn Very cool setup!
Looking good already, but maybe a bit too smooth on the shading, giving a bit of a "pillow-shaded" look?
You could try a starker contrast for a bolder, more pixelart-like look - with less color bands or a sharper falloff.
But maybe it's just a limitation of a low-poly model - the details we add when manually drawing pixelart are just not there.
@krajzeg Thank you. There is definitely still room for improvements.
The lighting curve needs further tweaking. At the moment I only consider the positive NdotL but I probably should take the whole range into account so that I can better control the shaded areas.
The low poly model does not have the detail to draw the foldings or other finer details, which would be acentuated in hand draw pixel art.
I hope as I continue I get better at making more visually interesting models
@KelvinvanHoorn I'd go the other way with more uniformity in positive NdotL (to bump contrast, get rid of too many shades) - but the fun thing about shaders is you can experiment and find the look *you* like