0
\$\begingroup\$

https://streamable.com/km0hv0

enter image description here

I want to make a low-poly game.

I noticed that in blender in viewport shading mode, when the camera rotates, the face progressively change color, from grey to black, depending on the angle between the camera and the normal of the faces.

Usually, when I load my model or level inside an engine like godot, with or without lighting, it's difficult to differentiate faces.

Is it possible to easily recreate this method of displaying faces in an engine? It makes it easy to see 3D shapes and perspective. (the result is similar when wireframe is disabled)

EDIT:

This seems like a partial answer, it sort of does what I want, but I now want to decide what angle have what shade of gray.

normal linked to albedo

\$\endgroup\$
6
  • \$\begingroup\$ This looks like it might just be a Fresnel term, (n • v), though possibly using a shifted view direction. Do you find faces are brightest when facing directly at the camera, or slightly tilted in a particular direction? (I don't have Blender installed on this device to check myself just now) \$\endgroup\$ Commented Oct 4, 2024 at 10:42
  • \$\begingroup\$ Generally, I would say yes, although some faces are darker "at first" when facing some directions, so there might be an offset somewhere. By "•" you mean dot product? So that means I must write a vertex shader and a fragment shader. \$\endgroup\$ Commented Oct 4, 2024 at 13:01
  • \$\begingroup\$ Yep, standard dot product, possibly scaled and clamped to keep it in a usable range. \$\endgroup\$ Commented Oct 4, 2024 at 13:56
  • \$\begingroup\$ actually, I just dot the normal with (1,0,0), use the result to make a vector, and put this in albedo in the visual shader, it seems to be one part of the solution... \$\endgroup\$ Commented Oct 4, 2024 at 14:57
  • \$\begingroup\$ Can you describe what kind of interface you want to use to associate a shade of grey with a particular angle? \$\endgroup\$ Commented Oct 5, 2024 at 7:14

0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.