# How to define custom planes in processing?

**URL:** https://discourse.processing.org/t/how-to-define-custom-planes-in-processing/32918
**Category:** Coding Questions
**Created:** [October 19, 2021, 2:31am UTC](https://discourse.processing.org/t/how-to-define-custom-planes-in-processing/32918 "2021-10-19T02:31:35Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![SNICKRS](https://avatars.discourse-cdn.com/v4/letter/s/43a26b/32.png) [@SNICKRS](https://discourse.processing.org/u/SNICKRS)
#### Post date: [October 19, 2021, 2:31am UTC](https://discourse.processing.org/t/how-to-define-custom-planes-in-processing/32918/1 "2021-10-19T02:31:35Z")

</div>

I’m trying to recreate a kind of sphereical-planet like world, and when making the sky, I have to define sky and ground planes to change the sky and world colors. Using a PShape to represent the sky works, but it looks like a huge rectangle and doesn’t really look like a sky. How would I go about making a sky plane?

---

<div class="post-metadata">

### Author: ![josephh](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/josephh/32/210_2.png) [@josephh](https://discourse.processing.org/u/josephh)
#### Post date: [October 19, 2021, 10:31pm UTC](https://discourse.processing.org/t/how-to-define-custom-planes-in-processing/32918/2 "2021-10-19T22:31:56Z")

</div>

Hi @SNICKRS,

Are you working in 3D or in 2D?  
Since the rendering process is quite different it will help to answer your question.

Also can you provide a screenshot of what you have for now? Are we seeing the planet from outside or we are on the ground?

---

<div class="post-metadata">

### Author: ![SNICKRS](https://avatars.discourse-cdn.com/v4/letter/s/43a26b/32.png) [@SNICKRS](https://discourse.processing.org/u/SNICKRS)
#### Post date: [October 21, 2021, 11:43pm UTC](https://discourse.processing.org/t/how-to-define-custom-planes-in-processing/32918/3 "2021-10-21T23:43:08Z")

</div>

Hi, sorry for taking so long to reply. I’m working in P3D and you are seeing the world from the ground.

---

<div class="post-metadata">

### Author: ![josephh](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/josephh/32/210_2.png) [@josephh](https://discourse.processing.org/u/josephh)
#### Post date: [October 22, 2021, 8:17pm UTC](https://discourse.processing.org/t/how-to-define-custom-planes-in-processing/32918/4 "2021-10-22T20:17:25Z")

</div>

Ok, if P3D supports transparent pngs as texture planes, you could render individual planes with a cloud texture above the ground but it might be weird with transparency…

For a more complex setup, you might want to look at OpenGL and custom shaders like:

> **[GitHub - shff/opengl\_sky: Pure-shader sky and cloud rendering in OpenGL](https://github.com/shff/opengl_sky)**
>
> Pure-shader sky and cloud rendering in OpenGL. Contribute to shff/opengl\_sky development by creating an account on GitHub.

---

<div class="post-metadata">

### Author: ![SNICKRS](https://avatars.discourse-cdn.com/v4/letter/s/43a26b/32.png) [@SNICKRS](https://discourse.processing.org/u/SNICKRS)
#### Post date: [October 23, 2021, 12:53am UTC](https://discourse.processing.org/t/how-to-define-custom-planes-in-processing/32918/5 "2021-10-23T00:53:11Z")

</div>

Ok, thanks a lot for the suggestions, I’ll check it out

---

<div class="post-metadata">

### Author: ![SNICKRS](https://avatars.discourse-cdn.com/v4/letter/s/43a26b/32.png) [@SNICKRS](https://discourse.processing.org/u/SNICKRS)
#### Post date: [October 23, 2021, 1:00am UTC](https://discourse.processing.org/t/how-to-define-custom-planes-in-processing/32918/6 "2021-10-23T01:00:45Z")

</div>

Yeah, P3D does support transparent pngs for PShape textures. The solution I have so far is to load a clouds texture and render it a bunch of times in the sky. However, I can’t change the sky color, which changes the cloud color. For example, during a day-night transition, I have no way of making the clouds fade away and also no way of making the clouds/sky be a different color than the rest of the world’s background.
