# Warning on Shapes3D

**URL:** <https://discourse.processing.org/t/warning-on-shapes3d/9112>\
**Category:** Libraries\
**Created:** [March 8, 2019, 1:20pm UTC](https://discourse.processing.org/t/warning-on-shapes3d/9112 "2019-03-08T13:20:07Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![spiderdab](https://avatars.discourse-cdn.com/v4/letter/s/49beb7/32.png) [@spiderdab](https://discourse.processing.org/u/spiderdab)\
**Post date:** [March 8, 2019, 1:20pm UTC](https://discourse.processing.org/t/warning-on-shapes3d/9112/1 "2019-03-08T13:20:07Z")

</div>

Hi, I’m trying to use Shapes3D library from Quark to use the pick function, but in the example, on the first click this warning is shown:

> smooth() can only be used before beginDraw()

and no pick is performed.  
is it a known/important issue?

Shape3D v.2.2  
Processing v.3.5.3

---

<div class="post-metadata">

**Author:** ![kll](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/kll/32/964_2.png) [@kll](https://discourse.processing.org/u/kll)\
**Post date:** [March 8, 2019, 2:06pm UTC](https://discourse.processing.org/t/warning-on-shapes3d/9112/2 "2019-03-08T14:06:50Z")

</div>

hi spiderdab,  
i try it and also see the smooth warning,  
but the cube pick ( in form of a random color change / see code )  
works here, using example Shapes 3D / S3D4P\_Picking

> win 7 64b / processing 3.5.3 JAVA mode / library Sape3D v.2.2

 ![SNAG-0002](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/4/47cf9e044ff752acacd10a54dac1f2051dd63d3f.jpeg)

---

<div class="post-metadata">

**Author:** ![spiderdab](https://avatars.discourse-cdn.com/v4/letter/s/49beb7/32.png) [@spiderdab](https://discourse.processing.org/u/spiderdab)\
**Post date:** [March 8, 2019, 8:51pm UTC](https://discourse.processing.org/t/warning-on-shapes3d/9112/3 "2019-03-08T20:51:46Z")

</div>

Ok, but can you confirm that the very first click doesn’t select anything?

---

<div class="post-metadata">

**Author:** ![kll](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/kll/32/964_2.png) [@kll](https://discourse.processing.org/u/kll)\
**Post date:** [March 8, 2019, 9:09pm UTC](https://discourse.processing.org/t/warning-on-shapes3d/9112/4 "2019-03-08T21:09:03Z")

</div>

ok, seems so, first click ( where ever ) displays that warning  
and if the click was on an object the color change does not work,  
second time ok…  
but if you read

> [@Toothpaste with Shapes3D](https://discourse.processing.org/t/toothpaste-with-shapes3d/8273):
>
> I have been working on V3 Shapes3D. This is a complete replacement for earlier versions and is being rebuilt from the ground up. As part of the testing I have been creating new examples because it helps show weaknesses in the API, anyway this video shows one such example. Hope you enjoy. All the objects in this video were created with Shapes3D, there is 1 box - for the table top 4 tubes - for the main body, small nozzle and screw on cap of the toothpaste container. Also the actual toothpast…

you know you just have to wait for the new v3.  
but then help with testing will be needed…

---

<div class="post-metadata">

**Author:** ![quark](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/quark/32/26_2.png) [@quark](https://discourse.processing.org/u/quark)\
**Post date:** [March 9, 2019, 9:53am UTC](https://discourse.processing.org/t/warning-on-shapes3d/9112/5 "2019-03-09T09:53:05Z")

</div>

I knew about the first click problem but to be honest I never found out why it happened. 🤔

The smooth warning is issued by Processing and I will have to double check I fixed that for the new version. At the moment simply ignore it.

Shapes3D V3 is well advanced and I am updating my website with new guides so please have a look and let me know what you think. The shape picking has been improved, it is more accurate, no longer misses the first click and informs the user which part of the shape has been clicked. So for a Box not only will you know it has been clicked but which face you clicked on. 😸

Both V2 and V3 use a colour picking algorithm for shape selection. It creates an offscreen buffer on first use so there is a slight millisecond delay on first click. This is called _lazy instantiation_ since the buffer is only created if needed.

---

<div class="post-metadata">

**Author:** ![jeremydouglass](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jeremydouglass/32/20_2.png) [@jeremydouglass](https://discourse.processing.org/u/jeremydouglass)\
**Post date:** [March 11, 2019, 3:10am UTC](https://discourse.processing.org/t/warning-on-shapes3d/9112/6 "2019-03-11T03:10:22Z")

</div>

> [@quark](#):
>
> for a Box not only will you know it has been clicked but which face you clicked on.

🎉 🥳
