Page 1 of 2
Vector Math nodes
Posted: Tue Nov 22, 2022 1:26 am
by Jengo_1
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!
Re: Vector Math nodes
Posted: Tue Nov 22, 2022 7:59 am
by aoktar
Did you check the OSL scripts? You can do many things if you put an input and get outputs.
Re: Vector Math nodes
Posted: Tue Nov 22, 2022 9:42 am
by Jengo_1
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.
Re: Vector Math nodes
Posted: Tue Nov 22, 2022 2:25 pm
by elsksa
Hi, have you seen the relatively recently added "Binary / Unary math nodes"?
Regarding Blender, I believe this specific feature is missing.
Re: Vector Math nodes
Posted: Tue Nov 22, 2022 3:28 pm
by funk
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.
Re: Vector Math nodes
Posted: Wed Nov 23, 2022 12:01 am
by Jengo_1
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:
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!
Re: Vector Math nodes
Posted: Wed Nov 23, 2022 2:54 am
by SSmolak
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.
Re: Vector Math nodes
Posted: Wed Nov 23, 2022 3:52 am
by funk
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)
Re: Vector Math nodes
Posted: Wed Nov 23, 2022 5:43 am
by Jengo_1
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.
Re: Vector Math nodes
Posted: Wed Nov 23, 2022 5:48 am
by Jengo_1
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!