# 3D Perlin noise in Processing

**URL:** <https://discourse.processing.org/t/3d-perlin-noise-in-processing/37770>\
**Category:** Coding Questions\
**Created:** [June 30, 2022, 6:05pm UTC](https://discourse.processing.org/t/3d-perlin-noise-in-processing/37770 "2022-06-30T18:05:32Z")\
**Posts on this page:** 11\
**Page:** 2

<div class="post-metadata">

**Author:** ![asymmetric](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/asymmetric/32/16577_2.png) [@asymmetric](https://discourse.processing.org/u/asymmetric)\
**Post date:** [July 3, 2022, 7:52am UTC](https://discourse.processing.org/t/3d-perlin-noise-in-processing/37770/22 "2022-07-03T07:52:05Z")

</div>

That’s so exciting!! Thank you again!! 🙏🙏🙏🙏

---

<div class="post-metadata">

**Author:** ![asymmetric](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/asymmetric/32/16577_2.png) [@asymmetric](https://discourse.processing.org/u/asymmetric)\
**Post date:** [July 3, 2022, 9:01pm UTC](https://discourse.processing.org/t/3d-perlin-noise-in-processing/37770/23 "2022-07-03T21:01:03Z")

</div>

If anyone is interested, I found the second code in this thread via Tim Rodenbröker!

[Rasterize 3d image - Tim Rodenbröker](https://timrodenbroeker.de/rasterize3d/)

---

<div class="post-metadata">

**Author:** ![jafal](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jafal/32/19112_2.png) [@jafal](https://discourse.processing.org/u/jafal)\
**Post date:** [July 4, 2022, 11:02am UTC](https://discourse.processing.org/t/3d-perlin-noise-in-processing/37770/24 "2022-07-04T11:02:12Z")

</div>

@asymmetric  
Hi  
You can find the same here and much more stuff to learn in to easy explanation

[https://funprogramming.org/](https://funprogramming.org/)

---

<div class="post-metadata">

**Author:** ![asymmetric](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/asymmetric/32/16577_2.png) [@asymmetric](https://discourse.processing.org/u/asymmetric)\
**Post date:** [July 4, 2022, 6:35pm UTC](https://discourse.processing.org/t/3d-perlin-noise-in-processing/37770/25 "2022-07-04T18:35:10Z")

</div>

Hi @jafal! Thank you, I’m going to check those tutorials out today!

Hi @mnse ! One more question… is it possible to create a height map/ grid that reacts to a 3D primitive? Like a sphere or a rectangle?

---

<div class="post-metadata">

**Author:** ![mnse](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/mnse/32/16520_2.png) [@mnse](https://discourse.processing.org/u/mnse)\
**Post date:** [July 4, 2022, 6:51pm UTC](https://discourse.processing.org/t/3d-perlin-noise-in-processing/37770/26 "2022-07-04T18:51:43Z")

</div>

Hi @asymmetric,

Don’t know what you mean.  
Do you mean to apply the height informations to a sphere surface, or s.th. like this ?  
Rectangle is 2D not 3D… Guess you mean cube !? 😉

Or something like ie. cloth simulation ?  
 ![20220704_210248](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/3X/d/4/d48f1d3fc9b0d494d8d2a5ac2a7b4b0d9e0c37cb.jpeg)

Cheers  
— mnse

---

<div class="post-metadata">

**Author:** ![jafal](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jafal/32/19112_2.png) [@jafal](https://discourse.processing.org/u/jafal)\
**Post date:** [July 4, 2022, 10:26pm UTC](https://discourse.processing.org/t/3d-perlin-noise-in-processing/37770/27 "2022-07-04T22:26:32Z")

</div>

[![](https://img.youtube.com/vi/gNFpAW4kc5o/hqdefault.jpg "terrain 3d perlinNoise seasons processing") ](https://www.youtube.com/watch?v=gNFpAW4kc5o)

 ![Screenshot_2022-07-05-01-23-40-885](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/3X/1/b/1b2dd2131626d894eb36531509b7b671b5819bf7.jpeg)

---

<div class="post-metadata">

**Author:** ![jafal](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jafal/32/19112_2.png) [@jafal](https://discourse.processing.org/u/jafal)\
**Post date:** [July 5, 2022, 1:46am UTC](https://discourse.processing.org/t/3d-perlin-noise-in-processing/37770/28 "2022-07-05T01:46:31Z")

</div>

> **[GitHub - rogeriobego/terrain\_3d\_perlinNoise: Terrain generator - Processing...](https://github.com/rogeriobego/terrain_3d_perlinNoise)**
>
> Terrain generator - Processing - perlin noise - seasons and water level - GitHub - rogeriobego/terrain\_3d\_perlinNoise: Terrain generator - Processing - perlin noise - seasons and water level

---

<div class="post-metadata">

**Author:** ![asymmetric](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/asymmetric/32/16577_2.png) [@asymmetric](https://discourse.processing.org/u/asymmetric)\
**Post date:** [July 11, 2022, 7:30pm UTC](https://discourse.processing.org/t/3d-perlin-noise-in-processing/37770/29 "2022-07-11T19:30:18Z")

</div>

> [@mnse](#):
>
> phere surface

Hi @jafal! Thank you, I will play around with the terrain code via github that you provided!

Hi @mnse! I meant is it possible to do essentially the same code but with a 3D object? To clarify, can I have an image interact with a mesh object such as a cube? Can I use the heightmap to sculpt the mesh surface of 3D geometry like the following image? Then 3D print the end product?

 ![IMG_1823](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/3X/4/3/43875bc11103efca6d0b32988e855580b7bcdbfa.jpeg)

---

<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:** [July 11, 2022, 10:06pm UTC](https://discourse.processing.org/t/3d-perlin-noise-in-processing/37770/30 "2022-07-11T22:06:40Z")

</div>

> [@asymmetric](#):
>
> Then 3D print the end product?

This topic may be of interest:

> [@Exporting to OBJ](https://discourse.processing.org/t/exporting-to-obj/11051):
>
> I used to use Nervous System to export to OBJ, but it does not work for Processing 3, I even installed Processing 2 and won’t work there either. If there’s no similar library now I’ll try to code it directly in python/blender import nervoussystem.obj.\*; PImage img; boolean record = false; void setup() { size(600,700, P3D); img = loadImage("adventuretime.jpg"); img.loadPixels(); noStroke(); } void draw() { if (record){ beginRecord("nervoussystem.obj.OBJExport", "at.obj"); } …

`:)`

---

<div class="post-metadata">

**Author:** ![mnse](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/mnse/32/16520_2.png) [@mnse](https://discourse.processing.org/u/mnse)\
**Post date:** [July 12, 2022, 2:41pm UTC](https://discourse.processing.org/t/3d-perlin-noise-in-processing/37770/31 "2022-07-12T14:41:04Z")

</div>

As written once before …

> [@mnse](#):
>
> However, you can do whatever you want to do with that height information (There are so many possibilities to play around with it) depending on your imagination. 😉

The exercise now is, with all that examples and suggestions from above, to learn/practise/work out that way your dreams may come true. 🙂

Cheers  
— mnse

---

<div class="post-metadata">

**Author:** ![jb4x](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jb4x/32/789_2.png) [@jb4x](https://discourse.processing.org/u/jb4x)\
**Post date:** [July 12, 2022, 2:43pm UTC](https://discourse.processing.org/t/3d-perlin-noise-in-processing/37770/32 "2022-07-12T14:43:28Z")

</div>

> [@asymmetric](#):
>
> To clarify, can I have an image interact with a mesh object such as a cube?

You can for example, sample a random value (using perlin noise) at each vertex of you 3D shape and then displace it alongside its normal.

[Previous page](https://discourse.processing.org/t/3d-perlin-noise-in-processing/37770.md?page=1)
