Recent

Author Topic: Perlin Map 3D  (Read 1201 times)

Dzandaa

  • Hero Member
  • *****
  • Posts: 520
  • From C# to Lazarus
Perlin Map 3D
« on: January 21, 2026, 05:04:21 pm »
Hi everybody,

Here is a 3D version of my Perlin Map With BGRABitmap and OpenGl.


B->

Regards,
Dzandaa

Boleeman

  • Hero Member
  • *****
  • Posts: 1103
Re: Perlin Map 3D
« Reply #1 on: January 22, 2026, 12:04:05 am »
DZandaa, this 3D version is amazing.

I like how you can flip it over and explore the other side.

A real masterpiece.

Dzandaa

  • Hero Member
  • *****
  • Posts: 520
  • From C# to Lazarus
Re: Perlin Map 3D
« Reply #2 on: January 22, 2026, 11:03:20 am »
Hi,

Thank you Eddie,

An amelioration would be a reflective plane with water patterns at the sea level.

B->
Regards,
Dzandaa

dergen

  • New member
  • *
  • Posts: 9
Re: Perlin Map 3D
« Reply #3 on: January 22, 2026, 02:20:25 pm »
Excellent !

 :D

Boleeman

  • Hero Member
  • *****
  • Posts: 1103
Re: Perlin Map 3D
« Reply #4 on: January 22, 2026, 05:47:15 pm »
Hey DZandaa,

Not sure if you could add this feature but it would be nice to have a rotation control of the plane.

I could flip the plane easily but found it difficult to rotate
(could it be done with a slider or somehow modify mouse behavior?)

Boleeman

  • Hero Member
  • *****
  • Posts: 1103
Re: Perlin Map 3D
« Reply #5 on: January 24, 2026, 01:21:25 am »
Found an interesting read:


Making maps with noise functions
https://www.redblobgames.com/maps/terrain-from-noise/


Also a CSharp Planet renderer using simplex noise displacement on a tesselated icosahedron
https://github.com/JcBernack/simplex-sphere
« Last Edit: January 24, 2026, 06:55:59 am by Boleeman »

Okoba

  • Hero Member
  • *****
  • Posts: 648
Re: Perlin Map 3D
« Reply #6 on: January 24, 2026, 10:13:15 am »
That is cool. You should show this to @circular.

Dzandaa

  • Hero Member
  • *****
  • Posts: 520
  • From C# to Lazarus
Re: Perlin Map 3D
« Reply #7 on: January 24, 2026, 12:30:41 pm »
Hi Eddie,

There is a version with Sliders.

Have a nice day.

B->
Regards,
Dzandaa

DomingoGP

  • Full Member
  • ***
  • Posts: 113
Re: Perlin Map 3D
« Reply #8 on: January 24, 2026, 12:51:21 pm »
Hi all, I have been  playing a little with Your demo and added an arcBall to handle rotations
dragging the mouse.

PS: I don't  have tested Your last version.

Regards
Domingo.
« Last Edit: January 24, 2026, 01:12:23 pm by DomingoGP »

Boleeman

  • Hero Member
  • *****
  • Posts: 1103
Re: Perlin Map 3D
« Reply #9 on: January 24, 2026, 02:38:54 pm »
Thank you DZandaa for adding the sliders. Also zooming in with the mouse wheel shows heaps of detail. I maximized the form size while doing the zoom (looks like DZandaa adjusted the TMemo placement when maximizing the form). Ah, DZandaa added a picture of the ArcBall near exit button (just swa it now in the update from Reply #11).

Also thanks DomingoGP for adding the rotation and RIGHT click/drag
(Ah so you don't see the arc ball but you get full movement, scaling and rotation, nice, in some other programs the arc ball pops up when rotating but its probably better not seeing one as it gives full view of the graphics).


Love how you can also zoom in and out. DZaanda the program is excellent. Also with DomingoGP's addition we also have good movement.

Many thanks to both for the nice additions. Love seeing 3D graphics.

« Last Edit: January 24, 2026, 10:52:20 pm by Boleeman »

DomingoGP

  • Full Member
  • ***
  • Posts: 113
Re: Perlin Map 3D
« Reply #10 on: January 24, 2026, 06:13:44 pm »
You are welcome  :)
(for some reason I don't see the arc ball but I get full movement, scaling and rotation).
There is nothing to see here, the arcball only processes the mouse activity to rotate the scene, it is not a visual component.


Dzandaa

  • Hero Member
  • *****
  • Posts: 520
  • From C# to Lazarus
Re: Perlin Map 3D
« Reply #11 on: January 24, 2026, 06:20:38 pm »
Hi,

Thank you Domingo

Here is a version with the arcball and some cleaning.

B->
Regards,
Dzandaa

Lulu

  • Sr. Member
  • ****
  • Posts: 395
Re: Perlin Map 3D
« Reply #12 on: January 24, 2026, 07:45:16 pm »
Very nice demo, thanks for all you three  :)
wishing you a nice life!
GitHub repositories https://github.com/Lulu04

circular

  • Hero Member
  • *****
  • Posts: 4467
    • Personal webpage
Re: Perlin Map 3D
« Reply #13 on: February 02, 2026, 08:09:55 am »
That's very beautiful indeed. Thanks for sharing!

Dzandaa, you mentionned you wished to add an island in the middle. You can do that by drawing a radial gradient on the elevation map:

Code: Delphi  [Select][+][-]
  1. uses BGRAGradientScanner;
  2. ...
  3. procedure TTerrainPerlinForm.DrawPerlin();
  4. var
  5.   ...
  6.   grad: TBGRAMultiGradient;
  7. begin
  8. ...
  9.   grad := TBGRAMultiGradient.Create([BGRA(255,255,255,128), BGRA(1,1,1,192), BGRAPixelTransparent], grPad);
  10.   PictureElev.GradientFill(0, 0, MapSize, MapSize, grad, gtRadial,
  11.     PointF(MapSize/2+0.5, MapSize/2+0.5), PointF(MapSize/6+0.5, MapSize/2+0.5), dmLinearBlend);
  12.   grad.Free;
  13. end;
  14.  

Warm regards
Conscience is the debugger of the mind

 

TinyPortal © 2005-2018