Page 1 of 2 12 LastLast
Results 1 to 15 of 19

Thread: Brick2D/3D and varying brick colors

  1. #1
    eye kan kode gud jrandom's Avatar
    Join Date
    Dec 2009
    Location
    Seattle, WA
    Posts
    1,143

    Brick2D/3D and varying brick colors

    Is it possible using the native Brick 2D or 3D node to get bricks that individually vary in color and/or alpha?

  2. #2
    Super Member XswampyX's Avatar
    Join Date
    Aug 2010
    Location
    Kernow
    Posts
    2,031
    Hmmm.... Who would have the forethought to make a node like that?.....

    Click image for larger version. 

Name:	VaryBrickColour.png 
Views:	323 
Size:	1.50 MB 
ID:	112042

    http://dpont.pagesperso-orange.fr/main_en.htm look for the Rman collection.


  3. #3
    eye kan kode gud jrandom's Avatar
    Join Date
    Dec 2009
    Location
    Seattle, WA
    Posts
    1,143
    Yes, there's several plugins out there that do this, but at the moment I'm sticking with just the built-in nodes, hence my question. I'm guessing it's not currently possible but wanted to know for sure.

  4. #4
    gryphon designs ltd Afalk's Avatar
    Join Date
    Feb 2003
    Location
    Chicagoland, USA
    Posts
    486
    I can see a few reasons to stick to native provided tools, but DPont's collection of nodes & plugins are such powerful additions to Lightwave's own tools and toolset that since they are utterly free (outside of Donatations fo course) that I'm not sure any reason I could think of is good enough to do without them.

    Good luck!

  5. #5
    eye kan kode gud jrandom's Avatar
    Join Date
    Dec 2009
    Location
    Seattle, WA
    Posts
    1,143
    One is for learning purposes, and the other is redistribution issues. IFW2 is commercial, and the DPont nodes can't be included as per the author's instructions, requiring the receiver to follow external links -- so what happens if the site changes or goes down, etc?

    For purely personal uses, both IFW2 and DPont are fantastic. No argument there.

  6. #6
    Curmudgeon in Training Ma3rk's Avatar
    Join Date
    Mar 2003
    Location
    Pasadena, CA
    Posts
    1,049
    Is there a way to displace the mortar? In other words so it's inset and not flush with the brick face? Seems like there should be but I'm not proficient with nodes.

  7. #7
    eye kan kode gud jrandom's Avatar
    Join Date
    Dec 2009
    Location
    Seattle, WA
    Posts
    1,143
    The bump map does that, but it's shallow and gets lost at a distance. You'd either have to really monkey with the normal maps or do actual geometry displacement to make that look better.

    This is one of those areas where I really wish Lightwave natively supported micropoly displacement. That would be handy.

  8. #8
    Member
    Join Date
    May 2006
    Location
    France
    Posts
    3,896
    Quote Originally Posted by jrandom View Post
    ...the DPont nodes can't be included as per the author's instructions, requiring the receiver to follow external links -- so what happens if the site changes or goes down, etc?..
    Just to avoid misunderstanding,
    my instructions are only for restricting public redistribution of my plugins,
    until I'm still offering support for them,
    private copies of these plugins, are allowed of course,
    exchange between co-workers
    or with anybody else for convenience, without limitation
    about usage, including commercial product.



    Denis.
    Last edited by dpont; 03-02-2013 at 03:58 PM. Reason: hope to be explicit enough.

  9. #9
    eye kan kode gud jrandom's Avatar
    Join Date
    Dec 2009
    Location
    Seattle, WA
    Posts
    1,143
    Absolutely understood, Dennis. I can't use them in this particular case because I'm going to be publicly releasing my little city thingy when it's finished.

    For my own private projects, I will be using any awesome nodes I can get my hands on, including yours.

  10. #10
    incurable dumbass Medi8or's Avatar
    Join Date
    Mar 2003
    Location
    Norway
    Posts
    803
    Quote Originally Posted by jrandom View Post
    Is it possible using the native Brick 2D or 3D node to get bricks that individually vary in color and/or alpha?
    Of course it's possible, but you probably have to connect quite a few nodes.
    Here's one way you can do it:
    (I assume you know what spot is..)

    First, when you connect spot to diffuse shading, you see the result shows red towards right and green towards the top. You can show coordinates XYZ as colours RGB. X=R, Y=G, and Z=B. This can be some help when playing with nodes.
    Click image for larger version. 

Name:	n1.png 
Views:	122 
Size:	30.4 KB 
ID:	112132

    Click image for larger version. 

Name:	r1.jpg 
Views:	111 
Size:	15.8 KB 
ID:	112125

    Add these nodes, and choose X and Y channel in the "Vector scalar" nodes:
    Click image for larger version. 

Name:	n2.png 
Views:	135 
Size:	58.9 KB 
ID:	112133

    The mod nodes gives the remainder after a divide. For example, 5 mod 2 would give a remainder of 1, or 1.23 mod 1 would give a remainder of 0.23, as would 2.23 mod 1 ...
    This gives us some tiling in the result:
    Click image for larger version. 

Name:	r2.jpg 
Views:	108 
Size:	23.4 KB 
ID:	112123

    Changing the Scalar node to 0.5 gives some smaller tiles:
    Click image for larger version. 

Name:	r3.jpg 
Views:	98 
Size:	25.9 KB 
ID:	112124

    This is pretty much all you need to pixelate textures. Plug the result into position in a texture-node:
    Click image for larger version. 

Name:	n3.png 
Views:	126 
Size:	69.9 KB 
ID:	112126

    Click image for larger version. 

Name:	r4.jpg 
Views:	103 
Size:	9.6 KB 
ID:	112127

    The brick node gives tile-height one third of the width. So you can add a Divide-node:
    Click image for larger version. 

Name:	n4.png 
Views:	125 
Size:	70.8 KB 
ID:	112128

    Click image for larger version. 

Name:	r5.jpg 
Views:	101 
Size:	12.1 KB 
ID:	112129

    Of course, every other row needs to be offset half a brick width. One way is double the tile-height again, and use a logic node to move the top half of it to the right.
    If remainder from Mod (gives value from 0 to 2/3 of tile width) is bigger then 1/3, add half a tile width to the X-value going into the first Mod node...
    Click image for larger version. 

Name:	n5.png 
Views:	141 
Size:	82.8 KB 
ID:	112130

    Click image for larger version. 

Name:	r6.jpg 
Views:	119 
Size:	15.6 KB 
ID:	112131

    You can also do this with gradient nodes, instead of math nodes...
    -

    My dongle is small, hard, and purple.

  11. #11
    eye kan kode gud jrandom's Avatar
    Join Date
    Dec 2009
    Location
    Seattle, WA
    Posts
    1,143
    Sweet! Getting the mortar lines'll be trickier... if it's possible to somehow get that into UV, it might be possible to get those to match the alignment of the bricks in the actual 2D brick node, and then masking via the brick node could be used for mixing the mortar and brick materials...

  12. #12
    incurable dumbass Medi8or's Avatar
    Join Date
    Mar 2003
    Location
    Norway
    Posts
    803
    For mortar lines, you could send texture into fg colour of bricks node. You'd have to move position half a brick size to line them up, though...

    Click image for larger version. 

Name:	n6.png 
Views:	182 
Size:	104.4 KB 
ID:	112137

    Click image for larger version. 

Name:	r7.jpg 
Views:	169 
Size:	24.3 KB 
ID:	112142

    -J
    -

    My dongle is small, hard, and purple.

  13. #13
    eye kan kode gud jrandom's Avatar
    Join Date
    Dec 2009
    Location
    Seattle, WA
    Posts
    1,143
    Now that there is a thing of beauty. I don't suppose you could attach your node setup, could you? (If not, I'll just reconstruct from scratch when I finish these other materials I'm working on...)

  14. #14
    incurable dumbass Medi8or's Avatar
    Join Date
    Mar 2003
    Location
    Norway
    Posts
    803
    Sure.
    Here's a .zip with scene and surface file...

    -J
    Attached Files Attached Files
    -

    My dongle is small, hard, and purple.

  15. #15
    Hopefully, Denis will correct me if I am wrong,
    JRandom, I think he is saying you can use them for your projects in this way. Are you saying that you don't want the user to have to "go out of their way" to get extra stuff?
    You would be doing most a favor if they didn't already have the DP set; it is, after all, the only thing I would call "native" that doesn't ship with LW.
    Please reconsider that positioin, as even Denis chimed in to mitigate the thought.
    Quote Originally Posted by jrandom View Post
    Absolutely understood, Dennis. I can't use them in this particular case because I'm going to be publicly releasing my little city thingy when it's finished.

    For my own private projects, I will be using any awesome nodes I can get my hands on, including yours.

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

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