# How to light a vertex

**URL:** <https://discourse.processing.org/t/how-to-light-a-vertex/13148>\
**Category:** Coding Questions\
**Created:** [August 2, 2019, 10:30pm UTC](https://discourse.processing.org/t/how-to-light-a-vertex/13148 "2019-08-02T22:30:14Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![lofi](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/lofi/32/5989_2.png) [@lofi](https://discourse.processing.org/u/lofi)\
**Post date:** [August 2, 2019, 10:30pm UTC](https://discourse.processing.org/t/how-to-light-a-vertex/13148/1 "2019-08-02T22:30:14Z")

</div>

I’m trying to make little “hills” and was hoping to light them up. I’m using sets of vertexes but cant get light to act on them. I can make light work on a sphere or a box, but not my shapes made with vertexes.

I feel like I must be missing something fundemental here. Any ideas?

Here’s the example: [https://codepen.io/loficodes/pen/9f9cb3adf6e5e02de450d1849cde85c2?editors=0010](https://codepen.io/loficodes/pen/9f9cb3adf6e5e02de450d1849cde85c2?editors=0010)

Thanks for any help

---

<div class="post-metadata">

**Author:** ![Chrisir](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/chrisir/32/45_2.png) [@Chrisir](https://discourse.processing.org/u/Chrisir)\
**Post date:** [August 3, 2019, 1:43am UTC](https://discourse.processing.org/t/how-to-light-a-vertex/13148/2 "2019-08-03T01:43:02Z")

</div>

lights ();

in draw after background?

---

<div class="post-metadata">

**Author:** ![lofi](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/lofi/32/5989_2.png) [@lofi](https://discourse.processing.org/u/lofi)\
**Post date:** [August 3, 2019, 9:54am UTC](https://discourse.processing.org/t/how-to-light-a-vertex/13148/3 "2019-08-03T09:54:53Z")

</div>

You sent me the right direction! The issue was that lights work on shapes with material. In the lights() demo they’re using a box, which already has a material. Vertexes dont.

Adding specularMaterial(250) got the whole thing going.

Thank you so much!
