Results 1 to 10 of 10

Thread: for math experts who can explain in plain english

  1. #1
    thinBasic MVPs kryton9's Avatar
    Join Date
    Nov 2006
    Location
    Naples, Florida & Duluth, Georgia
    Age
    67
    Posts
    3,869
    Rep Power
    404

    for math experts who can explain in plain english

    I've been on a quest to develop everything procedurally. Now that I have learned how to use 3d modelers and paint programs, I want to challenge myself even more.

    Anyways... I have been reading up on Perlin Noise and in a couple of places I have read that if you generate images in the power of 2, for instance-- 512 x 512, that Perlin Noise automatically becomes perfectly tile-able, but not so in non squared formats.

    I don't so see why this is so, can anyone explain it in an easy to understand manner?
    Acer Notebook: Win 10 Home 64 Bit, Core i7-4702MQ @ 2.2Ghz, 12 GB RAM, nVidia GTX 760M and Intel HD 4600
    Raspberry Pi 3: Raspbian OS use for Home Samba Server and Test HTTP Server

  2. #2
    thinBasic MVPs danbaron's Avatar
    Join Date
    Jan 2010
    Location
    California
    Posts
    1,378
    Rep Power
    152

    Re: for math experts who can explain in plain english

    [font=courier new][size=8pt]I looked at it a little, here.

    http://www.programmersheaven.com/2/perlin

    For 2D, it talks about a point, and its four neighbors. Using the analogy of a chessboard, I guess that an interior black square's four neighbors, would be the four red squares adjacent to it.

    As far as I know, an area is perfectly tileable for a particular pattern, if the entire area can be covered, just by repeating the pattern. But, in that case, any m x n area, is perfectly tileable using the chessboard pattern, not only areas of the form, 2n x 2n.

    (I already looked at your Ken Perlin link (just below). I didn't see anything about, "perfectly tileable". But, maybe I didn't look closely enough.)
    ||
    ||
    \/

    The relevant concepts, "Perlin Noise", "perfectly tileable", are not clear enough in my head, for me to say anything that might be helpful.

    "You can't cheat an honest man. Never give a sucker an even break, or smarten up a chump." - W.C.Fields

  3. #3
    thinBasic MVPs kryton9's Avatar
    Join Date
    Nov 2006
    Location
    Naples, Florida & Duluth, Georgia
    Age
    67
    Posts
    3,869
    Rep Power
    404

    Re: for math experts who can explain in plain english

    Sorry Dan I should have put these links in:
    http://www.noisemachine.com/talk1/2.html this is Ken Perlin's site where he explains it. Use the arrows at the top left of the page to move from page to page.
    Acer Notebook: Win 10 Home 64 Bit, Core i7-4702MQ @ 2.2Ghz, 12 GB RAM, nVidia GTX 760M and Intel HD 4600
    Raspberry Pi 3: Raspbian OS use for Home Samba Server and Test HTTP Server

  4. #4
    thinBasic MVPs danbaron's Avatar
    Join Date
    Jan 2010
    Location
    California
    Posts
    1,378
    Rep Power
    152

    Re: for math experts who can explain in plain english

    [font=courier new][size=8pt]I revised my previous post, above, to address your last post.

    Dan
    "You can't cheat an honest man. Never give a sucker an even break, or smarten up a chump." - W.C.Fields

  5. #5

    Re: for math experts who can explain in plain english

    Tiling:

    For tile-ability, the pattern at each pair of edges (top and bottom, left and right) must have matching patterns.

    As the number of tiles increase, the grid structure would begin to become visible.

    But this can be resolved by randomising the vertices of the grid slightly to make the shape of each tile different.

    Since the pattern is `stretched` over each tile in the grid, the pattern matching at the edges is conserved.

    Have I got this right?

    Charles


  6. #6
    thinBasic MVPs danbaron's Avatar
    Join Date
    Jan 2010
    Location
    California
    Posts
    1,378
    Rep Power
    152

    Re: for math experts who can explain in plain english

    [font=courier new][size=8pt]I'm ignorant, Charles. But, I think I might see what you are saying (maybe not), --> there cannot be any interior, "seams".

    I do know, that, when I was a boy, I would sit on the toilet in the bathroom, staring at the tiles on the floor. If I tried to stare at the entire floor at once, instead of focusing on an individual area, then, after a few seconds, the image of the floor would seem to rise about a foot into the air. I don't know why. But, it was fun to do.

    Anyway, here is more.

    http://en.wikipedia.org/wiki/Penrose_tiling


    Dan
    "You can't cheat an honest man. Never give a sucker an even break, or smarten up a chump." - W.C.Fields

  7. #7
    thinBasic MVPs kryton9's Avatar
    Join Date
    Nov 2006
    Location
    Naples, Florida & Duluth, Georgia
    Age
    67
    Posts
    3,869
    Rep Power
    404

    Re: for math experts who can explain in plain english

    I understand and know how to make textures tile-able manually. I just didn't understand how the noise function automatically is tile-able on powers of 2 image sizes. Being random noise-- why it works out mathematically to be so on images of those dimensions? That is the mystery

    http://www.devmag.org.za/articles/48...-YOUR-GAMES/4/
    Acer Notebook: Win 10 Home 64 Bit, Core i7-4702MQ @ 2.2Ghz, 12 GB RAM, nVidia GTX 760M and Intel HD 4600
    Raspberry Pi 3: Raspbian OS use for Home Samba Server and Test HTTP Server

  8. #8

    Re: for math experts who can explain in plain english


    It's because the data is deterministic and only appears to be random. For any given starting value you will always end up with the same pattern.

    But I am sure there are also some clever symmetry tweaks to get the edges matching.

    Charles

  9. #9

    Re: for math experts who can explain in plain english

    my english is bad
    but i try it

    if you use a power of 2 arrays the mask (value-1) all bits are allways 1

    xtil = x and (power_of_2-1) ' 128-1 = 127 (111_1111) ,64-1 = 63 (11_1111) ...

    now with a mask value not power of 2 (some bits are 0)

    x_not_til = x and (not_power_of_2-1) ' 123-1 = 122 (111_1010) , 62-1 = 61 (11_1101)

    you can replace AND with MOD (%) it will work if the mask is a power of 2 (but not in the other case)

    Joshy
    (Sorry about my bad English.)

  10. #10
    thinBasic MVPs kryton9's Avatar
    Join Date
    Nov 2006
    Location
    Naples, Florida & Duluth, Georgia
    Age
    67
    Posts
    3,869
    Rep Power
    404

    Re: for math experts who can explain in plain english

    Thanks Joshy, that is really neat. Is the mask (the value -1), is that just something that is always there in bit operations?

    I will do some reading now to see what I find out, I want to really understand this stuff as I work on my own engine.
    Acer Notebook: Win 10 Home 64 Bit, Core i7-4702MQ @ 2.2Ghz, 12 GB RAM, nVidia GTX 760M and Intel HD 4600
    Raspberry Pi 3: Raspbian OS use for Home Samba Server and Test HTTP Server

Similar Threads

  1. Math subforum
    By ErosOlmi in forum Math: all about
    Replies: 0
    Last Post: 24-01-2009, 14:13
  2. 2D game math
    By kryton9 in forum Gaming
    Replies: 4
    Last Post: 29-04-2008, 21:59

Members who have read this thread: 0

There are no members to list at the moment.

Posting Permissions

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