1
\$\begingroup\$

Cube World uses a pretty good looking shader, I especially like the shading of the characters:

enter image description here

Is this soft shading? I'd like to achieve this effect in Unity 3D Free, but since the free version doesn't support dynamic shadows, guess I have to code it myself, so an article on this or the algorithm would be great.

\$\endgroup\$

1 Answer 1

4
\$\begingroup\$

I don't see any special shaders there, just some vertex colors that are generated with an ambient occlusion (or similar) calculation algorithm and perhaps some differently calculated vertex normals. The results remind me of a demo I've seen some time ago which simulated global illumination by "bending" vertex normals and generating occlusion values for vertices.

The only thing one might call a special shader could be a hemisphere/SH (spherical harmonics) light that appears to be used in there.

\$\endgroup\$
2
  • \$\begingroup\$ What is the case with night or dungeon scenes? (cubeworldforum.org/uploads/gallery/album_24/…) These techniques are for global illumination, right? If I reduce the intensity of the global lighting and use a point light, won't the models lose their smoothness? \$\endgroup\$
    – nosferat
    Sep 12, 2012 at 12:15
  • 1
    \$\begingroup\$ It appears to be about the same with dungeon scenes. As for the point lights - that's where vertex normals become most useful - they generally allow to control the direction from which lights give maximum brightness. For example, corner vertices might have their normals pointing slightly out of the corner, not straight away from the surface. \$\endgroup\$
    – snake5
    Sep 12, 2012 at 12:36

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .