# 3D Lighting problems with Custom Shapes

**URL:** https://discourse.processing.org/t/3d-lighting-problems-with-custom-shapes/31466
**Category:** Beginners
**Created:** [July 27, 2021, 7:15pm UTC](https://discourse.processing.org/t/3d-lighting-problems-with-custom-shapes/31466 "2021-07-27T19:15:14Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![KumuPaul](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/kumupaul/32/13072_2.png) [@KumuPaul](https://discourse.processing.org/u/KumuPaul)
#### Post date: [July 27, 2021, 7:38pm UTC](https://discourse.processing.org/t/3d-lighting-problems-with-custom-shapes/31466/2 "2021-07-27T19:38:56Z")

</div>

Geometry drawn with the `vertex()` function default to all vertices having a constant normal (which is `(0, 1, 0)` I think). Fortunately in the latest version (1.4.0) a feature I implemented was added: [a function to set the normal vector for the next vertex](https://p5js.org/reference/#/p5/normal). Alternately you can [create custom p5.Geometry and use `calculateNormals()`](https://discourse.processing.org/t/drawing-and-orbiting-a-shape-with-many-vertices/30375/2).

---

_[View the full topic](https://discourse.processing.org/t/3d-lighting-problems-with-custom-shapes/31466)._
