I am trying to implement the code here:
3D Graphic Java: Render fractal landscapes - JavaWorld
in another language.
Ive set the initial roughness = 0.95 and initial LOD = 10
At each level of the diamond-square algorithm the roughness is recalculated to rough=rough*roughness
But the result looks nothing like a landscape. It has little pertubations throughout but no macroscopic features.
Zoomed out image:
How can I fix it so that the code creates landscapes with hills and plataus?
Thank you for your help.
Are we allowed to bump threads?
Your question is of a somewhat specialized nature, and you may not get an answer from someone who is familiar with the library that you are using. Your image however suggests to me that there are in fact hills and such present but perhaps not visible as we may be looking straight down at this landscape. Can you change the amplitude of things or angle of view?
Hi. Fubarable - thanks for your help. I will do as you have suggested - I will change the camera angle and see what happens.
Unfortunately it looks the same :(
Why? We all may learn something from your efforts. If you get a solution to your problem, please post it here.
Originally Posted by quddusaliquddus
Cross-posts are not "disallowed", but proper etiquette suggests that you give links to all crossposts in all crossposts so folks can avoid duplication of effort.
Thanks for your cooperation.
maybe you can do something with a sine? I'm very new to java programming, but I can think of some mathematic stuff.
if you make some sort of map, with the delta height (the difference height between one point and one other) a sine with period equal to the offset from the edge, you just get some regular sine functions in 3D. Then try putting another sine function on top of that that has a smaller period, which will generate smaller fluctuations in the height. Maybe you can then just add that to the random land generator you have right now you get some hills. (the random generator is needed to make sure it's not too smooth)
another approach is this: make the delta height per point dependent on a variable a, which you increase/decrease by a random. make sure the random is significantly (dependent on how large the map is, just try some settings) smaller than variable a, so the hills get smoother, not too wrinkly.