Python Forum
what should i do after generating the perlin noise value?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
what should i do after generating the perlin noise value?
#1
after generating the 3d perlin noise value(x,y and z respectively(the value is between -1 and 1)),how do i use the generated value to create texture or terrain?

note that i am using opengl.
Reply
#2
Looks like a good place to start:
http://www.redblobgames.com/maps/terrain-from-noise/
Reply
#3
(Jan-21-2017, 06:01 AM)Mekire Wrote: Looks like a good place to start:  
http://www.redblobgames.com/maps/terrain-from-noise/
the website that you gave is not python,but it is ok.

does it teach me to draw the terrain?
i just see the usage of the keyword "return".
does "return"draw the terrain,i thought "return" is for causing your function to exit and hand back a value to its caller?

part of the website you gave:

function biome(e) {
   if (e < 0.76) return WATER;
   else return LAND;
}
Reply
#4
Your post is also not particularly about python. But yes, there is python in the link provided. Either way that site is an amazing resource for game programmers. Try actually reading through it and you will understand a lot more than you did before.

Posts need to show effort and I pointed you in the direction you need to go.
No one is going to provide you with rendering code based on your first post.
Reply
#5
(Jan-21-2017, 06:20 AM)Mekire Wrote: No one is going to provide you with rendering code based on your first post.

can i have the rendering/terrain drawing code?
or some tutorial ?

and,how do i use Whittaker Diagram with perlin noise to generate biomes stuff?
Reply
#6
Okay, well I'm not going to try to do any OpenGL on the fly so this is the best you'll get from me.  Honestly you are getting into a realm where you need to start doing actual research.  Regarding the Whitaker diagrams I am afraid I don't know.

Here is some pygame code that generates some terrain based on noise.  You just draw different terrain tiles based on different noise values.  Requires pygame and opensimplex (installable via pip)
Result:
http://imgur.com/nd5lna0
Code:
Reply
#7
thanks for your help...
actually,i have done many research ,but none of them actually teach me how to draw ,except one video that is made from c++ or c#,which i dont understand.
Reply
#8
If you are getting into openGL and 3d graphics honestly you are going to need to get used to reading other languages.
For instance here is a great tutorial book on openGL, but it is in C++
(linking to a repo of mine where I have a copy as the guy's site went down a few years back)
https://github.com/Mekire/gltut-pygame/b...lsComp.pdf

The http://www.redblobgames.com/ site I previously linked has tons of stuff.
There is also a really nice book on programming patterns specifically for game devs here:
http://gameprogrammingpatterns.com/contents.html

If you refuse to look at a book because it isn't in python you really will miss out on a lot of great information.
In the end programming is all the same (within reason).
Reply
#9
Mekire,I have another question.
what if I want to draw a 3d shape instead of just filling the surface with pygame.surface.fill where I need to specify the coordinate,how would I do that?

Anyone,help please??☺?
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
Photo Locate Noise floor level for a spectral data in Python Ranjan_Pal 1 3,038 Dec-19-2020, 10:04 AM
Last Post: Larz60+
  Modulate brown noise in python pyxel 2 4,727 Mar-28-2018, 08:15 PM
Last Post: pyxel
  creating terrain without noise or seed? hsunteik 3 4,403 Jan-25-2017, 10:27 PM
Last Post: ichabod801
  voronoi vs perlin noise? hsunteik 1 3,967 Jan-22-2017, 04:34 AM
Last Post: micseydel
  how to draw terrain like minecraft in python using opengl with perlin noise value? hsunteik 0 5,501 Jan-21-2017, 11:45 AM
Last Post: hsunteik

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020