# Please Help: Issue with 3D

**URL:** <https://discourse.processing.org/t/please-help-issue-with-3d/30290>\
**Category:** Processing.py\
**Tags:** homework\
**Created:** [May 25, 2021, 9:43pm UTC](https://discourse.processing.org/t/please-help-issue-with-3d/30290 "2021-05-25T21:43:54Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![bridgette](https://avatars.discourse-cdn.com/v4/letter/b/b3f665/32.png) [@bridgette](https://discourse.processing.org/u/bridgette)\
**Post date:** [May 25, 2021, 9:43pm UTC](https://discourse.processing.org/t/please-help-issue-with-3d/30290/1 "2021-05-25T21:43:55Z")

</div>

hi guys can anyone help me out please im sorta really stuck. im trying to draw a sphere onto processing but anytime i use P3D, the display image is just grey and blank. does anyone know why?

---

<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:** [May 25, 2021, 10:23pm UTC](https://discourse.processing.org/t/please-help-issue-with-3d/30290/2 "2021-05-25T22:23:24Z")

</div>

Hello,

Reference for sphere():  
_[sphere() \ Language (API) \ Processing 3+](https://www.processing.org/reference/sphere_.html)_

Check out the related reference as well for an example with setup() and draw().

The tutorial also has sphere examples:  
_[P3D \ Processing.org](https://www.processing.org/tutorials/p3d/)_

`:)`

---

<div class="post-metadata">

**Author:** ![bridgette](https://avatars.discourse-cdn.com/v4/letter/b/b3f665/32.png) [@bridgette](https://discourse.processing.org/u/bridgette)\
**Post date:** [May 25, 2021, 10:25pm UTC](https://discourse.processing.org/t/please-help-issue-with-3d/30290/3 "2021-05-25T22:25:43Z")

</div>

Hello! So I’ve tried using the references and it doesn’t seem to work either way. I still get the same result. Whenever I run the program, I only get a blank, grey square

---

<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:** [May 25, 2021, 10:27pm UTC](https://discourse.processing.org/t/please-help-issue-with-3d/30290/4 "2021-05-25T22:27:01Z")

</div>

Please post your entire code

For example with sphere say noStroke(); before and  
lights(); and fill(255,0,0); before

and sphere(100);

You might have clipping issues

Or the sphere is behind the camera

Chrisir

---

<div class="post-metadata">

**Author:** ![bridgette](https://avatars.discourse-cdn.com/v4/letter/b/b3f665/32.png) [@bridgette](https://discourse.processing.org/u/bridgette)\
**Post date:** [May 25, 2021, 10:32pm UTC](https://discourse.processing.org/t/please-help-issue-with-3d/30290/5 "2021-05-25T22:32:13Z")

</div>

Hello, so this is the code I have. But the issue is, even when I used the references on the processing website, I still get the same result, and I’m not sure why

```auto
def setup(): 
    size(800, 600, P3D)
    translate(400, 300)
    sphere(100)
    
    lights()
    
    background('#004477')
    
    pushMatrix()
    translate(600,300)
    sphere(100)
    popMatrix()
    
    pushMatrix()
    translate(200,300)

    popMatrix()

```

---

<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:** [May 25, 2021, 10:35pm UTC](https://discourse.processing.org/t/please-help-issue-with-3d/30290/6 "2021-05-25T22:35:06Z")

</div>

You did not fill() your sphere().  
And background() after sphere covered over it.

`:)`

---

<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:** [May 25, 2021, 10:35pm UTC](https://discourse.processing.org/t/please-help-issue-with-3d/30290/7 "2021-05-25T22:35:37Z")

</div>

Please use setup AND draw

Also comment out background and translate

---

<div class="post-metadata">

**Author:** ![bridgette](https://avatars.discourse-cdn.com/v4/letter/b/b3f665/32.png) [@bridgette](https://discourse.processing.org/u/bridgette)\
**Post date:** [May 25, 2021, 10:37pm UTC](https://discourse.processing.org/t/please-help-issue-with-3d/30290/8 "2021-05-25T22:37:03Z")

</div>

So for the draw function, would I put in the push and pop matrix there?

---

<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:** [May 25, 2021, 10:38pm UTC](https://discourse.processing.org/t/please-help-issue-with-3d/30290/9 "2021-05-25T22:38:11Z")

</div>

Yes all drawing is in draw

---

<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:** [May 25, 2021, 10:38pm UTC](https://discourse.processing.org/t/please-help-issue-with-3d/30290/10 "2021-05-25T22:38:20Z")

</div>

Read this:  
_[background() \ Language (API) \ Processing 3+](https://processing.org/reference/background_.html)_

about where background usually goes.

Same applies to python… I changed the category to Processing.py

`:)`

---

<div class="post-metadata">

**Author:** ![bridgette](https://avatars.discourse-cdn.com/v4/letter/b/b3f665/32.png) [@bridgette](https://discourse.processing.org/u/bridgette)\
**Post date:** [May 25, 2021, 10:40pm UTC](https://discourse.processing.org/t/please-help-issue-with-3d/30290/11 "2021-05-25T22:40:12Z")

</div>

So this is the code I have, yet I still have the same issue occurring again. Is this an issue with processing itself?

```auto
def setup(): 
    size(800, 600, P3D)
    background('#004477')
    translate(400, 300)
    fill('#FFFFFF')
    sphere(100)
    
    lights()

def draw():
    pushMatrix()
    translate(600,300)
    sphere(100)
    popMatrix()
    
    pushMatrix()
    translate(200,300)

    popMatrix()

```

 ![Screen Shot 2021-05-26 at 00.39.11](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/7/75494b065af307f58801973f7256f1683446a22b.jpeg)  
The image above is what shows

---

<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:** [May 25, 2021, 10:40pm UTC](https://discourse.processing.org/t/please-help-issue-with-3d/30290/12 "2021-05-25T22:40:47Z")

</div>

Comment out the translate

---

<div class="post-metadata">

**Author:** ![bridgette](https://avatars.discourse-cdn.com/v4/letter/b/b3f665/32.png) [@bridgette](https://discourse.processing.org/u/bridgette)\
**Post date:** [May 25, 2021, 10:41pm UTC](https://discourse.processing.org/t/please-help-issue-with-3d/30290/13 "2021-05-25T22:41:59Z")

</div>

Yup, just did. I still get the same issue ☹

---

<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:** [May 25, 2021, 10:45pm UTC](https://discourse.processing.org/t/please-help-issue-with-3d/30290/14 "2021-05-25T22:45:54Z")

</div>

```auto
    size(800, 600, P3D)
    background(0)
    
    fill(255,0,0)
    sphere(100)

```

---

<div class="post-metadata">

**Author:** ![bridgette](https://avatars.discourse-cdn.com/v4/letter/b/b3f665/32.png) [@bridgette](https://discourse.processing.org/u/bridgette)\
**Post date:** [May 25, 2021, 10:50pm UTC](https://discourse.processing.org/t/please-help-issue-with-3d/30290/15 "2021-05-25T22:50:07Z")

</div>

So I tried this, and I still get the blank, grey screen.

---

<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:** [May 25, 2021, 11:03pm UTC](https://discourse.processing.org/t/please-help-issue-with-3d/30290/16 "2021-05-25T23:03:56Z")

</div>

Ok and same minimal with sphere (10);

---

<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:** [May 25, 2021, 11:05pm UTC](https://discourse.processing.org/t/please-help-issue-with-3d/30290/17 "2021-05-25T23:05:39Z")

</div>

Or are you on Mac Big Sur

> <https://github.com/jdf/Processing.py-Bugs/issues/310>
>
> Hi, using Python mode on macOS Big Sur 11.2.3, in 3D mode a blank window is disp…layed. 3D mode for Python works fine on macOS Catalina 10.15.7

---

<div class="post-metadata">

**Author:** ![bridgette](https://avatars.discourse-cdn.com/v4/letter/b/b3f665/32.png) [@bridgette](https://discourse.processing.org/u/bridgette)\
**Post date:** [May 25, 2021, 11:13pm UTC](https://discourse.processing.org/t/please-help-issue-with-3d/30290/18 "2021-05-25T23:13:21Z")

</div>

Yeah, I just checked and it is Mac Big Sur. Do you have any clue on how to work around it?

---

<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:** [May 25, 2021, 11:31pm UTC](https://discourse.processing.org/t/please-help-issue-with-3d/30290/19 "2021-05-25T23:31:32Z")

</div>

You may want to consider this:

> **[Parallels Desktop for Mac Student Edition, Academic Version Discount](https://www.parallels.com/landingpage/pd/education/?gclid=Cj0KCQjwwLKFBhDPARIsAPzPi-JUMxUELLUkpzxojjif7bgBH2fWsbWIJEQau8F5tKME4a8ogCN3YTIaAqyvEALw_wcB)**
>
> Students and educators save 50% on this special academic version of Parallels Desktop to run thousands of Windows programs on Mac without rebooting.

Do so at your own risk… I have no experience with this.

You may want to ask in the forum if this is a solution for others.

`:)`

---

<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:** [May 26, 2021, 7:13am UTC](https://discourse.processing.org/t/please-help-issue-with-3d/30290/20 "2021-05-26T07:13:39Z")

</div>

when you can use p5.js (instead of python):

check the online editor:

see [https://editor.p5js.org/](https://editor.p5js.org/)

[Next page](https://discourse.processing.org/t/please-help-issue-with-3d/30290.md?page=2)
