# 3D scene without any shading

**URL:** https://discourse.processing.org/t/3d-scene-without-any-shading/45716
**Category:** Coding Questions
**Created:** [February 6, 2025, 12:48pm UTC](https://discourse.processing.org/t/3d-scene-without-any-shading/45716 "2025-02-06T12:48:12Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![qualidat](https://avatars.discourse-cdn.com/v4/letter/q/a587f6/32.png) [@qualidat](https://discourse.processing.org/u/qualidat)
#### Post date: [February 6, 2025, 12:48pm UTC](https://discourse.processing.org/t/3d-scene-without-any-shading/45716/1 "2025-02-06T12:48:12Z")

</div>

Hello, I need the objects in a rotating 3d scene without light and shadow, only with solid “smooth” colors. The idea is to use the touchscreen to select individual objects in the rotating scene, even if they cover each other.

So I let the scene rotate photorealistically with light and shadow on the screen and at the same time the scene without light and shadow in the background.

If I now click in the photorealistic scene, I can use the same coordinates in the flat scene to see which object was just in front … I use the H value from the HSV color space for this.

How do I get the renderign without light and shadow?

---

<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: [February 7, 2025, 4:53am UTC](https://discourse.processing.org/t/3d-scene-without-any-shading/45716/2 "2025-02-07T04:53:47Z")

</div>

You can draw on a PGraphics pg and say pg.noLights();

The PGraphics must have the same size as your canvas.

Then you can perform checks on the canvas.

You can then draw objects (in the rotating 3d scene) with different unique colors and get() the colors from pg which would identify the single objects.

Use

`color clickedObj = pg.get(mouseX,mouseY);`

cf. [Looking for more resources about ArrayLists - #45 by Chrisir](https://discourse.processing.org/t/looking-for-more-resources-about-arraylists/21025/45)

---

<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: [February 9, 2025, 1:58pm UTC](https://discourse.processing.org/t/3d-scene-without-any-shading/45716/3 "2025-02-09T13:58:43Z")

</div>

> [@qualidat](#):
>
> How do I get the renderign without light and shadow?

Take a look here for some options:

- [Tutorials / Processing.org](https://processing.org/tutorials)
- [Render Techniques / Processing.org](https://processing.org/tutorials/rendering)
- [PGraphics / Reference / Processing.org](https://processing.org/reference/PGraphics.html)
- [Images and Pixels / Processing.org](https://processing.org/tutorials/pixels)

A related topic:

> [@Picking library failing on many spheres](https://discourse.processing.org/t/picking-library-failing-on-many-spheres/45202):
>
> Hello, I’m relatively new to Processing. I’m trying to use the Picking library (installed directly through the Processing app) to have a bunch of spheres be clickable. However, Picking seems to not work well with many spheres and I can’t figure out why. Here’s a snippet demonstrating my issue: import picking.\*; int size = 40; int n = 6; Picker picker; void setup() { size(800,800,P3D); picker = new Picker(this); } void draw() { background(127); lights(); translate(size\*2,size\*2,0); …

The last topic discusses a variety of approaches!  
Don’t let it complicate your world and work on a solution you can understand from the ground up.

`:)`
