Results 1 to 9 of 9

Thread: 3D Landscape

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

    Smile 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?

    Thank you for your help.

  2. #2
    Join Date
    Dec 2008
    Posts
    25
    Rep Power
    0

    Default

    Are we allowed to bump threads?

  3. #3
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

    Default

    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. #4
    Join Date
    Dec 2008
    Posts
    25
    Rep Power
    0

    Default

    Hi. Fubarable - thanks for your help. I will do as you have suggested - I will change the camera angle and see what happens.

  5. #5
    Join Date
    Dec 2008
    Posts
    25
    Rep Power
    0

    Default

    Unfortunately it looks the same :(

  6. #6
    DarrylBurke's Avatar
    DarrylBurke is offline Forum Police
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,301
    Rep Power
    20

  7. #7
    Join Date
    Dec 2008
    Posts
    25
    Rep Power
    0

    Default

    Please delete this post.

  8. #8
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

    Default

    Quote Originally Posted by quddusaliquddus View Post
    Please delete this post.
    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.

    Thanks for your cooperation.

  9. #9
    joost_m is offline Member
    Join Date
    Apr 2010
    Posts
    8
    Rep Power
    0

    Default

    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.

Similar Threads

  1. Help with a program ro make a landscape picture
    By no s e e d s in forum New To Java
    Replies: 1
    Last Post: 12-16-2009, 12:03 AM
  2. Program to produce a random landscape in Java
    By no s e e d s in forum Java Applets
    Replies: 1
    Last Post: 12-15-2009, 11:56 PM
  3. help with a program to produce a landscape picture
    By no s e e d s in forum New To Java
    Replies: 1
    Last Post: 12-15-2009, 11:55 PM

Posting Permissions

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