Creating the same Mograph Setup in both Houdini and Cinema 4d | WHICH ONE IS BETTER?!

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
in this tutorial we'll learn how to create the same more graph setup in both cinema 4d and Houdini if you are a cinema 4d user looking ahead to learn houdini'd this tutorial can show you the very different approach Houdini and cinema 4d take to content creation first we create the setup in cinema 4d and render it using Arnold render then we move to Houdini and create a very similar setup there as well the last thing to do is to export the Houdini scene back to cinema 4d using Alembic adjust the shaders using the point that we got from moodini and rendered using Arnold again so get some coffee or tea and let's get started hey folks welcome to mobile plus be sure to subscribe and ring the bell to get notified about or like these videos make sure to visit our website McGruff plus gum or gum old page addcom or that come slash magrav plus and check out our premium rendering and motion graphic courses for cinema 4d 3ds max Maya Arnold Corona very Maxwell and so on before starting the tutorial I want to make a disclaimer after you finished watching this tutorial especially if you have no previous experience using Houdini you probably say to yourself that oh my god cinema 4d was way easier compared to Houdini and Houdini is very convoluted and that's not entirely true I do not mean for this tutorial to be discouraging for people who want to learn Houdini once you start learning who didn't you realize it makes sense yes it is hard to get started but once you understand the logic behind how Houdini works you start rolling and loving the software so don't get discouraged and realize Houdini can do much more but it takes more time to set up at the same time as the users of this channel are mostly see for the user the cinema 4d part will be much quicker as I don't have to spend time explaining some of the key fundamentals but the Houdini section is purposefully longer as I needed to explain a lot of key concepts that might be alien to see for the users and that's make it like the Houdini part is like more complex and take way longer but for even a beginner Houdini user the setup might take only twice as long in Houdini as in cinema 4d here is what we are trying to create in cinema 4d we have a cube and the cylinder being cloned in a great array mode and we want to increase the y scale of these clones in a pattern like this then we add more randomization only to where the clones are having a bigger y scale and we make sure the clone scale down to zero near the edges of her circle it's a fairly simple setup in cinema 4d so let's get started first create a 10 centimeter by 10 centimeter cube press C and make the cube editable as I want to scale up this cube from its space in the y-axis let's put the pivot to the base of the cube in the y-axis using the axis center now let's add a cylinder set its radius to 5 and height to 10 change its height segment 1 as we'll be having a bunch of these clones so keeping the poly slow is a priority make it editable and put the pivot to the base as well now add a cloner and put the cube and the cylinder under it change the mode to grid array and as the cloner is using the iterate mode by default we get one row of cubes and one row off cylinder these are the stuffs and before T gives it to you for free but you have to work for them in Houdini and you'll see now set the instance mode to multi instance for faster feedback and set the X and Z count to 54 now I'm gonna add a plane effector to the cube under the parameters tab disable position and enables scale and we want to set the Y scale to 7 and that's pretty much it now we can start creating the pattern we want using fields so in the fall of tab add a spherical field set its size to 250 centimeters and inner offset to our on 20% so the effect will be more gradual in the remapping tab change the contour mode to curve and now we can adjust this curve to get exactly the shape that we want let me just adjust the curve a bit in the coloring mapping tab let's use a purplish color so that is the first effector let me quickly rename the plane effector to plane 0 1 and our spherical field to spherical field to 0 1 select a cloner and add another plane effector and rename it to plane 0 2 under its parameter tab disable position and enable scale and uniform scaling and set the value to negative 1 which makes our clone disappear add a spherical field to this as well I want to use this spherical field to make the clone disappear at the very edges of our setup I do not want it to affect the clones in the peak that much probably just make them a bit smaller but I need it to be more effective in the valleys compared to the peaks so I'm gonna set the size of this field to 250 centimeters as well and like the previous field let's decrease the inner offset to around 20 percent so the effect of the field is more gradual we can change the contour mode to curve and we can probably copy the curve from our previous vertical field and adjust it a bit so I'm now copy and paste the curve and invert this strength and start adjusting it to get the desired effect if I turn off the first plane effector you can better see what this second plane effector does also in the color remap tab change the color to this sinus color with the RGB values of 27 182 and 224 now that we are getting closer to the final effect let's increase the clone count to 70 and also turn on our first plane effector and this is the combined result we get and lastly I want to add a bit of randomization in scale based off of the current spherical field that we have and we can do that using the same plane effector so just add a random field and change the random mode from noise to random set the max strength to around 75% and make sure this random field would not affect the existing colors at all now to limit where these random field effects we can simply add a mask to it and use our existing spherical as what arrives the mask and that's the basic setup in cinema 4d using field and now we can start the render using Arnold if you are not interested in rendering you can skip the video to where I start in Houdini but I think it's essential that you watch because there are some points that is related to rendering and I will be mentioning them when we get back to Houdini so just continue watching it will take only a few minutes now let me quickly go to my Arnold layout I have this basic scene setup that we can enable them one by one let's run the IPR as well we have this simple area light as our light source I have this floor with a simple diffuse blue standard surface shader apply to there is this white cube that acts as a reflector and brings back some light into the scene and we can go and view the scene through the camera as well now how can we get Arnold to show us these colors in the render if we create a new Arnold standard surface shader and assign it to our clones let's run the IPR as well you notice the colors are gone both in the viewport and they are not showing up in the render as well that's because Arnold can't read the magrav color data by default let's middle click on the material to open up its network editor to read the colors from your mograph setup you need a node called user data RGB so press ctrl + tab and get a user data RGB node this note can read existing attributes in your scene both custom and native and one of the native attributes is the display colors of your clones and you can define that attribute in this attribute field if you click on this arrow besides the attribute field we can read bunch of X particles attributes or we can select this display color from our mograph setup so let's choose that and if this error doesn't exist you manually type in display color to load that attribute now that we have this attribute load in I can simply connect the output of the user data RGB node to the base color input of the standard surface shader and now we get our clone colors in our Arnold render let's just set the base way to 1 so we are using the full range of our color data and that's how you do it while we are here we can do a few cool things I can simply add a colour correct node after the user data RGB node and use the hue shift value to get an entirely new set of colors for my clones you for now let's set the hue shift to zero to get the original colors back now let's do a bit more I just want to simply multiply the existing color data with a random black and white value per clone so first we need to generate those black and white colors per clone and to do so we can use a simple color jitter node and set it as the beauty shader for now when I set the input color to black and under the object section set the gain min to zero and Max to one and now we have this random grayscale clones now we can get a multiply node connect a colour correct node as the first input and the color jitter as the second input and use the multiply node as the beauty shader I'm gonna set gain min to 0.5 so we don't get very dark clones and set the max to 1.5 to get a bigger range of colors now set the multiply node as the base color for the standard surface shader and connect the standard surface shader as the beauty shader and that's it now let's go for the same setup in Houdini here we are in Houdini 18 add a geometry node let's start with a basic box we use a simple expression to make sure the cube always stays on top of the grid no matter the height of the cube and to do that simply right click on the size Y of the cube and choose copy parameter and now right-click on the center Y and paste relative reference and divided by 2 so we are basically telling the center Y parameter to use the size Y divided by 2 now if I increase the size Y to whatever the center Y value will be half of that and therefore the cube will stay on top of the grid at a time I'm going to set the size to 1/4 now add a transform node to the cube and let's make it smaller just set the uniform scale to about point zero 9 now let's add a tube which is basically the same thing as a cylinder I'm going to change the primitive type to a polygon enable endcaps the high to around 1.7 and to make sure it always stays on top of the grid we can use the same technique so simply copy the height value and paste it at the center Y and divided by 2 now let's add a transform node to this tube as well and set the uniform scale to point zero five zero point zero five two to be a bit more precise now the cube and the tool are roughly the same size now we need a grid to copy this cube and two-on-two so add a grade geometry set its rows and columns to 70 and 70 like we had it in cinema 4d I don't necessarily need the grid itself just its point to copy my geometries onto we can use an ADD node to achieve that so add one to the grid and enabled elite geometry but key points for now let's think about how we can copy the cube onto these points we take care of the two later on to do so we can use a copy two points node this node takes two inputs the left input is for the geometry we want to copy so let's connect our cube to it and the second input asks for the points that we want this cube to be copied onto so let's connect our grid and enable the display flag for the copy tool point node the next thing I want to do is to create that first spherical field that we had in cinema 4d so let's add a sphere to the network turn on its template flag to see what's going on as the sphere type is set to primitive if I take a look at the node info you notice this sphere has just one point and that point is in its center it doesn't consist of polygons and we want the fall-off to be around this point and not the sphere itself so keep that in mind I will add a transform node to it so we can move it around later easier as this will be the main driver of the entire setup and this will kind of move our fall-off in Houdini you don't affect the clones directly you work on the points that the cubes are being copied onto and then the copy two points node will copy those attributes like scale and randomness to the copied geometries first let's create a fall-off around our sphere to do that we use a node called mask from geometry connect the grid points the left input and the sphere to the right input in the mask node we want to change the reference group to points as we are only interested in that point in the center of the sphere as I mentioned to see and visualize the mask or the field if we use cinema for this terminology let's click on this toggle visualize button and now we can see the mask and we can increase the radius to make the mask bigger let's set the radius to five point five so it covers all the points if you take a look at your geometry spreadsheet all the points on the grid have an XYZ position attribute which is a vector attribute as it has three float values which defines their position in 3d space basically if you take a look at a spreadsheet on the left side you have the point numbers from zero to the last point and on the right side you have the attributes and the value of each attribute for each point and now we have created another point attribute called mask and we can rename it to whatever we want in the output mask field so we can rename it to let's say follow for example and now it's called fall-off in the geometry spreadsheet as well let's rename it back to a mask so basically now each point has a value or an attribute attached to it which starts from zero to one per point this attribute is called mask and the points that are closer to the center of the sphere having a higher value close to one and the points far away are gradually get closer to zero and now we can use this mask value or attribute to control anything we want we can control the scale of our boxes for example so if a point has a mask value of one keep the size of the box that is being copied onto that point two one and if the mask value is zero change the size of the box that is being copied onto that point to zero as well if I get the transform node attached to our sphere and move it around you notice how like a spherical field in cinema 4d we can move our field or mask wherever we want and control everything from here for now let's make sure it's at the center the cool thing is that the mask from geometry gives us a curve to remap the mask values and even if it didn't its Houdini so you could simply create your own custom curve using your Wrangler or an attribute pop and adjust the values there and now we can use this curve to create a similar curve to what we had in cinema 4d so I'm just gonna create a similar curve now we're not gonna follow the exact same steps we followed in cinema 40 it's Houdini it's different so we're gonna approach it differently now I want to add a scale attribute to all the points scale is a built in attribute in Houdini it's a vector attribute which allows us to control the scale of the points and therefore of our boxes on X Y and Zed separately so add an attribute create note the name of the attribute is scale with small letters and as soon as we type that in Houdini knows what to do with this attribute and now a new attribute named scale is added to our geometry spreadsheet right now the data type for our scale attribute is float it's just one value and scale is a vector attribute with three values on XY and Z so change the data type to vector and now we have scale x y&z as it is reflected in a spreadsheet now if we connect the attribute creates node to the copy to point node and enable the copy node as well you notice all the cubes have disappeared and that is because the scale is set to zero by default and if I set the value to 1 on XY and Z we get our original boxes and that is because the value that we defined for the scale attribute is 1 1 and 1 on old axis if I get back to the attribute create node and set the scale Y to let's say 5 you notice the boxes are becoming 5 times larger on Y and the same thing can be done for x and z axis as well for now let's set the value back to 1 so the fundamental concept here is that we create attributes on point then when we copy any geometry on those point using a copy to point node the attributes of those points will be copied onto those geometries the next thing I want to do is to add a bit of randomness to scale Y so let's add an attribute noise node by default it randomizes CD which is basically color we want to change that to scale so let's type in scale and now it randomizes scale I'm gonna set the Z and X min and Max to zero and zero so they won't get randomized at all and let's set the Y min to 1 so we get our original cubes back and set the y max to may be 1.2 1.3 to add a bit of randomness and if you want more randomness you can obviously increase this value here you notice the noise is a bit too large so I'm going to set the element size to point zero five to get a smaller pattern so now we have created a scale attribute and randomized it on y axis now it's time to utilize the mask and scale the boxes on Y based on the mask values so if we get our scale Y value and multiply it by our existing mask values the cubes will be bigger when the mask value is one and smaller when it is zero simple enough and to do that we use Houdini's version of expresso which is called attribute of up and it is a visual way to generate the VEX code in Houdini so add an attribute Bob node and rename it to something like scale mask or whatever it makes sense to you let's make sure the copy two points is enabled and press ENTER to go inside the attribute Bob node as I mentioned we need to multiply the scale Y value with our mask value so we need to bring in those two attributes to bring in attributes if they are not already in these Bob global parameters and here you can see we have P for position V for vector CD for color diffuse and so on we can use a bind if we can find that particular attribute here so add a bind node the attribute we want to bring in is called scale and scale was a vector so make sure the data type is next add another point this time we want masks attribute and if you recall mask was a single float value between 0 & 1 now scale is a vector consisting of 3 float values and we want to work with the second value which is scale Y so add a vector to float node and connect the scale attribute to it now add a multiply node connect the float - which is our scale white the first input and our mask - the second input so the first part is done and now we need to repackage the whole thing and fit it back to the scale value so we need a float - vector this time so X is the original value and Z is the same thing but Y is the result of the new value we made now to export the scale value we need a bind export so get a bind export name it scale type is vector and now the changes are visible in the viewport and the cubes are having a bigger scale Y value when the mask values are bigger and vice versa now I want to amplify this and to do that we will multiply our values with a value bigger than 0 so bigger than one actually so at a constant node and connect it to our existing multiply node as the third input and let's set the value to let's say 5 and now everything is amplified 5 times great if you remember back in cinema4d we made the clones disappear close to the edges of our setup so let's do that while we are here I talked about scale attribute being a vector attribute with three values for X Y and Zed there is another attribute that controls the unified or uniform scale for all the three axes and once and it is called P scale if you remember back in cinema 4d we created that second plane effector and said the uniform scale back to a negative one and copied our first vertical field and adjusted its care to control where it would affect the Clones so here in Houdini we use you know P scale so let's tell Houdini we want to control the P scale which is the same as uniform scale so we need to add a bind export the attribute name is P scale now P scale unlike scale is just a single float value so the type can stay as float and we want to control the input value with our mask so connect the mask to our bind export for the P scale attribute so basically what we are saying here is that where the mask value for a point is one keep the original size of the Clones and wear the mask value is less than one and closer to zero use a smaller value for the uniform scale which in turns make the clones almost disappear where the mask has no influence in the valleys of our shape now that's cool but I want a way to be able to customize this mask values for the P scale to control where exactly it affects the clones so we can put the mask values through another curve or ramp before connecting it to P scale and use that curve to specify how the mask values affect the P scale so press tab and add what's called a ramp parameter node now let's give it a descriptive name like you know uniform scale ramp so change the ramp type to spline ramp and connect it to our P scale input and now we can customize our mask use 4p scale specifically traditionally you don't control your ramp inside of up network you go back up the geometry level and here we have our uniform scale ramp and this is a simple ramp with two points the left one controls the low values of the mask input and the right one controls the high values so if I move up the first point I make the lower values bigger and therefore our disappeared clone will become bigger and if I lower the second point I make my already present clones to become smaller I just want to make sure only the clones at the very edges completely disappear and keep them more central clones less affected we just add two points close to our first point and make the curve to stay at one only too deep suddenly near the end and this will give us our desired effect cool the effect is almost done now it's time to add the tube as well right now only the box has been copied onto the points and we want to separate our points into two groups and copy the box on one group and the tube on another so I'm going to enable the display flag on our attribute walk which is our last note before going to the copy node add a node called group by range and enable its display flag let's name this group box just so we know these are the points that we want to copy our box to change the group type to points in the range filter section we want to select one of each two points and this will be the points that we copy our box to now we need to group all the remaining points for our tube so add a node called group combine name the group as tube and the group equals all buds the Box group and this will select all the points that are not in the box group and creates a group out of them named tube if we come back to our copy two points node right now the box is the geometry we are copying so in the copy two points node change the tar get points to Bucks Group now add a new copy two points note and connect the tube as the geometry to copy connect the last node in the right chain which was our group combine node as the points and enable the seconds copy node and change the target points to tube this time now we have to copy nodes one copying the box and the other one copying the tube on their specified points now if we merge the tool we can get the final effects so add a merge node and connect both of the copy nodes to it and that's our final combined effects now before thinking about exporting this back to cinema4d for rendering let's create some color based off of our mask so I'm going to add a color node again we want to color the points and then the clones we'll get those defined colors via the copy two points node so I'm going to add the color node after the group combine node and change the color type to a ramp from attributes and attribute we want to use is called mask which is the mask we generated at the beginning using masks from geometry node and now we can change the black and white color to any color we want or add in between colors as well so change the white to purple and black to this kind of signage turquoise color add a color in the center and change it to a more kind of bluish color and now we have colored our clones very close to what we had in cinema 4d if we export this back to cinema this color data will be saved in a vertex color tag I don't need to use this we just need the raw mask data and then we can use that to color our clones in the rendering face using Arnold right now we have the mask attribute and it will be saved as a vertical SMAP remember back in cinema 4d we used the color jitter node in Arnold to get the random black and white clones now I need to generate that data here so we get that as well when we are back in cinema 4d as the color jitter node wouldn't generate that for a single unified Alembic file so let's add an attribute create node before or after the color node remember we used this know to create that scale attribute at the beginning and here the attribute name can be anything let's name it like a random b/w random black and white obviously the name can be anything you want and as we want just simple grayscale values type can remain as float if I turn on points number display for the viewport you can see each point has a number from zero for the first point to what 4890 nine for the last point and that point number can be accessed in our network using PT nom attributes for the value we use a function to generate random values between zero and one based on the point number of our geometry and that function is called a R and so for the value type in R and open parentheses at Pt num close parentheses so we are using that ad sign to access the PT num attribute so we are generating a random value between zero to one and that's what the rand is for we are generating a random value between zero to one based on the point numbers now let's get back to our geometry spreadsheet we have a new attribute for all the points and each points gets a random value between 0 to 1 and we can visualize that as well so I'm going to add a new color node on this side and connect the attributes create node to it I'm going to change the color type to ramp from attribute and the attribute we want to colorize is called a random VW now if i zoom back and turn off point number display we have basically generated that black and white randomness per point perfect now if I enable the merge node and take a look at its info we have four point attributes we have our CD which is color diffuse and this is the purple sign colors we generated using the color node we have our mask and random BW which are single float values and our position or P which is a vector attribute and now we can export this to cinema 4d and render it there for that we need a Rob Alembic output to export olympic files so connect the merge node to it first you define where you want to save out the Alembic file let's save it to our desktop and name it clones from Houdini ABC and click accept if it is animation you can change the render current frame to render frame range and then click on this save to this button the non-commercial version of Houdini is not capable of exporting Alembic and you need to have at least the indie version of Houdini I don't have that currently on this machine so I'll need to use another one that has that export capability but the process is the same just click on the Save button now we'll be getting back to C for the unloading the ABC folder now back in cinema 4d let's hide and disable the cloner and import the Alembic file so from the file menu choose merge on my desktop here is this clones from Houdini that ABC file exported from Houdini I'm just gonna set the import scale to around 51 so it matches our cloner size in cinema 4d so here is our Olympic file and it comes with three tags the first one is a vertex color tank containing our color data from Houdini in the basic tab of the tag the name of the attribute is CD like we had it in Houdini if you remember the second is a vertex tag is a vertex map containing our mask info from Houdini and the third tag is another vertex map containing our random VW attribute now let's copy our material and assign it to the Alembic file instead of the user data RGB node that we used we can drag and drop the vertex color tag to the network and connect it to the color correction node instead of our user that's RGB node and now we have our color data from Houdini which we can adjust it using the colour correct node and instead of our colored leader note bring in the random VW vertex map and connect it to the arrange node instead of the color jitter node now as we no longer using the color editor we can add a range of your random b/w tag and set the outputs min to 0.5 and output max to 1.5 and there you have it you can see we had a very similar result what we had before now if we want to generate our own colors from scratch using the mask attribute from Houdini let's simply duplicate our material again and assign the new one to the LM big file and drag in the mask tag and use it as the beauty shader for now I'm going to press ctrl tab and add a ramp RGB node use the mask map as the ramp input and connect the ramp to color correction input use the standard surface shader as the beauty shader and we can add any color we want here let's say vibrant red as the first color and orange as the second color in the middle and a nice yellow as the last color you can obviously change the colors add more colors in between but if you wanted the exact colors from Houdini you can use the vertex color tag which was our previous material okay and that's it lets me know what you want to see next hopefully you'll learn something subscribe to magrav plus for more make sure to visit our website magrav plus come or our Gumroad page add comrade come slash McGruff plus and check out our premium rendering and motion graphic courses for cinema 4d 3ds max Maya Arnold Corona very Maxwell and so on please like share and subscribe for more videos from agra floss it was commented as you with you see you next time fox [Music] you
Info
Channel: MographPlus
Views: 32,796
Rating: 4.931663 out of 5
Keywords: Cinema 4d, Houdini, mograph, CG, 3D, vfx
Id: hZOZZhoqyzQ
Channel Id: undefined
Length: 38min 5sec (2285 seconds)
Published: Sat Apr 11 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.