Rhino Grasshopper How to Use Image Sampler to Create Pixelated images | DCO Graphicstudio | Skillshare

Playback Speed

  • 0.5x
  • 1x (Normal)
  • 1.25x
  • 1.5x
  • 2x

Rhino Grasshopper How to Use Image Sampler to Create Pixelated images

teacher avatar DCO Graphicstudio

Watch this class and thousands more

Get unlimited access to every class
Taught by industry leaders & working professionals
Topics include illustration, design, photography, and more

Watch this class and thousands more

Get unlimited access to every class
Taught by industry leaders & working professionals
Topics include illustration, design, photography, and more

Lessons in This Class

8 Lessons (33m)

    • 2. IMAGE SAMPLER 1

    • 3. IMAGE SAMPLER 2






  • --
  • Beginner level
  • Intermediate level
  • Advanced level
  • All levels

Community Generated

The level is determined by a majority opinion of students who have reviewed this class. The teacher's recommendation is shown until at least 5 student responses are collected.





About This Class

In this class you will learn how to use the Image Sampler component and create some cool pixelated images using Grasshopper for Rhino. Grasshopper is a bit intimidating at first, but with some experience it can become one of the most useful tools. These tutorials are great for students who are trying to expand their design arsenal. They will allow you to create some complex and impressive designs in a quick amount of time. The steps in this tutorial are useful for many other applications. So make sure to follow me for future lessons, and let me know if you have any questions, or ideas for future videos. By the end of this course, you will have a better understanding of how Parametric Design works and how you can apply it to your specific use case.

I highly recommend this lesson! Why?

  1. It is simple and straightforward with full explanations of the process of parametric design using Grasshopper.

  2. I will show you a real world example. By the end of the lesson you have a useful script that you can use to share with your firm, or impress your friends and teachers.

Who can benefit from this lesson?

  • Beginners who want to learn Grasshopper and Parametric Design

  • Architects

  • Engineers

  • Design students

  • 3D modelers interested in parametric design.

  • 3D Print designers

Meet Your Teacher

Check out my website for more Parametric Courses and Scripts


Here you will learn about Architecture and Parametric design along with other 3D modeling tools   


See full profile

Class Ratings

Expectations Met?
  • 0%
  • Yes
  • 0%
  • Somewhat
  • 0%
  • Not really
  • 0%
Reviews Archive

In October 2018, we updated our review system to improve the way we collect feedback. Below are the reviews written before that update.

Why Join Skillshare?

Take award-winning Skillshare Original Classes

Each class has short lessons, hands-on projects

Your membership supports Skillshare teachers

Learn From Anywhere

Take classes on the go with the Skillshare app. Stream or download to watch on the plane, the subway, or wherever you learn best.


