Jump to content

Sign in to follow this  
MikeA

Node material 'coloured checkerboard' ?

Recommended Posts

Guys I'm late to the party on this - an R20 material  nodes newby...

 

I want to generate a 'checkerboard' effect (ie a grid of squares) with each individual square of the checker being a random choice of one of four specific colours. No problem generating a black and white checkerboard of course - but I'm stuggling to get my head around how to randomize those colours.

 

Can someone point me in the right direction please?

Share this post


Link to post
Share on other sites

  • Topic Author
  • Thanks Hrvoje,
    Oddly enough that solution came to my mind as well having posted the question.

    But I'm abandoning this - because what I was trying to do is actually much more complex - and this approach wasn't working....

     

    What I ultimately wanted to do was:

     

    I'm often working with surfaces that have square tiled materials - eg: square wall or floor tiles etc - that have some texture. Think of a square concrete slab for example. I want to avoid texture tiling repeat patterns by randomly rotating the tiles. I was trying to come up with a way in the node editor to create a flexible grid of UV co-ordinates, with each of the UV 'tiles' rotated at 0, 90, 180, or 270 dregrees. Using UV transform I can easily get a single offset, reduced length and rotated UV tile - but I can't come up with a flexible way to make a grid of such UV 'tiles' each with random rotation to one of the above four values.

     

    Any thoughts on doing this sort of thing?

    Attached image shows my starting point....

     

    Currently I'm using rotated mograph clones for these tiling jobs. I just feel it would sometimes be better if I could apply a UV tiled (with rotation) material to a single plance.

     

    TiledUV_01.JPG

    Share this post


    Link to post
    Share on other sites

    Ah, I see what you are after. You could use render object node (apply the node mat to poly object), grab polygon ID and use it as seed for multishader node. There set 4 colors and this will give you random set of 4 colors per face - would that work for you?


    Free C4D trainings from MAXON professional on our youtube channel

     

    https://www.youtube.com/c4dcafe

    Share this post


    Link to post
    Share on other sites

    argh, simply had to try this one :compEnjoy:

     

    I believe this is what you are after. At this point it is polygon size based, so when you change the height and width of plane primitive you also have to change the height and width in Node mat. Hope this helps :)

     

    Random_ori.PNG

     

     

    Random_ori.c4d

    • Like 1

    Free C4D trainings from MAXON professional on our youtube channel

     

    https://www.youtube.com/c4dcafe

    Share this post


    Link to post
    Share on other sites
  • Topic Author
  • "A tip  of the hat to you Sir !"  -  traditional English phrase : )

    That's fantastic. As I've only being studying nodes for about 24 hours** I'll need time to get my head fully around that - but thank you so much!

     

    ** ...making great progress thanks to your YouTube playlist : )

    Share this post


    Link to post
    Share on other sites

    Join the conversation

    You can post now and register later. If you have an account, sign in now to post with your account.
    Note: Your post will require moderator approval before it will be visible.

    Guest
    Reply to this topic...

    ×   Pasted as rich text.   Paste as plain text instead

      Only 75 emoji are allowed.

    ×   Your link has been automatically embedded.   Display as a link instead

    ×   Your previous content has been restored.   Clear editor

    ×   You cannot paste images directly. Upload or insert images from URL.

    Sign in to follow this  

    • Recently Browsing   0 members

      No registered users viewing this page.

    YOUTUBE CHANNEL:

    ABOUT US:

    C4D Cafe is the largest CINEMA 4D community. We provide facilities for discussion, showcasing and learning our favorite software :)
    ×
    ×
    • Create New...