Ambiera ForumDiscussions, Help and Support. |
|
|
|||||
|
hello everybody, i am working on a infiniminer clone but there is an issue, how do i use a variable as a x y z, I'm doing it because i want to make "random" terrain but there is little documentation for Perlin noise especially without JS. Thanks! 9095maple |
||||
|
So you don't want to use JS, right? |
||||
|
new object wrote: So you don't want to use JS, right? yeah no js |
||||
|
Hm, without JS you can't use variable for vector. |
||||
|
I'm doing it because i want to make "random" terrain but there is little documentation for Perlin noise especially without JS. So in what format you want noise to be generated, data structure or image? If you require image you can use an external tool like https://github.com/sbrl/noisebox?tab=readme-ov-file and run it using "system" function. There is not much you can do with the image on run time anyway, since it's not possible to generate terrain dynamically. |
||||
|
So in what format you want noise to be generated, data structure or image? If you require image you can use an external tool like https://github.com/sbrl/noisebox?tab=readme-ov-file and run it using "system" function. There is not much you can do with the image on run time anyway, since it's not possible to generate terrain dynamically.[/quote] well i want to incorporate perlin noise into the game so people can get randomly generated worlds. (using blocks) because right now im manually placing blocks |
||||
|
So you got the Perlin noise into the game. How you generate a random world now? What is Perlin noise in your world, is it an image? |
||||
|
wrote: So you got the Perlin noise into the game. How you generate a random world now? What is Perlin noise in your world, is it an image? its supposed to create terrain out of the (randomly generated image) kind of like a heightmap. this is why i didnt use it so i could try to use a variable for each coordinate so i can say random y from 1 to 3 for example. |
||||
|
Perlin noise doesn't create anything. It's simply a greyscale texture, each pixel has value from 0 to 255. Then you use it for terrain generation it gets transformed into the height map. X and y coordinate of pixel become horizontal coordinates, it's value from 0 to 255 defines height. That way you define height map verticies position in 3d space. Then you create edges and faces, and apply textures, shaders and all other stuff you like. Perlin noise is used for such generators simply because all pixel values relate to their neighbours, so heightmap doesn't have extreme height differences and looks smooth. It can't generate cubes for you. It's not magic - you need to read each pixel values, and write a generator which will create the geometry for you. |
||||
|
i researched a bit on it and i think Marching Cubes is what games like infiniminer and minecraft uses. |
|