1. INTRODUCTION: Hi and welcome Atika Graphic studio. This is a fully parametric tutorial using grasshopper or right now, and I'll be going over all of the steps that necessary to create that type of structure. So if you have any questions, make sure to let me know in the comments. This video is perfect for designers, architect students and anyone interested in parametric design. So let's jump into the tutorial and I'll show you how to get this done. Okay, so in this tutorial I'll be going over a grasshopper script that shows you how to use the image sampler. And this image sampler is a component that needs to bees with a few other components, like the grid of something called remap numbers. And we can use polygons. We could use circles. And so I go through a few different exercise, assess you the range of, you know, a variety of things that you could do with this image. Simpler, like, you know, we can come here and increase and decrease the exact size of the big pixels and the small pixels. We could always come here an increase or decrease. You know, the quality of the size. So we go 2.1 and we increase to 100. We see that were able to increase the quality by changing the decisive the pixel. So the size of the pixel is that 0.1 that gives us a good quality. But as we increase the quality, let's see, let's say the 0.3 and we go here. Do see 30. We see that depending on the size of the pixel, we can increase or decrease equality. And so this is what we'll be using for our exercises, this type of move. But we at the end will be able to extrude and do some cool three D effects with same pixelated type of look. So stay tuned. And if you have any questions, please make sure to let me know. 2. IMAGE SAMPLER 1: Okay, so it's a start. I'm gonna bring in the image sampler, and you can double click here and go toe image sampler to bring in the image sampler component. And what it will give you is an input in an output, and you'll have this exclamation mark because we don't have any images brought in yet. So if you want to bring something in, you could double click, and you go here to file path. You can bring in an image this way, but there's an easier way to bring something in, Um, and that would be to bring in something like this an image and then just drag and drop it in. In that way, it'll bring it in into a components already. Now, before we start, there's a few things you wanna just on this image. When you double click here, you're gonna see some options here at the top, and what you want to do is make a decision as to how big you want the image to be. So for me, I'm gonna make it 10 by 10. So 10 units it could be 10 inches or it could be 10 centimeters. It really doesn't matter what units you have in your drawing. What matters is that you know how big the image is gonna be. So give it a dimension from 0 to 10 0 to 10 on the exit and the white, and this is a perfectly square image also. So keep that in mind that if you have a landscape image, you're gonna want to adjust for those ratios here in the X and y, but we'll move on. And then here in Tieling, this will give you, uh, an idea as to how the image is gonna tile if you make the great a little bit bigger. But I'll show you that in a second, then well, you're gonna want to do is do the color brightness for what? For today's exercise and click on interpret. So these two are important tile, and these are not that important. We'll leave it on Tala for now, but also give it a dimension. And then you'll see that the path is already set from the location where you had it. And then we can leave everything else, um, kind of defaults. So saving filed, meaning that it will actually save it with your grasshopper and write a file so we'll hit. Okay, here. And this will give you a preview and it will give you from 0 to 10. Give you the dimensions of how big the image is gonna be. So we'll hit, OK, and we'll see that we still have nothing kind of working. And that's because we want to bring in a grid. And what the great is going to do is it's gonna act as our pixels for this image. So let me go ahead and show you how we bring that in. So you got a vector here. It's got a grid square grid Teoh make. I think you know, equally spaced pixels will use this. And so, as you can see here, it will bring in a default of size. Let's see here, sites of one extensive five and extensive. Why, it's gonna be five cents a five by five grid and the size is one. What we want to do is create a grid that fits in this image, and this image is 10 by 10. So it's also go ahead and bring in a rectangle that's gonna act us our frame for where the picture is gonna be so we know that this is 10 by 10. So we'll go ahead and bring in a slighter of 10. And now we have an X and A Y better 10. And now we see that we have this rectangle that we're gonna use as our guide to know how big the image is gonna be. So this rectangle isas bigas the image. And right now we have this grid that's inside of this rectangle. We want to be to fit within that rectangle over this square, and we want to be able to change the density. So let's go ahead and do that. Let's go ahead and give a decisive 0.1, and we'll see that we create a very small grid. So that's a small, um, that's a small amount of pixels or there's the size is small. And then we have extent X and Y five. So we want to increase that. Let's say to will bring in a slider of 100 I will plug that in, and we'll see that we've actually gone beyond or actually were perfectly at the edges of it . So we're gonna use this grid as our pixels for this image, and then we're gonna be able to adjust the size of the circles to react to this image. So let's go ahead and do that. Let's bring in the circles. What we want to do is for the points. We want to plug them in right in here. And we also want to go here two points and flatten. And once we have those points in here, we can plug in. This points to the plane and we'll see that we have really big circles. And right now this is the how big the pictures are. So it was gonna 0.1 here for radius we have. If we actually make this bigger range, we can see that we can. These we're gonna be our pixels, and we want them to react to this. So the radius, it's actually gonna were gonna go plug this right into the radius here, and we'll see that we have some some reaction. We have something going on, but the the size is a little bit too big for all of the circles. We want to decrease the size and to be able to do that if you look here, we have a large amount of information coming in, and we want to make it smaller. So we want to divide. So we'll bring in a division component and will plug the image right into the division. And we're gonna divide all the values by, let's say, 30 and then we'll plug that right into the radius here, and we'll notice once we hide the grid that we start having the image show up. And this rectangle brings in a construction plane here at the bottom left that it's a bit hard to see so we can go ahead and hide that. Now that we see that we have filled that image all the way and by increasing or decreasing this lighter, we can go to, you know, make the circles a little bit bigger or a little bit smaller. So in this way we have a bit of control as to having the geometry and the circles not overlap one another. And so this is the basic way to be able to use a curve, a tractor or a image sampler kind of massacre of a tractor and deformed these circles, and we use a division to be able to decrease the size 3. IMAGE SAMPLER 2: now. The other thing is you could take this one just because sometimes the components a little bit big and you could stretch it down. Teoh. So it's a little bit smaller and it fits within your script a little bit better. But here's the other thing that I wanted to share with you guys is right now we have that amount of pixels. But if we wanted to make it a lower resolution image, we can always go here an increase this well, making a Mexico five and will increase the range. So we have more or the rounding. So we have more decimal points, so we have better accuracy. And so we could see we could increase the size of the pixel. But we also have to decrease the size of the grid simultaneously. And then we have to come back here and adjust maybe some of those to be a little bit bigger . But as you can see, the bigger the pixels, the lower the resolution we have for the image so we can go here 2.5 and we'll see that when we come here. And so this is also a good example, is to show you some of the options when you So here we go. I'm gonna adjust it so they don't all overlap. But when we go here, when we see here, we have the image copying over and over once it goes past the image size. So in here we have the image size 0 to 10. So that means that from here to here we have a 10 ah, unit of 10 10. And once it goes past it, it actually tiles it. Now, if I go here to plant, it'll actually just do one. It'll do this one, and then the rest. It'll just do the biggest size. And then if you go here instead of legal flip, it kind of creates a flipped image premiered image and every other, uh, tile. And so, for now, I'm gonna leave it on tile. But as you can see, that's some of the options that I want to share with you guys. So you know how this damage sampler words. And so if we go here to size, we increase that, but we can always come back and decrease that here too. 20. And then there. We have a very low resolution pixel image of this. And like I said, we can always come back in here 2.2. We see that it's a low amount. We come back here, we can increase this on and then always come back and adjust this to have a high resolution image. So for the next exercise, I'm gonna show you how to be able to take this image sampler and actually be able to adjust and know what's the smallest size and what's the biggest sites using, um, the same technique as I used for curva tractors. So that's what I'll be showing next. Okay, so on this lot in the previous exercise, we did this simple way of adjusting the size of this circles. Right? Well, the issue is that if you notice here, the black is actually where we want the big circles. And the white is where we want the small circles. But when we could go ahead and look here, um, we see that it's the opposite. We have the small circles on the outside of the big ones on the inside. So to change that and be able to pick which ones are big and which ones are small. We're going to want to bring in a few components and let me show you those. The first one's gonna be, um, remap numbers. And so this is gonna be our how we're going to re map all the numbers coming out of here, and we're going to remap them, being able to choose a big and small number. So we're gonna bring in all of that information first into the value than under source. We were gonna want to bring in the balance. What that does is it brings it tells you the biggest and smallest number. So we plug in here, we see that the biggest, the smallest number zero and the biggest numbers 00.8. And so we're gonna plug that right into the source. And lastly, the target. So we're gonna for the target. We're gonna want to go give it a minimum and a maximum. So we're gonna go construct. Okay. If it's not there, we go here to domain construct domain. And so you see here and domain here, we'll gonna plug in, plug in the domain into the target, and this will give us the ability to so weaken Delete this division. And now we can go from 0.1 to, you know, we'll go to five year. A maximum of five will increase the rounding. And that way we have a start. And let's go to in and and then will be using these re mapped numbers as a radius. And so, you see, if we have both the start and then domain as the same size, all when we're gonna be the exact same. But if I go ahead and increase this number and decrease this number, you see that they start adjusting for this piece lighters. So that's what's gonna be give us a really cool effect is being able to pick which ones there that think once and which ones are going to be the smaller ones. And so that's how we do it. And quite honestly, it's a little bit confusing and a little bit intimidating to see these weird components of remapping and numbers domain and all this stuff. But quite honestly, once you do it a few times and you kind of get used to almost always bringing in these three components together, then you'll start to realize that you're able to use this for many other things for curve attractors, for extruding for many, many things. So make sure you keep that in mind. You bring in the original information to the value than that original information into bounce where it gives you the minimum and maximum number. And then we're gonna want to bring in this component called domain. So it creates a domain from, you know, start number two and number, and that's gonna be our target numbers. And then those numbers are re mapped all over and gives us our new radius that we could always come here and I'm gonna decrease in this. So it's easier for us to see. I'm gonna go to eight to here but were able to come here and adjust the pixels. Like we said earlier. We want the small ones in here and we want the big once on the outside as how the images and we can still come back here and increase the quality by going here and saying, See, you could almost see the perfect image. Uh, right here. And so I wanted to show you basically how to be able to remap the numbers that come out of the image sampler to be able to adjust the pixels using circles 4. IMAGE SAMPLER REMAP NUMBERS: okay. And for this next exercise, I want to show you that you don't only only have to use circles, we could go ahead and delete that and bring in polygons and in the same way that we did the circle. So plug in the points for the plane is gonna create polygons all over all those points. And then we're gonna go to map numbers and go to the radius here and then see that we actually have a cool effect created using Texas wants. But we could always come back here and go to a you know, three dot dot dot 10 from 3 to 10. We're able to bring in here the segment size, and we can see that you could also create it using just triangles. And we can go here too. See, 0.5 five, and we can increase some of this to give it a interesting effect. Now, I personally like using four. It creates a cool like a tile effect, but we can still come here and decrease some of this because they are overlap e. So I don't like really like them to overlap. I like them to almost touch. And that way creates a cool, um, pixel, but it's more like a, you know, a diamond want. So what I wanted to do is right now we have way too many too many pixels, so I'm gonna decrease the intensity of it. I gotta 0.3 and then see if I can bring this back down there is gonna be 30. So there we go. We have those. And now we we Since there are more spaced out, I'm gonna increase some of this sighs like that and show you how to color it. So we have these pixels and to create a plane in between those we're going to bring in a compartment called Boundary Surface. What about the services? Does is it creates a plane and between a close polly line. So if you go to polygon here and plug that in there, it will take a little bit of time because we still have a lot of polygons and a lot of information, but it'll create a plane right inside of those. So there we have the pixels. And now, um, to color it, we could just bring in a custom preview and that will allow us to put that the services into the geometry and it'll default to pink. But if we go here to Swatch, so go to color Swatch, you can go here bottom right pic black. And then we go to Shader there. And now it's way easier to, um, you know, see the design. And for the next exercise, I'm gonna show you how to use this image and change it up and see what the results are using not just this black background or using a white background. And so let me show you that. 5. IMAGE SAMPLER POLYGON AND PIXELS: Okay, so I'm gonna double click here and go to file path and just change it to the other image that I have. So let me find the location of the reference image. Copy it over to here and now be able to They started here. So I have these other ones. Uh, I'm gonna do just this black and white one, just to show you what it looks like. So there you go. That's what it looks like. One. You know, you have a really low resolution one. It doesn't really result it that well, even if go increase and decrease some of these size, it's not gonna, you know, it's not going to do much, So let's go ahead and take another one. So, depending on what image you have, how much information you want out of the image, you'll either get a good result or not. So here we see that it's not necessarily the best where the pixels land in this image are just kind of random locations, and sometimes it takes a really dark area. Sometimes it picks a medium area, so it doesn't really work that well. Um, let's try this one. And so Yeah, this one looks not too bad. This one looks pretty cool. Um, we have almost creating a checkered effect here. And then we have this piece pixels increasing and decreasing, and the further out you go, you can see it better. So that's a cool. That's a cool little effect that we can create using. You know, the image simpler and shading with some colors so we can see the final results a little bit better. And that you can see out here. There should be there is, like, zero, because we made it, um, the smallest number zero. But if you increase this just a little bit, we'll see that the pixels here where you have kind of the white area it it's actually going to increase, too. So and one of the reasons why it updated so fast last timeless because since these air at zero, just enough to draw them. And since here it has less information, it's able to draw it quicker. So that's another thing to be aware of is that some of these commands are gonna be really heavy on your computer, and so you may want to maybe leave off, um, doing the the boundary surfaces that we have here until the end. Once you have a kind of the result that you want and then you can plug it in. Otherwise, it'll take a while for thanks to update. So if I were to just take away this one and just kind of play around with it, it wouldn't it wouldn't be a big deal. It would be easy for me to just go here, Here, here, here. And then once, I kind of have something cool. Then come in here and do the polygon and plug it in. Or, you know, come here and adjust some of these to create. You know, you can go up to nine and 10 and almost creates a perfect circle. Or you can go back down to, like, a Pentagon. Um, and so, yeah, that some want to show you some some more ways of being able to use, uh, this image simpler 6. IMAGE SAMPLER EXTRUDE: Okay, so the last thing I want to show you for, uh, the curve a tractor lesson is something that it's kind of unusual, but I feel like it will help you visualize how many range of you know uses these components have a swell as this image sampler does. So what? I'm gonna do something to decrease the quality. I'm gonna go 2.5 here. And the reason I'm doing that is because I I do want to, um, not make it so big us to making it really happy for it to compute some of the some of the work that I that I'm gonna do right now and you'll see why I'm actually going to extrude these pixels and they're gonna be extruded dependent on the size that they are. So the bigger the science, the bigger they're gonna extreme. And the smaller the size, the smaller they're going to extrude. So let's go ahead and try that out. Let's bring in the extreme compliant double click and go to Extreme, and we're gonna plug in for the base. It's gonna be our geometry, gonna plug in the polygons, and we're gonna want to right click here and go to graft. And now we're gonna extrude these in what direction? We're gonna street him up in the Z direction. And now what am I gonna plug in? I'm gonna plug in those seem mapped numbers right into the Z vector. So right now we have it. See? It's just gonna extrude up one, So Okay, that's kind of cool. You know, we have a three dimensional, uh, like type of look, But if we want it to react to the decisive it, we're gonna want to also graft this one. So both of the information comes in the right way, and we're gonna bring in that map number into here, and it'll take a little bit of time, but you'll see that it actually did that, how we wanted it. We have small pixels down there and we have the big pixels here. And so that's a that's give said another level of information that it can create. So if we go here to cap it creates a top in the bottom for everything, and so we can see here that we've created, you know, a more three dimensional pixellated image, and we can always come here and adjust, uh, the max embers of 0.25 and we'll see that the pixels adjust accordingly. And so that's another way of using that you can use construct domain and remap the numbers . You can also use it for extrusion. The other thing you could do is you could also rotate them that that amount. So if we were to take all of these objects and rotate them the same amount as how big they are, we can start, right? So I'm telling you, there's so many options and stuff, so many things that we can do with this type of configuration. And then here at the end, we can just say, delete that the that one from before bringing in the black pixel CIA And there we have a really cool, pixelated dog. And then, yeah, I don't want to increase the quality here, because I know that it's gonna be really heavy, and it's gonna take a lot of time. Um and so, yeah, I hope you learned something from this tutorial. I will be doing more tutorials on more applications on how to use some of this some of this stuff, so stay tuned to spur some of those tutorials. But like I said, I hope you learned something new and you enjoyed this tutorial. And if you have any questions, please make sure to let me know. 7. IMAGE SAMPLER PROJECT TO SURFACE: okay. And so if you wanted to take this information and not just keep it flat or where it's treated, you wanted to do a little something a little bit more complicated. One thing you could do is take all of this information and actually projected up. So I'm going to do take this and do a boundary surface. So that's gonna be the, you know, we created the extent of the frame on there, So I'm gonna take this and I'm just gonna bake it. What that's going to do is bring it into the default layer here, and I'm actually going to go here to hide preview. And here I'll go to Shaded, and I'm gonna go ahead and do a cage at it bounding Box World and then use the defaults there. And that way I can use these control points to deformed this plane. So I'm going to go ahead into like those and move them up and create kind of this vaulted, uh, roof temple it. I'm actually gonna pick piece four here at the top and pulled just those up so it creates more like a dome. Don't look and I'll go ahead and delete that now and now this plane, we're gonna want to bring it to, um, Grasshopper is now. You see, we have kind of a dome type structure, and we want to go here to be read, so DoubleClick could bring in this component called Be ready. And what you're gonna want to do is select the beer up here. Right? Click here. Good to set one, direct. And now we've successfully brought this surface into now, Grasshopper. So I'm gonna go ahead and control h to hide, and then I'm going to also hide the preview of these. So selectees to space bar and high preview. And what I'm going to do is I'm gonna take all this information, and I'm gonna project it up to the to this geometry. So sometimes you'll see that you'll get these weird, jagged edges. So you're gonna want to increase the quality here on the top, right to high quality, and then it'll give you, like, a crisp nice edge. Now we have this bureau and we have all of these politicians. I'm going to go ahead and move this over, and I'm going to take these thes polygons and I'm going to project. So I'm going to bring in a component called Project from Jax. Since we're gonna be Project Curb on to be rep. That's what we want. We want to take thes polygons these curves and project them right onto the B rep. And so now we have the ability not just to have a two dimensional, um, image. But what school is that? We can take these problems that we projected we can hide them. And now we see that we have that type of look created, um, inside on inside of this geometry. And so that's I feel like that's pretty cool, because you could always come here and go to show. Take this in the cage or, um, let's see bounding box. And then I'll do skill in one dimension cell scale this up. So if they scale this up, we'll see that as soon as I delete this, we have, um we have everything adjusting to that form 8. IMAGE SAMPLER OTHER IMAGES: The other thing I would do is if you wanted to go online, um, and just go on Google and say radio black and white, radiant. We can go here to images and then just pick, you know, on interesting, uh, radiance here of how we want our image to look, So you just take, you know, if you want ingredient like this bio balance, actually, rectangular want a square one? So this was pretty much square save image ass. We could go here to reference image, and then come here and adjust this. Change this to our other references. Invention ingredients. Good. Open hit. Okay. And we'll see that. Are, um our image now is updated, and now it's creating, like, an interesting reading where it's solid here at top, and it opens up. But we can always come here and do the opposite. We can say point one. Uh, 0.15 is going to be the big or the small is gonna be become big, which is gonna be big here. And in these 0.1 could be the small ones on the outside. Since you can see, this gives a sim versatility of and some applications as to how to use it may be an architecture, and you don't necessarily need a curb a tractor, because this is something that you could get a result as a curve, a tractor. But if you want to, you can go on photo shop and just create. You know, the curve of where you want the pattern to adjust and it'll adjust. Heard of that image? So that's another level of you know, of how to adjust the geometry just by using an image. Thank you very much for watching the video. And if you like the separate content, make sure you check out the list of tutorials that I have it because there's other kinds of Parametric work that I do that might be interesting to you. Also, don't forget to check out that link that I have here at the end of the video and play around and download the script so you can learn it a little bit better and see how it worked