Skip to content

Commit

Permalink
m
Browse files Browse the repository at this point in the history
  • Loading branch information
qibinyi authored and qibinyi committed Aug 23, 2017
1 parent e4f3f36 commit 3c4022e
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions dev_notes/blender.md
Original file line number Diff line number Diff line change
Expand Up @@ -754,7 +754,20 @@ The left side is a cube’s .obj file , which has been improperly given concentr

while the right side is correctly exported with planar normals.

![](https://raw.githubusercontent.com/mebusy/notes/master/imgs/blender_cocentric_normal_render.png)

> Figure 4-6. Concentric normals (smooth shading) in WebGL
![](https://raw.githubusercontent.com/mebusy/notes/master/imgs/blender_coplanar_render.png)

> Figure 4-7. Planar normals (flat shading) in WebGL
The concentric cube is lit and shaded as though it were a sphere, whereas the planar cube is lit and shaded logically, treating the top side as a sort of tabletop.

Looking the left side , we see that each vertex in the cube is matched to a normal vector that is equal to the vertex scaled by 1/√3 ≈ 0.5773.

This is a dangerous behavior in some exporters where, if explicit normal information is not found, it will default to creating unit vectors out of scaled vertices.

This prevents the exporter from failing, but results in a poorly lit and often unrecognizable object.


Binary file added imgs/blender_after_edge_split.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added imgs/blender_before_edge_split.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 3c4022e

Please sign in to comment.