Follow Along: Adding Roughness

Transcript

In this lesson, we will walk through how to add roughness to a surface of a part. So, I have this part that I also have as a CAD body variable. That one body will work with, and I’ve converted it to an implicit body. So, we’ll need that implicit body since we’ll be working primarily with fields and topology. So, I’ll even show just that fields tab.

So, to create this type of roughness, we’re going to use in the noise section of our fields this Simplex Noise 3D. So, I’ll add that to my notebook and add that in for the texture reference. So, I’ll make my frequency a variable. This is a bit of a larger part, so I’ll also increase that frequency. But first, I’ll right-click, make this a variable, and my frequency I’ll make 100, and I will turn off that visibility. This is an infinite field, so I’m first going to just type F to see. I’ll also increase that size for our field viewer to 2,000.

And if I look at this from the bottom view, for instance, we can see this field that we have that looks a bit random is going to add that roughness that we want. If I press my values, you can see that these are values ranging between -1 and +1, and they are unitless. And what we’re going to do is have the scalar field as an input for our Offset Body. So, in certain areas, it’ll offset it by a lot outwards, some it’ll offset it inwards. So, I’ll search in my search bar for that Offset Body. The body we want to add that roughness to is our smooth part, and I can’t immediately put this Simplex Noise in because we don’t have any units of length.

So, and before I do that, I’m going to multiply this field by 1 mm. So, I’ll just write that in here and say multiply our Simplex Noise 3D by 1 mm. We can already see we’re starting to see that roughness. If I turn off that smooth part onto our surface of our part all throughout. Now, if I look at that field we just made, that Multiply Simplex Noise 3D by 1 mm, if I type F, we can see it looks the same. It just has these units. So, if you’re unfamiliar with fields, I recommend reviewing some of this in our intro to fields course. We also talk about fields in greater detail in our intermediate fields course as well. But really, just to summarize, if you have a field that has no units, or maybe it’s in millimeters squared or in a different type of unit system, all you really need to do is multiply or divide by 1 mm, and that will allow us to use this as a thickness or whatever input you have. So, always make sure you have those right units. This multiply is also helpful because we can increase that surface roughness that we see, having it a larger offset, lower offset. So, for instance, I’ll close my field.

Now, if I multiply this by 5 millimeters for instance, we can see that we have a lot more of that roughness coming off the surface just because instead of it ranging from -1 to +1, it’s now from -5 to +5. I’ll keep this at 1 mm, but what I can do is if I want to have maybe a smooth surface at one end, maybe this space, and I want it to become rougher as we go along my parts, then we can use a ramp for our multiply so that we have that varying of that offset. And again, if you’re unfamiliar with ramps, I recommend looking at our intro to field driven design course.

But first, I’ll right-click, make this a variable to keep our notebook nice and organized, and just label this rough part. And I’m going to use the same Simplex Noise 3D and just change that multiply. So, what I can do is just right-click on our Offset Body and duplicate this variable so I have all those inputs the same. We’ll just change that multiply, and I’ll rename this by double-clicking, “varied roughness.”

So, to create that varied roughness, I’m going to type in “ramp” to get our Ramp block, and I’ll turn off the visibility of that. So, our smooth part again, and for our preference for how we’re going to change our roughness, I’m going to use Plane from Normal for that change. I want it to go along the Y-axis, so I’ll make the normal 0, 1, 0, and I’m just going to move this over. And I’ll make this a little bit past that face, so anywhere that is below this plane, so anywhere to the left, is going to have that smooth surface. And you could use the variables from our smooth part, so in the block details and the properties, you could choose some of these items in the bounding box. You either add and subtract to say, “I only want it to be 10 mm past that surface each time.” That bottom surface, you can play around with those options, but I’ve just dragged and dropped it for this instance.

I want the change to begin of our roughness at 0 mm, so when we are right at that plane, that’s when we’ll start to see some change. And I’m going to end that change 1,000 mm past that. So, that’s going to be going through basically our entire part, as you can see. I can drag and move this ruler, so if I lined up my plane, we can see that that’s going to cause that change all throughout our part.

Now, the change that I actually want to see that we’ll put in our out Min and out Max is going to be that roughness. So, I want to start with no roughness at all, so that offset will be 0 mm, and I have to add in that millimeter so that we have those units to our Simplex Noise 3D. And our out Max is going to be 5 mm, so we’ll have that very large roughness, and I’ll have geometric continuity. So, I’ll turn off that smooth part so you can see exactly what this looks like. But what we see is I have this smooth surface, and then as we go further to the right, I have this roughness. And to see a better gauge of what this looks like, I’m viewing this in medium resolution, but I could select this implicit body, go to view, and then precise render or type Ctrl+H, and we can see how rough that part really is. So, you can play around with that roughness, see that smoothness, and that’s how we can add roughness to a part. So, of course, application of this is replicating additive manufacturing, that roughness that you might have on certain surfaces, met smoothness on others. So, you could use the Simplex Noise 3D, for instance, to create that same type of surface.

In this lesson, we will walk through how to add roughness to a surface in nTop using the Simplex Noise 3D block and the Ramp block. If you are unfamiliar with the Ramp block, please visit our Intro to Field Driven Design course before reviewing this lesson.  

Please download the nTop file below to follow along with the tutorial.

Example File:

This file was last updated in nTop 5.13.2

311_8_Follow Along – Adding Roughness.pdf