Mobius art style - crosshatched shadows

David Graham's icon

Hello, I'm trying to follow along with this video by useless game dev on rendering with a hand drawn art style inspired by mobius.

I've got pretty far, but I'm having serious problems with occlusion shadows. At the moment I take a render using jit.gl.node and apply a crosshatch texture is a pixel is dark enough - this isn't the proper effect though.

I ideally want to isolate the shadowmap from the camera's perspective and apply the texture to that, and then overlay that over a scene that has no lighting It seems I can only access the shadow map from the camera's perspective.

Does anyone have any tips?

Patch included below, let me know if it doesn't run.

mobius tidying up.maxpat
text/plain 351.05 KB

David Graham's icon

I've tagged this advanced because I don't think it's a trivial problem, but I haven't been using jitter for very long.

Matteo Marson's icon

Hi David,

nice project! if you want a texture containing just the shadows, I think you'll have to write your shadow-mapping shader.
To get you started, here's a variance shadow mapping implementation

Variance shadow mapping.zip
application/zip 22.39 KB

( For reference, here's a video series about variance shadow mapping to better understand how it works:
https://www.youtube.com/watch?v=LGFDifcbsoQ )

Hope it helps,
ciao!

David Graham's icon

Matteo thank you so much, this works great! I've got the crosshatching on shadow, now I just need to do the same for shading on the scene. I'll share the patch when it's all together