- Home /
How to achieve the shader used in MagicaVoxel?
Well, I plan to use voxels for my game so I decided to use MagicaVoxel to handle the modelling, but one thing caught my attention and that was the shader, it managed to make plain colours look great, so I've decided that I want to use that style of shading, but have had no luck finding it T_T, and I cant create it as I don't know how to write shaders. ][1]][1]
basically it is a fade in where ever a normal is detected, whether up or down.
Edit: I'm specifically looking for a link to a tutorial or something like that (not asking for anyone to do it for me), I have also noticed a similar shader used in Monument Valley, so I do know it is possible
Please don't bump posts that are less than a couple days old. Also are you asking us to write you a shader, because we don't do that.
I'm looking for tutorials, I fully understand that ain't nobody got time for that. I'm kinda at my wits end here, so I'm trying to at least get a link to a tutorial or something like that :(
I don't see anything special about the shader.. it just looks like lighting with soft shadows. Are you using Pro?
I'm using pro trial, but notice that each right angle has a shadow to it, using soft shadows would result in it looking less delicate.
Answer by unimechanic · Oct 07, 2014 at 02:19 PM
I think that shadowing effect is Ambient Occlusion:
http://en.wikipedia.org/wiki/Ambient_occlusion
You can emulate it by setting the vertex colors of the mesh:
http://docs.unity3d.com/ScriptReference/Mesh-colors.html http://docs.unity3d.com/ScriptReference/Mesh-colors32.html
And use a vertex lit shader:
Answer by HumanSquid · Feb 28, 2015 at 08:25 AM
There's some more information about Ambient Occlusion here that some might find interesting:
Your answer
Follow this Question
Related Questions
How to visualize a volumetric sphere using color gradients? 0 Answers
Importing an obj from magica voxel into unity looks so shiny and glossy... 0 Answers
URP 2D lights with Mesh Renderer?,URP 2D Light for Mesh Renderer? 0 Answers
[Solved] Vertex Color/Alpha Transparency Rendering as Opaque 1 Answer
Implementing multi-texture shading with the marching cube algorithm (voxels) 1 Answer