Page 1 of 2 12 LastLast
Results 1 to 10 of 11
  1. #1
    Join Date
    Dec 2006
    Location
    Colorado
    Posts
    8

    Lee's Terrain R&D Session (Smoothing Issues)

    Good Evening,

    I have been at these beginner videos for the last two weeks or so, and I have come into the issue of trying to get the smoothing done correctly. The terrain looks quite blocky, and I periodically go back on the videos to check what the difference between the videos code and my code is. I have found no differences; contrariwise, the terrain looks like either my "rendered" clouds in Photoshop are not working very well. Please see attached.

    Attached: Click image for larger version. 

Name:	terrain.jpg 
Views:	221 
Size:	170.5 KB 
ID:	72651

    Click image for larger version. 

Name:	terrain_code1.png 
Views:	193 
Size:	178.3 KB 
ID:	72652

    Click image for larger version. 

Name:	terrain_code2.png 
Views:	147 
Size:	172.5 KB 
ID:	72653

    Click image for larger version. 

Name:	terrain_code3.png 
Views:	153 
Size:	152.2 KB 
ID:	72654

    Click image for larger version. 

Name:	terrain_code4.png 
Views:	145 
Size:	125.6 KB 
ID:	72655

    Any help will be wicked awesome. Thank you.

    Respectfully,
    Stackout
    USMC Afghanistan Vet - Persian-Farsi Linguist

  2. #2
    Join Date
    Nov 2010
    Location
    Hamburg, Germany
    Posts
    111
    According to the first picture your scales are pretty much off, for starters play with them for a bit... range them between 0.01 and 100 by steps of 10 and play each time to see the impact of your noise maps.

    The second thing I can see is that you did not include the adaptiveIteration to your loop of iterations (Lee mentioned it at one point I believe), but this shouldn't have a big impact anyways.

    Regarding the rest of the code make sure you followed lee exactly but keep in mind that your map differs and you should for those constants of yours use a map that has a 2048x2048 resolution... in any case play with the constants that should do the trick

    Hope this helps

  3. #3
    Join Date
    Apr 2012
    Location
    Oceanside, CA
    Posts
    63
    Sorry for the delayed response, but I just passed this point in chapter 1. This isn't a smoothing issue. On the videos, he fixed the blockiness before getting into smoothing, so you may want to step back a couple videos. But I think Bhseph is right on the money, I think it's a scaling issue.

  4. #4
    Join Date
    Sep 2011
    Posts
    2
    hi did you find a fix to this as iv now got the same problem

  5. #5
    Join Date
    Jan 2013
    Posts
    21
    my code is identical and yet looks all kinds of screwed up when running the scene as well

  6. #6
    Join Date
    Jan 2013
    Posts
    21
    Upon further testing i have figured out(through ending up at the minimap video) That my Scaling is WAY off thus i am getting the incorrect height information per patch, now this is interesting because my code is identical to lee's in all files... Does anyone have a copy of correctly working R&D Session two code that i can compare mine to? Also I am using VS 2k12 if that matters and unity 3.5.6.

    My world is scaled down so far that i can run from the Britain to the isle of man in under 2 seconds... any ideas???

  7. #7
    Join Date
    Nov 2010
    Location
    Hamburg, Germany
    Posts
    111
    for your scaling to actually match what Lee did you would most likely require identical resources. I would suggest again that you spend some time playing with your s1..s6 and w1...w4 values (as Lee at one point stated, this is a vary very long trial and error process).

    In my case it took me about 5 hours to get the numbers for my resources (noise maps + height map).

  8. #8
    Join Date
    Nov 2010
    Location
    Hamburg, Germany
    Posts
    111
    Also, regarding the size issue. You might have a huge character or just some sizes initially adjusted wrong. Check your patch sizes with everything applied against your speed of movement... there might be a bug at the beginning of your initial patch creation.

  9. #9
    Join Date
    Jan 2013
    Posts
    21
    actually what ive found is that the math for the following code
    Code:
    var b1 = h1 * w1 + h2 * (1 - w1);
    var b2 = b1 * w2 + h3 * (1 - w2);
    var b3 = b2 * w3 + h4 * (1 - w3);
    var b4 = h5 * w4 + b3 * (1 - w4);
    what i changed it to:
    Code:
    var b1 = Utils.Lerp(h1, h2, w1);
                var b2 = Utils.Lerp(b1, h3, w2);
                var b3 = Utils.Lerp(b2, h4, w3);
                var b4 = Utils.Lerp(h5, b3, w4);
    Does not work for me at all for some reason. I had to instead use the lerp function and that gets much much better results however it does not look like theirs either but atleast it looks like a terrain and is properly sized. Smoothing however doesnt seem to work barely at all there isnt any change whether i use 2 or 20 iterations... still working on that one

  10. #10
    Join Date
    Jan 2013
    Posts
    21
    Also I am using the identical assets available for the R&D Classes hence my confusion

Page 1 of 2 12 LastLast

Posting Permissions

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