Cinema 4D Lite Reference: What are Shaders and how to use them

Share this video
  • Duration: 07:48
  • Views: 5264
  • Made with Release: 16
  • Works with Release: 16 and greater

What are Shaders and how do we use them

The components we use to tell any material channel what to do, are either Bitmaps, or Shaders. A shader can be a simple colour, a fractal noise, a colorizing effect, a pattern, a gradient… pretty much anything. C4D Lite, comes with an abundance of shaders and we can use them inside ANY material channel.

show less

Transcript

- The components we use to tell any material channel what to do are either bitmaps or shaders. A shader can be a simple color, a fractal noise, a colorizing effect, a pattern, a gradient, pretty much anything. Even bitmaps can be considered some sort of shaders. Cinema 4D Lite comes with an abundance of shaders and we can use them inside any material channel. Let's take a look at a few of them and understand how the shader stack works. First of all, let's take a look at the shader stack interface. Let's double click here in the gray area and create a new material. Double-click on the material to bring up the Material Editor. What I'm going to do is turn everything off and just turn on the Luminance. That is because here we can see the shaders and the colors without any interference. I'm going to apply the material to the sphere just so that we have some sort of preview over here. Excellent. Now with the channel selected, you will see that it says "Texture", and this is empty. This means that there is no shader loaded in the shader stack. If I click here, I'll see everything I can add as a shader. Now, let's begin with this. This is the base color. If I choose to add anything here, let's say, for example, I add a noise, then if you add something here and your mix strength is 100%, then it overrides this color 100%. Let me make it red. As you can see, there is no red to be seen. But as I make the mix strength lower, then more of the underlying material is shown and less of the shader stack. Normally, you would either use this, if you just want to colorize things, with a single color, or if you add a shader, then you will work only here and won't bother with this at all. Of course, there are exceptions and you can use it, and it's up to you. You can have some mix modes here as well, but there are only four. Let's leave this as it is for now. If I want to edit a specific shader, all I have to do is click once on the icon here and this will allow us to see all the settings that have to do with a specific shader. Each shader has a different set of settings. So as far as noises are concerned, we only have two colors and we have a seed for the randomizations, and then we have the noise type. You can always go here and select one of these, but it's better to go over here and select visually. Play around with these and you'll see that you can change the size of it, you can change the size on one of the three dimensions, and you can create interesting things by playing around with these parameters. To move out of this level, you can either press on this arrow and go up a level, and then click Back and go down, or you can just click here and go right to the top. Now, I'm going to delete this. Go here and say "Clear". Now, we have no shader, thus the color is visible. Let's check another one out, the gradient. Click here, and we can see the gradient parameters. Don't forget, wherever you see a black arrow, click on it and you will see more information underneath. If you're wondering why this may look different from what you are seeing, just go here and change what type of color interface you have, the color chooser, so to speak. I prefer the Enhanced Color Table. You can click and drag, and colorize the specific knot. Let's talk about another one now called the "Fresnel". Now, the Fresnel is a funny one, because if I move my camera around you will see that, oddly enough, the sphere looks the same from every angle. This is because the Fresnel is an instance-based shader, which means that it calculates the color of any point on our 3D model based on the camera angle. So if I click here, the interface is a simple gradient and what this gradient tells us is the color that's here on the left represents the polygons that are facing away from the camera. Whereas, the right part of the gradient represents the color the polygons are going to have facing the camera directly. What this allows us to do is create interesting effects. For example, let me choke this and now I've created a white rim around my sphere. In this scene, I have my helmet without my complex materials. I've just set an environment and a slight orange color. So as you can see, it's reflective all over. But I want to add an effect of a backlight on the whole model. How can I do that? Well, if you go to the Luminance channel and add a Fresnel, what we can do is make sure that we have a highlight only on the edges. Click on here and let's choke the gradient a bit, and there you go. With just a very simple move, you've created a helmet that has a backlight effect, although it has nothing to do with light and nothing to do with reflections. But these are just some examples of how you can use the Fresnel shader. Finally, let me show you a set of my favorite shaders. Let's select the Color channel, go to Texture, go all the way down to Surfaces, and let's go to Tiles. If you click on the tiles, you will see that we have this grid. But if you go to the pattern, you can change it to brick, you can change it to hexagons, you can change this to lines, and there's plenty of different patterns you can choose from. If I turn off the Luminance and the environment, and let's go around and play. Let's make it smaller to add more lines. We can change the grout width and the bevel to blur it out, we can change the colors, and so forth. Overall, the tiles allow for a huge selection of different patterns to be created. Lastly, I'm going to talk about the most powerful of all shaders, and that is the Layer shader. Currently, it's black. Let me apply the material to my helmet and let me render, and you will see nothing. If I click on the Layer shader, it has this empty palette. Here, we can add any other shaders and mix them together. So for example, I can click on Shader and I have my full shader palette. So let me go to Surfaces and get some tiles. Now, we have the tiles applied. Now, let's change our projection from UV Mapping to Spherical. That looks a bit better. Now, what I want to do is overlay a different set of tiles. So I'm going to select this just by clicking once. Change this to Lines. Change the color to something like green. Press Okay. Let's go up a level, but I want the top tiles and the bottom tiles to mix in a certain way. Well, look at this. We have all these different modes. So we can add them together, we can screen them, we can multiply them, and so forth. So as you can see, by combining layers in the Layer shader, we can do extremely powerful combinations and create unique shaders of our own. Now, you know how to start experimenting with shaders and combining them in the Layer shader, which is the shader of all shaders. Have fun.
Los componentes que utilizamos para contar cualquier canal de material de lo que hay que hacer son o mapas de bits o shaders. Un shader puede ser de un color simple, un ruido fractal, un efecto colorizing, un patrón, un degradado, casi cualquier cosa. Mapas de bits Incluso se pueden considerar una especie de shaders. CINEMA 4D Lite viene con una gran cantidad de shaders y podemos usarlos dentro de cualquier canal de material. Vamos a echar un vistazo a algunos de ellos y entender cómo funciona la pila de sombreado. En primer lugar, vamos a echar un vistazo a la pila de sombreado interfaz. Vamos haga doble clic aquí en la zona gris y crear un nuevo material. Haga doble clic sobre el material para abrir el Editor de materiales. Lo que voy a hacer es girar todo lo que fuera y acaba de encender la luminancia. Esto se debe a que aquí podemos ver los shaders y los colores sin ninguna interferencia. Voy a aplicar el material a la esfera simplemente para que podamos tener algún tipo de previsualización aquí. Excelente. Ahora, con el canal seleccionado, se verá que dice "textura", y está vacía. Esto significa que no hay shader cargada en la pila de shader. Si doy clic aquí, voy a ver todo lo que puedo agregar como un shader. Ahora, vamos a empezar con esto. Este es el color base. Si decido añadir nada aquí, digamos, por ejemplo, añadir un ruido, entonces si se agrega algo aquí y su fuerza de la mezcla es de 100%, entonces que anula este color 100%. Quiero dejar rojo. Como se puede ver, no hay ninguna roja Pero mientras mezclo la fuerza inferior, a continuación, más del material subyacente se muestra y menos del shader pila. Normalmente, lo haría bien el uso a esto, si lo que desea es colorear las cosas, con un solo color, o si se agrega una shader, entonces usted va a funcionar sólo aquí y no se moleste con esto en absoluto. Por supuesto, existen excepciones y se puede utilizar, y le toca a usted. Puede tener algo de mezcla de modos aquí también, pero sólo hay cuatro. Vamos a dejar esto ya que es por ahora. Si quiero editar una shader específica, todo lo que tengo que hacer es hacer clic sobre el icono aquí y esto nos permitirá ver todos los ajustes que tienen que ver con un sombreado especifico. Cada shader tiene un conjunto diferente de valores. En lo que a ruidos se refiere, sólo tenemos dos colores y que tienen una semilla para las asignaciones al azar, y entonces tenemos el tipo de ruido. Usted puede siempre ir aquí y seleccionar uno de éstos, pero es mejor ir aquí y seleccionar visualmente. Juega un poco con estos y verá que se puede cambiar el tamaño de ella, puede cambiar el tamaño de una de las de tres dimensiones, y puede crear cosas interesantes, a jugar con estos parámetros. Para salir de este nivel, puede pulsar sobre esta flecha y subir un nivel, y luego clic en Atrás y vaya hacia abajo, o simplemente hacer clic aquí y vaya derecho de la parte superior. Ahora, voy a eliminar esto. Vaya aquí y decir "Borrar". Ahora no tebemos shader, por tanto, el color es visible. Vamos a ver otra salida, el gradiente. Haga clic aquí, y podemos ver el gradiente de parámetros. No se olvide, siempre que vea en una flecha negra, haga clic en él y va a ver más información debajo. Si ud. se pregunta por qué esto puede ser distinto de lo que está viendo, sólo tiene que ir aquí y cambiar el tipo de interfaz el color que tiene, el selector de color, por así decirlo. yo prefiero la tabla de colores mejorada. Puede hacer clic y arrastrar, y colorear el nudo especifíco. Hablemos de otra ahora llamado el "Fresnel". Ahora, el Fresnel es un ser divertido, porque si muevo la cámara alrededor verá que, por extraño que parezca, la esfera se ve igual desde todos los ángulos. Esto es porque el Fresnel es un shader a base de ejemplo, lo que significa que calcula el color de cualquier punto en nuestro modelo 3D basado en el ángulo de la cámara. Así que si hago clic aquí, la interfaz es un simple gradiente y lo que este gradiente nos dice es el color que está aquí a la izquierda representa los polígonos que se enfrenta lejos de la cámara. Considerando que, la parte derecha del gradiente representa el color que los polígonos van a tener frente a la cámara directamente. Lo que nos permite hacer, es crear efectos interesantes. por ejemplo, permítanme ahogo esto y ahora que he creado un borde blanco alrededor de mi esfera. En esta escena, tengo mi casco sin mis materiales complejos. Acabo de poner un ambiente y un ligero color anaranjado. Así como se puede ver, es reflexivo por todas partes. Pero quiero añadir un efecto de luz de fondo en todo el modelo. ¿Cómo puedo hacer eso? Bueno, si vas al canal de luminancia y añadir un Fresnel, lo que podemos hacer es asegurarnos de que tenemos un punto culminante sólo en los bordes. Haga clic aquí y vamos a bajar el degradado un poco, y hay que ir. Con sólo un movimiento muy simple, que ha creado un casco que tiene un efecto de luz de fondo, a pesar de que no tiene nada que ver con la luz y nada que ver con reflexiones. Pero estos son sólo algunos ejemplos de cómo se puede utilizar el sombreado de Fresnel. Por último, quisiera mostrarle un conjunto de shaders, mis favoritos. Vamos a seleccionar el canal de color, vaya a la textura, ir hasta el fondo de superficies, y vamos a ir a los azulejos. Si hace clic en los azulejos, se verá que tenemos esta cuadrícula. Pero si va al patrón, que puede cambiarlo a ladrillo, se puede cambiar a hexágonos, puede cambiar esto a las líneas, y hay un montón de diferentes patrones que puede elegir. Si apago la luminancia y el medio ambiente, y dejar de ir y jugar. Vamos a hacerlo más pequeño para agregar más líneas. Podemos cambiar la lechada anchura y el bisel para difuminar hacia fuera, podemos cambiar los colores, y así sucesivamente. En general, los azulejos permiten una gran selección de diferentes patrones que se creará. Finalmente, voy a hablar de los más poderosos de todos los shaders, y que es la capa sombreada. Actualmente, es negro. Permítanme aplicar el material de mi casco y dejeme renderizar, y verá nada. Si yo hago clic en la capa de sombreado, que tiene esta paleta vacía. Aquí, podemos añadir cualquier otro shader y mezclarlos entre sí. Así que para ejemplo, puede hacer clic en Shader y tengo mi paleta completa de sombreado. Así que déjeme ir a superficies y obtener algunos azulejos. Ahora, tenemos los azulejos aplicados. Ahora, vamos a cambiar nuestra proyección de mapeo UV para esférica que parece un poco mejor. Ahora, lo que quiero hacer es superponer un conjunto diferente de azulejos. Así que voy a seleccionar esto sólo por clic una vez. Cambie esto a líneas. Cambiar el color a algo así como verde. Pulse Ok. Vamos a subir un nivel, pero yo quiero los mejores azulejos y las baldosas inferiores a mezcla de una manera determinada. Bueno, mira esto. Tenemos todos estos modos diferentes. Por lo tanto, puede añadirlos juntos, podemos detectarlos, podemos multiplicarlos, y así sucesivamente. Así como se puede ver, mediante la combinación de capas en el shader de capas, podemos hacer muy potentes combinaciones y crear shaders únicas propias. Ahora, usted sabe cómo empezar a experimentar con shaders y la combinación de ellas en la shader de capa, que es el shader de todos los shaders. Que te diviertas.
Resume Auto-Scroll?