# Why directionallight cannot show anything

**URL:** https://discourse.processing.org/t/why-directionallight-cannot-show-anything/24305
**Category:** Beginners
**Created:** [October 3, 2020, 9:20am UTC](https://discourse.processing.org/t/why-directionallight-cannot-show-anything/24305 "2020-10-03T09:20:52Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![yyf](https://avatars.discourse-cdn.com/v4/letter/y/b9bd4f/32.png) [@yyf](https://discourse.processing.org/u/yyf)
#### Post date: [October 3, 2020, 9:20am UTC](https://discourse.processing.org/t/why-directionallight-cannot-show-anything/24305/1 "2020-10-03T09:20:52Z")

</div>

void draw()  
{

background(0,0,0);  
translate(400,400,-mouseY);  
fill(0,255,0);  
directionalLight(255,0,0,10,0,0);  
noStroke();  
sphere(100.0);  
}

 ![屏幕快照 2020-10-03 17.20.07](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/1/1c81c7ef30916496ea5ed3af109c99b31d61b57f.png)

---

<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: [October 3, 2020, 10:34am UTC](https://discourse.processing.org/t/why-directionallight-cannot-show-anything/24305/2 "2020-10-03T10:34:31Z")

</div>

The color red for the sphere seems to work better:

```auto
void setup() {
  size(800, 800, P3D);
}

void draw() {
  background(0, 0, 0);

  translate(400, 400, -mouseY);

  directionalLight(255, 0, 0, 10, 0, 0);

  fill(255, 0, 0);
  noStroke();
  sphere(100.0);
}

```

---

<div class="post-metadata">

### Author: ![glv](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/glv/32/18785_2.png) [@glv](https://discourse.processing.org/u/glv)
#### Post date: [October 3, 2020, 1:01pm UTC](https://discourse.processing.org/t/why-directionallight-cannot-show-anything/24305/3 "2020-10-03T13:01:55Z")

</div>

Hello,

Shedding some light on this subject…

[Colors and Vision](https://ux1.eiu.edu/~cfadd/1160/Ch23RR/Sub.html)

`:)`

---

<div class="post-metadata">

### Author: ![yyf](https://avatars.discourse-cdn.com/v4/letter/y/b9bd4f/32.png) [@yyf](https://discourse.processing.org/u/yyf)
#### Post date: [October 3, 2020, 2:31pm UTC](https://discourse.processing.org/t/why-directionallight-cannot-show-anything/24305/4 "2020-10-03T14:31:09Z")

</div>

> [@glv](#):
>
> Shedding some light on this subject…

Thanks！very helpful!

---

<div class="post-metadata">

### Author: ![yyf](https://avatars.discourse-cdn.com/v4/letter/y/b9bd4f/32.png) [@yyf](https://discourse.processing.org/u/yyf)
#### Post date: [October 3, 2020, 2:31pm UTC](https://discourse.processing.org/t/why-directionallight-cannot-show-anything/24305/5 "2020-10-03T14:31:47Z")

</div>

> [@yyf](#):
>
> Thanks！very helpful!

Thanks！very helpful!

---

<div class="post-metadata">

### Author: ![yyf](https://avatars.discourse-cdn.com/v4/letter/y/b9bd4f/32.png) [@yyf](https://discourse.processing.org/u/yyf)
#### Post date: [October 3, 2020, 2:33pm UTC](https://discourse.processing.org/t/why-directionallight-cannot-show-anything/24305/6 "2020-10-03T14:33:15Z")

</div>

Thanks！very helpful!
