Home Technical Talk

Tileable pattern generator - 3ds Max

polycounter lvl 4
Offline / Send Message
ChristopheS polycounter lvl 4
Hi everyone!

I made a tileable pattern generator with maxscript which can be used to create a base for creating textures.
The script will soon be available on Gumroad!

Feel free to leave your thoughts in the comment section below, cheers! :awesome:



Artstation: https://www.artstation.com/artwork/dGr53

Replies

  • LaurentiuN
    Offline / Send Message
    LaurentiuN interpolator
    This looks great man, great job. Let us know when its on Gumroad:>
  • Kbrom12
    Offline / Send Message
    Kbrom12 polycounter lvl 8
    Ya this looks great, not even 10 seconds in and I already want it.
  • ChristopheS
    Offline / Send Message
    ChristopheS polycounter lvl 4
    Thank you! :awesome: I'll make a post here as soon as it's on gumroad! ^^
  • Eric Chadwick
    That's neat!

    I wonder if you could add some more controls for the tile patterns. For example, the Tiles map type has a few different brick bonds as presets, worth checking out.

    I was looking at your tool and thinking about a recent project where I needed a stone tile pattern to match a client's photo, which looked like "Fine Running" in the Tiles preset, but with more larger tiles. I can only get that with the Tiles map if I use its Advanced Settings. Anyhow something to think about.
  • cptSwing
    Offline / Send Message
    cptSwing polycounter lvl 11
    Only had the time earlier to check out the first half minute or so - does it allow you to define custom patterns?
  • danncaste
    Offline / Send Message
    danncaste polycounter lvl 5
    Hey Chris nice scrpt.. im surely go for it!, i just have the same question as CptSwing
  • musashidan
    Offline / Send Message
    musashidan high dynamic range
    danncaste said:
    Hey Chris nice scrpt.. im surely go for it!, i just have the same question as CptSwing

    I also have that question. :) Great tool. Looking forward to trying it.
  • TooLzor
    Offline / Send Message
    TooLzor polycounter lvl 10
    Great start bud! Always good to see stuff doing out of DAE :D
  • Port-Seven
    Offline / Send Message
    Port-Seven polycounter lvl 7
    Looks fantastic :)
  • ChristopheS
    Offline / Send Message
    ChristopheS polycounter lvl 4
    Thanks everyone! :awesome:
    Since I made this for my scripting retake, I was kinda limited by time so I only added a few well known patterns in the list. The amount of patterns that can be added is pretty much unlimited, I only need to calculate how the boxes should be placed. I wanted to add a few more common patterns (ex. herringbone, wooden planks,...) before releasing this tool.
    Using custom patterns right now is not possible, but that's something I can definitely look into later on! ^^
    If there are any other suggestions, feel free to shoot them! :awesome:

  • Danielmn
    Offline / Send Message
    Danielmn polycounter lvl 13
    What does the Small, med, big, selector,  does this make a large tiling area.
  • ChristopheS
    Offline / Send Message
    ChristopheS polycounter lvl 4
    Danielmn said:
    What does the Small, med, big, selector,  does this make a large tiling area.
    Yes, if you select big and press generate/regenerate, you'll get a bigger pattern.
    Small is a 240x240 area, medium 320x320 and big is 400x400. :)
  • Maddog4america
    Offline / Send Message
    Maddog4america polycounter lvl 5
    Will this be released for Maya?  Please let it be.
  • ChristopheS
    Offline / Send Message
    ChristopheS polycounter lvl 4
    Will this be released for Maya?  Please let it be.

    I'm sorry but it won't... :(
    I'm not used to python so this will only be available in 3ds Max.
  • Mant1k0re
    Offline / Send Message
    Mant1k0re polycounter lvl 8
    Brilliant! Sub'ed and awaiting GR release.
  • Odow
    Offline / Send Message
    Odow polycounter lvl 8
    Maya please é_è *sad puppy eyes*
  • ChristopheS
    Offline / Send Message
    ChristopheS polycounter lvl 4
    Hi everyone! :smile: 

    First of all, my apologies for the huge delay of this script, but I was kinda busy the past few months with finding a job and some other personal work...
    Past few days I've finally found the time to start finishing this! :smiley: 

    So, what changed?

    I added a few more complex patterns to choose from. From top to bottom:

    - Diamond tiles
    - Herringbone tiles 2:1 90 degrees
    - Herringbone tiles 2:1 45 degrees
    - Herringbone tiles 3:1 90 degrees
    - Herringbone tiles 3:1 45 degrees






    So, right now there are 11 different patterns to choose from. 
    Apart from this update I've got one question. Do you guys think the current difference between small, medium and big is too much?

    Small is 240x240, medium 480x480 and big 720x720.



    That's it for now, keep you guys up to date as much as possible! :smiley:

    Cheers!
  • Mant1k0re
    Offline / Send Message
    Mant1k0re polycounter lvl 8
    YAY!

    I don't see any issue with your small/medium/large settings. 

    Are you still going to put it up on GR?
  • Kanni3d
    Offline / Send Message
    Kanni3d ngon master
    Great work!

    Small might have a couple of larger elements that wouldn't conclude it being small, but medium and large look just right. 
  • Eric Chadwick
    Why not powers of two for the sizes? 256, 512, 1024.
  • ChristopheS
    Offline / Send Message
    ChristopheS polycounter lvl 4
    Mant1k0re said:
    YAY!

    I don't see any issue with your small/medium/large settings. 

    Are you still going to put it up on GR?
    Yes, I still going to put it on GR ^^

    Kanni3d said:
    Great work!

    Small might have a couple of larger elements that wouldn't conclude it being small, but medium and large look just right. 
    Yeah, the sizes of the boxes always stays the same, only the area in which they are generated is changed. Maybe I could reduce the amount of large stones in the small area.
    Why not powers of two for the sizes? 256, 512, 1024.
    Well, erm, I never really thought about this when starting this script. I made boxes with sizes of 20,40 and 80 and that's why I made it 240,480 and 720, since it's a multiple of 80. Since then I didn't really changed this anymore... I could try doing 256/512/1024 and having boxes of size 64x64, 32x32, 32x16,... I completely forgot this, gonna give it a try! :smiley:
  • snoops3d
    Offline / Send Message
    snoops3d polycounter lvl 12
    This looks great!,  though I totally agree with Eric,  would be great to have power of 2 for game purposes :) 
  • ChristopheS
    Offline / Send Message
    ChristopheS polycounter lvl 4
    Oke, I tried changing it to 256/512/1024 and the sizes of the boxes to 16/32/64. It works for all the patterns except the 3:1 herringbone ones. Since the length is 3 times the width, they are 48 by 16. If you divide 256 or 512 or 1024 by 48 it'll give a result with .333 or .666 which will make it impossible to make it tileable... So I can either change the size for these patterns, which brings us back to the beginning -> no power of 2, or I can change the size of the boxes  since it doesn't really matter that much (compared to the overall size) if they are a power of 2 or not.

    With the size being 240/480/720 the 3:1 was 60x20 and 240/480/720 divided by 60 is 4/8/12 which didn't result in an issue.

    What do you suggest? I guess just changing the size for the boxes in these patterns will be the best solution? The overall size will still be 256/512/1024 but filled with other sizes. 

    But is it really a problem if the size is not a power of 2? If you're going to bake textures you can just select 512/1024/2048/... in the software that you're using. Or am I wrong here?

    Cheers! :smiley:
  • ChristopheS
    Offline / Send Message
    ChristopheS polycounter lvl 4
    So, I kept the sizes 256/512/1024 like suggested and changed the sizes of the boxes. For the 3:1 herringbone 90 the size is 64x21.3 instead of 48x16 and for the 3:1 herringbone 45 the size is 90.51*30.17 (calculated with diagonals because they have a different rotation.






    I only tought they where a little bit too big compared to the 2:1 herringbones but halving the sizes results in too much stones for the small area imo, so I'll stay with the big ones and maybe make the normal 2:1 herringbones a little bigger.


    I also have an option to generate the area as a plane so you could maybe use it to bake textures or something else. Seems usefull to me :D


    Cheers!


  • ChristopheS
    Offline / Send Message
    ChristopheS polycounter lvl 4
    I've added a new pattern that looked cool to me :smiley:


  • BoueeDeSecours
    I created my account just to say that your script looks awesome and very uselful
    Can't wait for the release 
  • TooLzor
    Offline / Send Message
    TooLzor polycounter lvl 10
    Looking rad man!
  • LaurentiuN
    Offline / Send Message
    LaurentiuN interpolator
    My wallet is waiting, release the damn tool man :) great job!!!
  • Spencer_Holmes
    Offline / Send Message
    Spencer_Holmes polycounter lvl 6
    Money waiting!
  • ChristopheS
    Offline / Send Message
    ChristopheS polycounter lvl 4
    I created my account just to say that your script looks awesome and very uselful
    Can't wait for the release 
    Thank you dude, that's an honor! :smiley:
    TooLzor said:
    Looking rad man!
    Thank you very much! :smiley:

    @s1dK @Spencer_Holmes

    Keep it waiting a little longer please! :smiley:

    I've added 2 new patterns today, two variations of the basket weave pattern. Right now there are 15 patterns, and I'm aiming for 20 patterns before I'll release this, so 5 more coming! :smile:

    Cheers!


  • chrisevansart
    Offline / Send Message
    chrisevansart polycounter lvl 9
    This might have came up, but I'm too lazy to read the whole thread. By chance will this have any mesh input for custom tiles? @ChristopheS
    Scripts looks great! Can't wait to invest anyways. 
  • musashidan
    Offline / Send Message
    musashidan high dynamic range
    This is coming along very well. Have you thought about implementing some sort of dynamic integration with a mass FX sim or a Pflow system, or even object paint?

    Something like adding fallen leaves/twigs/pebbles/etc through simulation/manual painting which would automatically tile.


    And with the custom option requested above, the user could input meshes already set up as infinitely tiling, which I'm sure would be easier to implement on your end.



    Great work.

  • Spencer_Holmes
    Offline / Send Message
    Spencer_Holmes polycounter lvl 6
    Is this finished yet?
  • ChristopheS
    Offline / Send Message
    ChristopheS polycounter lvl 4
    Hey everyone, I'm back on track!  B) 

    First of all sorry for the late response, I've been quite busy lately...

    Well, it probably won't have mesh input or any kind of physics, but these are definitely some great suggestions that I've got to keep in mind for future possible upgrades!

    Let me tell a little story about how I came up with this! :D

    I had to make a script for my scripting retake (either Maya or 3ds Max). While creating a personal piece, I was placing boxes in 3ds Max to create a base for a sculpted hand painted stone texture. This 'annoying job' (copying and replacing different sizes of boxes) gave me the idea of automating this. So I started writing down the basic stuff that I wanted to add without going to complex. My goal was mainly to achieve the possibility of generating a tileable pattern without having to actually model, move or replace anything in only a few minutes. I wanted to be able to create patterns like shown in the image below and these being random everytime.

    Possible settings as height, space between each stone, rotations, chamfer,... came up in my mind while I was brainstorming about this script the first time, so I wrote them down as well. Save and load options and some other things where added later on.

    When this first pattern was done, I started adding different (way more easier) ones. And so I ended up with 6 patterns by the time I had to do my retake (which I passed, jeeeej  B) ). Adding all of these new different patterns still maintained my main goal, which was (as explained above) easily generating a tileable pattern from scratch in only a few minutes, and the pattern being random everytime.

    Since this moment I've added a few more patterns, the counter is at 17 right now. While the pattern range to choose from is expanded quite a bit compared to the original idea, I still want to keep it as a 'simple' generator where you don't need anything to start with and generate random patterns easily. 

    So this is basically the reason why I won't add custom meshes or some of the other great suggestions. These are ALL great options and I'll definitely keep them in mind if I give this an update or create another script based of this as a start. :D

    Sooooo after this whole letter, I've some stuff tho show too! :D

    I've changed the amount of stones appearing in the small area, so it's actually small instead of feeling like it's medium. Since small was the smallest possible area, it HAS to be small too, since you can go bigger but not smaller. If it's too small, you go bigger, but if it was too big to start with, you couldn't go smaller.
    So here are 16/17 patterns in small version.


    There is one that I can't get smaller (3rd one) It is 12*12 (256/smallest size) now (since it has a width*height relation of 2*3 it has to be a multiple of 6, but 6 is too low since the tiling part is 4*3 so the smallest is 12*12... Also the herring bone 3:1 45 (row 3, column 3) can't be smaller since you'll only have 2 left on the x-axis if it's halved of what it is now...

    Next step I will go over my code from a-z and optimize some stuff where needed and after that a lot of testing before releasing! :D

    Cheers guys! Sorry for the long post! :) 
  • Goziref
    Offline / Send Message
    Goziref polycounter lvl 2
    Any idea when you will release this?
    It looks pretty awesome and I can use something like that right now!
  • TorQue[MoD]
    Offline / Send Message
    TorQue[MoD] polycounter lvl 19
    Yes please! Question, what versions of max will it support? 
  • pixelquaternion
    Offline / Send Message
    pixelquaternion polycounter lvl 6
    Goziref said:
    Any idea when you will release this?
    It looks pretty awesome and I can use something like that right now!

    Probably never!
  • x_Tom
    Dear Chris,
    you script is exactly what I would need. May I am stupid but is there an option to download it anywhere?
    I read a lot of comments regarding your work but it seems no one can use it.

    It would be very great if you share it...I am not a script programmer and could not do such things.

    Thanks for a replay.
    Best regards
    Thomas
Sign In or Register to comment.