An experiment in pencil shaders in brutalist environments in Unity.
Published by Grisha Szep
Unity HLSL C#
I would like to create a walking simulation of what it would be like to explore a pencil drawing of a brutalist building. Below is an example of the style I am aiming for.
As the player walks through the environment, the style of the pencil strokes and shading should change to reflect the mood. Slow straight strokes for calm and thick chaotic strokes for danger. Below a handful of examples to use as reference.
We take inspiration from slime mold simulations and use compute shaders to define the update rules for the position and velocity of each pencil. In our case, instead of having the pencil react to each other, as the slime mold does, the pencils will be a post-processing effect in a rendering pipeline.
The shader we write will have to make a pencil:
The HLSL code for these rules is available in this repository
There is too much going on with all the moving pencils. More frame-to-frame consistency is required in order to make a walking simulation playable. This can be done by running the compute shaders for multiple passes in the background and only rendering images once the pencil simulation has reached “steady state”. This will give the walking simulation a stop-motion feeling like with hand-drawn animation.