Vector Math nodes

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

Moderators: ChrisHekman, aoktar

Jengo_1
Licensed Customer
Posts: 73
Joined: Sun Aug 25, 2019 4:17 am
Contact:

I'm heavy into procedural textures and I've been hitting a brickwall trying to create certain type of textures lately.

No matter what it is (right now I'm trying to create a weave pattern), I've seen people on Blender creating complex stuff and all of it relies heavy on the Vector Math nodes.

Is there an equivalent of that in Octane for C4D? I know there are Math Binary/Unary nodes but they seem like they are the equivalent of the Math Nodes in blender, not the Vector Math. Specifically stuff like Modulo, Fraction, Scale, Floor/Ceil etc, with the ability to input "pi" for example.
One of the many helpful things about it I can think about off the top is connecting value (float) output into specific X,Y,Z transform inputs. But just generally it looks like an integral and irreplaceable part of creative node work.

I hope I'm missing something obvious! Thanks!
User avatar
aoktar
Octane Plugin Developer
Posts: 16066
Joined: Tue Mar 23, 2010 8:28 pm
Location: Türkiye
Contact:

Did you check the OSL scripts? You can do many things if you put an input and get outputs.
Octane For Cinema 4D developer / 3d generalist

3930k / 16gb / 780ti + 1070/1080 / psu 1600w / numerous hw
Jengo_1
Licensed Customer
Posts: 73
Joined: Sun Aug 25, 2019 4:17 am
Contact:

Thanks for the reply Aoktar.

Are you talking about the collectiong of OSL nodes available? Because in the past week I literally tried every single node in combination with other nodes without getting even close to what the Vector Math nodes do. I can't say I tried it myself with all the OSL and Custom nodes for less than 120 hours just in the past two weeks (yes im fully dedicated to crack these procedural methods)

Or are we talking about the general OSL texture with my own code input, because in that case I have no idea how to write osl code. I actually tried that too, looking for other OSL codes but none of them worked (understandably) since they were written for Blender etc and I don't know enough coding to alter the right line in order to convert them to work with Octane.

Thing is I have a feeling Vector Nodes are doing something extremely basic and fundamental so I keep having a feeling that everything is right under my nose.

I'm talking specifically about the workflows on these videos -

Everything from 1:00 - 4:30
https://youtu.be/GBIXU9BlyXg?t=61


or this one for example:
https://youtu.be/XoNkkNNA7pc?t=536

From what I'm seeing the main idea here is to be able to extract and inject position values on a very precise level. Like for example I can create a gradient by extracting channels from the UV coordinates, but then how do I tiles those gradients, slice them into a triangular gradient, tiles that across to get zigzig patterns all over, then use math to soften the edges? Or create a x-axis gradient, and repeat the gradient but only by repeating the negative graph twice and the positive graph once (so I get double the maount of black then white). But then use that to slice thru a y-axis gradient, and then able to exapnd and contract those slices only on the x axis. And then do the whole thing again but offset, so they fill the previous gaps, and then able to exapnd/contract these slices only on the y axis.
Like there's just a huge world of nodes I was never aware of until I looked into Blender and I wonder if I was too dumb to notice them in Octane for c4d, or if it's just not even possible for you guys to implement them in C4D - which is an absolute critical downgrade for C4D users. I REALLY hope that's not the case hah.

I'd also be very happy to pay for some kind of a 1-on-1 with anyone in Otoy who's willing to guide me through this.
elsksa
Licensed Customer
Posts: 784
Joined: Sat Jul 24, 2021 1:06 am

Hi, have you seen the relatively recently added "Binary / Unary math nodes"?
Regarding Blender, I believe this specific feature is missing.
User avatar
funk
Licensed Customer
Posts: 1206
Joined: Mon Feb 07, 2011 1:24 pm
Location: Australia

Hi Jengo_1

I'm not a C4D user, but that "knitted materials" tutorial looked really cool so I followed along in Octane Standalone (I stopped at about the 12.5 minute mark).

It looks like we have everything required to copy this particular tutorial. I have attached an ORBX (made in 2022.1 RC 3 standalone) so you can take a look.

Here are some notes:

- Octane doesn't need specific "vector" nodes because RGB colors = XYZ vectors. eg. Blender's vector length node can be done with any color input into Octane's unary math op texture > length.
- Blender vector inputs for texture mapping are done by using Octane's "Color to UVW" projection node.
- Some of the terms are different so you need to figure out the equivalent operations. eg. Blender's Step node = Octane unary math op texture > truncate.
- Octane obviously doesn't have all the exact same nodes, so you need to improvise sometimes. eg. A couple of nodes like "ping pong" were emulated using a combination of other Octane nodes instead.
- I did a few things differently when it came to creating the cow composite, since we have a nice composite texture with multiple inputs.
test_proc_knitted_mat_001.png
Attachments
test_proc_knitted_mat_001.orbx
(266.27 KiB) Downloaded 54 times
Win10 Pro / Ryzen 5950X / 128GB / RTX 4090 / MODO
"I am the resurrection, and the life: he that believeth in me, though he were dead, yet shall he live" - Jesus Christ
Jengo_1
Licensed Customer
Posts: 73
Joined: Sun Aug 25, 2019 4:17 am
Contact:

Elsksa, yes I've tried each option in both binary and unary math nodes but nothing worked the way I tried and I felt like I'm using them the wrong way (like for example, in the unary nodes there's no way to have a value so a lot of stuff doesn't work as I see in Blender, again, understandably)

I tried reading the manual but it doesn't explain how to practically use these nodes, it simply states the existence of these nodes.

funk - that's so awesome! I tried downloading the orbx but when I render it it shows me this:
Screenshot (176).png

Granted, I barely know my way around the Standalone program so I might be doing something wrong.

Ok I'll go over everything you wrote trying to identify each thing in C4D and will get back. Thank you so much!
User avatar
SSmolak
Licensed Customer
Posts: 1157
Joined: Sat Feb 07, 2015 5:41 pm
Location: Poland
Contact:

As I see these Blender nodes are scene geometry nodes not material/surface ones. You should use C4D Scene Nodes/Capsules for things like that. But Blender has better ones anyway, much more intuitive to use.
Architectural Visualizations http://www.archviz-4d.studio
User avatar
funk
Licensed Customer
Posts: 1206
Joined: Mon Feb 07, 2011 1:24 pm
Location: Australia

Jengo_1 wrote:funk - that's so awesome! I tried downloading the orbx but when I render it it shows me this:
You'll need to use 2022.1 RC3 or greater: viewtopic.php?f=33&t=80788

2021.1.6 is missing some newer features which I'm using (like the unary math op texture > length option)
Win10 Pro / Ryzen 5950X / 128GB / RTX 4090 / MODO
"I am the resurrection, and the life: he that believeth in me, though he were dead, yet shall he live" - Jesus Christ
Jengo_1
Licensed Customer
Posts: 73
Joined: Sun Aug 25, 2019 4:17 am
Contact:

I'm on the 2021.1.6 windows standalone, maybe there are some conversion issues?

I tried re-creating the node system in C4D and things were going pretty good until I reached the first Fraction node. For some reason, the Fraction node in C4D just doesn't do anything. I went through the chain of nodes over and over again making sure I've done it the same way as you did in the ORBX, and everything looks good in each node up until that, but as soon as I connect it to a Fraction node, instead of creating a sine pattern of multiple gradients, it just doesnt do anything.

Man I wish there was more information about these nodes out there. I mean I feel like these math nodes are not at all documented or talked about and yet hold so much potential.

I attached the C4D project with the nodes I got so far if anyone wants to take a look.
ProceduralWeave_Attempt1.zip
(197.78 KiB) Downloaded 48 times
Jengo_1
Licensed Customer
Posts: 73
Joined: Sun Aug 25, 2019 4:17 am
Contact:

SSmolak - thanks for the tip, I'm jumping right into reading about it right now. I'm so excited for this.

funk - Got it, downloading it right now, been looking for it but my dumb ass couldn't find it. Thanks!
Post Reply

Return to “Maxon Cinema 4D”