Brick2D/3D and varying brick colors

jrandom

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

XswampyX

Active member
Hmmm.... Who would have the forethought to make a node like that?.....

VaryBrickColour.png

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

:boogiedow
 

jrandom

eye kan kode gud
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.
 

Afalk

gryphon designs ltd
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!
 

jrandom

eye kan kode gud
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. :)
 

Ma3rk

Curmudgeon in Training
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.
 

jrandom

eye kan kode gud
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.
 

dpont

Member
...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:

jrandom

eye kan kode gud
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.
 

Medi8or

incurable dumbass
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.
n1.png

r1.jpg

Add these nodes, and choose X and Y channel in the "Vector scalar" nodes:
n2.png

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:
r2.jpg

Changing the Scalar node to 0.5 gives some smaller tiles:
r3.jpg

This is pretty much all you need to pixelate textures. Plug the result into position in a texture-node:
n3.png

r4.jpg

The brick node gives tile-height one third of the width. So you can add a Divide-node:
n4.png

r5.jpg

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...
n5.png

r6.jpg

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

jrandom

eye kan kode gud
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...
 

Medi8or

incurable dumbass
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...

n6.png

r7.jpg

-J
 

jrandom

eye kan kode gud
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...)
 

Medi8or

incurable dumbass
Sure.
Here's a .zip with scene and surface file...

-J
 

Attachments

  • bricks.zip
    14.4 KB · Views: 292

UnCommonGrafx

Wandering about
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.
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.
 

jrandom

eye kan kode gud
I think I'm overrreacting due to a mishap I had when I first started using lightwave when I spent a huge amount of time on a complex node network surface and mesh deforms, had my external hard drive crash (where I store my software downloads for installation) the same day I needed to reinstall LW, and discovered the three sets of 3rd-party node plugins I used extensively had vanished from the internet. My scene was useless and unrenderable.

That was a bad week. :(

Anyhoo, that's where my twitchyness is coming from, and yes, I should really just get over it. :)
 

jrandom

eye kan kode gud
Yep. I bought a copy of IFW2 waaaay back in 2009.

I've always wondered how he implemented the region selection. Is he using a global memory chunk or did he find some bits he can steal that allow him to sneak information up the nodal evaluation call chain?
 

omichon

Member
Medi8or, thanks for this interesting node setup :thumbsup:
Do you think it could be possible to expand the concept to get something like described in this thread ?
 
Top Bottom