How to use compare node?

Maxon Cinema 4D (Export script developed by abstrax, Integrated Plugin developed by aoktar)

Moderators: ChrisHekman, aoktar

User avatar
aoktar
Octane Plugin Developer
Posts: 16066
Joined: Tue Mar 23, 2010 8:28 pm
Location: Türkiye
Contact:

thanulee wrote:Thanks, and that should be in c4d manual as well with examples. Still i dont get it though.

How a>b translates in terms of bigger? RGB values? Image scale? can u give me an example of how this is useful? cheers
Improved manual is on progress.
Btw It's working on pixel based. It will use pixel of connected texture which is connected to pin(If A<B) when A pixel value is bigger than B pixel value at any point. And reverse logic for other pin(If A>=B).
Octane For Cinema 4D developer / 3d generalist

3930k / 16gb / 780ti + 1070/1080 / psu 1600w / numerous hw
User avatar
thanulee
Licensed Customer
Posts: 712
Joined: Sat Dec 19, 2015 11:00 pm

Thanks alot mate. I ll try create something with it and see if i have more questions lol
niestudio
Licensed Customer
Posts: 265
Joined: Fri Aug 21, 2015 10:03 pm

Hi Thanulee,
not sure if this is a practical example for you, but it shows the mechanics of the node.

A is an animated float texture from 0.4 to 0.6 over 13 frames
B is a static float at 0.5
if A is less than B - diffuse is red
if A is greater than or equal to B - diffuse is blue

A float value changes over time, so:
on frame 6 it's 0.488502 (less than 0.5) stays red
less_than.jpg
on frame 7 it's 0.511498 (greater than 0.5) now the color changes.
greater_than.jpg
Attachments
compare.c4d.zip
(75.46 KiB) Downloaded 153 times
OSX 10.12.4 | Intel 12 core @ 3.33 ghz | 128 gb ram | NVIDIA GeForce GTX 1080TI | Ubuntu Linux slave with 3x 1080ti
User avatar
thanulee
Licensed Customer
Posts: 712
Joined: Sat Dec 19, 2015 11:00 pm

Many thanks! i ll check it 2morrow!!
User avatar
SSmolak
Licensed Customer
Posts: 1157
Joined: Sat Feb 07, 2015 5:41 pm
Location: Poland
Contact:

I have grayscaled mask of planks and I want to set exactly gray value that can be driven by comparison node but there is no equal values A=B but A>=B . How to get A=B ?

EDIT : I get this to work by gradient but anyway grayscale masking is limited if there is no more flexible logic node component with A=B input included too.
Architectural Visualizations http://www.archviz-4d.studio
Post Reply

Return to “Maxon Cinema 4D”