1. Member
Join Date
Dec 2008
Posts
25
Rep Power
0

## 3D Landscape

Hi :),
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?

2. Member
Join Date
Dec 2008
Posts
25
Rep Power
0
Are we allowed to bump threads?

3. 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?

4. Member
Join Date
Dec 2008
Posts
25
Rep Power
0
Hi. Fubarable - thanks for your help. I will do as you have suggested - I will change the camera angle and see what happens.

5. Member
Join Date
Dec 2008
Posts
25
Rep Power
0
Unfortunately it looks the same :(

6. Member
Join Date
Dec 2008
Posts
25
Rep Power
0

7. Originally Posted by quddusaliquddus
Why? We all may learn something from your efforts. If you get a solution to your problem, please post it here.

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.

8. Member
Join Date
Apr 2010
Posts
8
Rep Power
0
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.

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•