 Hi everyone. Welcome to this introduction to GAFR. GAFR is a lighting and lookdev application, which is open source. Today we're going to render an asset called GAFRBOT using GAFR and AppleSeed, which is an open source renderer that ships with GAFR. So let's start by going to GAFRHQ.org and we're going to download GAFR. So we can either use the Linux version or the Mac. In my case, I'm going to use the one for Linux. Okay, so now we can go ahead and extract the archive by simply right-clicking and say extract here and now we can go into the GAFR folder and to the bin folder and we want to copy this path and add it to our terminal config file. So to do that, I'm going to open a terminal and then edit this config file, which in my case is called bash rc because I'm using the bash terminal. So let's go all the way down. So we want to type export path and then paste the path semicolon and then dollar path and finally we save. So doing this will allow us to know that we create a new terminal, just type GAFR and then the GAFR UI will pop up. Okay, so let's go over the UI briefly. Up here we have a first panel, which is the viewer. Obviously it's going to let us view our 3D or 2D data. Down here we have the node graph, which is going to be where we create and connect the nodes together to create the scene. Here we have the node editor where we can edit the parameters of the nodes. And finally we have the senior key here. For viewing the hierarchy created by the nodes in the graph. So let's start by creating a scene cache and load the GAFR bot inside GAFR. So we're going to do right-click on the node graph, go to the scene, file and reader. So this is the node that allows us to read in the scene cache. So for the filename, we're going to use a handy little variable called GAFR root. So to use variable here in the path, we use the dollar sign and then curly brackets open and close. And then we can type the rest of the path. And this environment variable points to where GAFR is installed. So I'm going to use an extension file, which is SCC. That's a scene cache format that is native to GAFR, but you can also use LMBIC. Now that we have loaded our cache, a few things that have happened. In the viewer, we sort of see this box and then in the hierarchy we have GAFR bot. So now that the scene is loaded, let's discover what is inside this cache. So to start with, I'm going to select this box in the viewer and press F. That's going to frame the viewer to see the entire cache. Now this is actually the bounding box of the complete scene included in that cache. Now this is very key to our GAFR works because as you can see GAFR only loads a very simple representation of the cache. And only when necessary, it will display more, I'll load more of the information included in that cache. It lets you work with very, very large scenes and still be very efficient. And GAFR does that not only for the viewer, but also when talking to a renderer. So, let's start with the hierarchy. Here we have the top, the root location of the cache. But we can expand that by clicking this little arrow and then we can keep going and expand up to our actual geometry. As we can see in the viewer and then this is not expandable anymore. That's the end of the hierarchy. Obviously, this is a bit long to click on each one of them, so we have a shortcut. You can use shift and then click so that is collapsing it all back. And then again, we'll expand it all and then we have the full hierarchy visible. As you can see in the viewer, it refresh. So let's do the same kind of navigation in the viewer. So I have collapsed again everything. I'm going to select and use the up and down arrow. So going down will expand one level at a time up to having fully expanded the cache. And going up will collapse again one level at a time. We can also hold on shift and then go down one step and expand it all or go up and we collapse it all. Now as you can see this cache is pretty simple. So what we can do if I collapse it back is use this little menu here and expand all and for the rest of the tutorial we're going to completely see all our cache. Now it's a good time to see how we can manipulate the view of the viewer. So let's hold on hold and then left click and as you can see we can tumble around. I'm going to deselect the model so we can see it better. If I use hold and middle mouse button, I can pan around and then finally if I use hold and right click I can zoom in and out. So this is also useful for the node graph. You can hold on hold and middle click and again pan around and using the right keys to zoom in and out. And the same thing you can press F and then you will fit the node graph. So something interesting happened just right now because I've deselected the node and then everything has disappeared. That is because Gaffer is using the selection to display in these three panels the information created by that single node. So as you can see my Gaffer bot is back, node I have selected this node. This is something that we're going to talk about more. Okay, so let's move on and create the camera to render our bot. To do that I'm going to use a slightly different technique than the right click I did before. I'm going to hit tab and then type camera and this is going to filter the list of node and show me only the one that has CAM in the name and I'm going to click on camera. Now again, something very interesting happened. Now we can see that we have our camera here and we have camera in the hierarchy, but we don't have the bot anymore. This is because each node in Gaffer produce an entirely independent hierarchy and then we have the scenery that are creating the Gaffer bot hierarchy and then we have the camera node that creates the camera, but both of them are independent. Until we decide to combine them. To do this combination I'm going to use another name node which is called group. So let's tab and type group. Now we have three nodes and we need to connect the two nodes, the scene reader and the camera to the group. To do that let's zoom a little bit. Let's click on this connection out and then drag into the in of the next node. Same thing for the camera. And now if we look closer, we can see that we have our camera here and the Gaffer bot together. Let's place the camera. Let's select the camera node, go to the transform tab and type a few values. There we go. Now we want to view the bot through the camera. To do this you can use this menu up here. We're going to enable it first. This is going to use the default camera, which is not really interesting in our case. So let's overwrite this default camera and later we're going to actually set it. So here we're going to click this icon folder. And then let's expand this group and select camera. And now we can see the Gaffer bot through the camera. So as you can see, the hierarchy now is the group. Then we have the Gaffer bot and the same level we have the camera. So the group is really the new route of our hierarchy. Okay, I think we are ready to do our first render and test everything is working fine. So let's create a bunch of nodes. First we're going to need an apple seed options node. We're going to need a standard options node. We're going to need also an output output node and finally an interactive apple seed render. And then we're going to also need a display node. Now this node is a bit special because as you can see there are no direct connections between the two. That's because they use a socket display type of connection. So now that we've created those five nodes, let's go and set a few options. So like I said, we're going to set the camera to be the default camera. So let's go to this standard options node. Expand the camera group and then toggle this on and we're going to select our camera just like we did before. And now we can get rid of that and we can still see that we are looking through the right camera. Let's go to the outputs and then press this plus icon and select interactive and beauty. And finally we're going to go to the last interactive node render and then press this start button. And if we look at the display node, now we have our render. Let's press F on the viewer to frame. Now that we have our first render, let's organize the UI a little bit. To start with, I'm going to pin this viewer to always display the display node. To do that, I'm simply going to click this icon and that's going to pin it. So now if I deselect, I still see the display node. Next, I'm going to go to this menu up here and select split left. Going to click and drag this separator and then I'm going to create another viewer here. What we're going to use this viewer is to display the 3D scene. So we're going to click on this interactive proceed render and then pin that. And we're going to pin the hierarchy as well. Now let's, like we did before, expand all and then view through the camera. And now we have a nice UI layout. Now let's create the light for lighting our gaffer bot. Let's go up here and go right click, up or seed environment and choose physical sky. We're going to again connect this node to the group. Change a few parameters here to make it look good later on. And then let's go to the opposite options. Go to the environment, toggle this and select the light. So not much has changed because we don't have a material yet. Now let's create the material to do that. We're going to make some room first, hold on, hold and shift and click on the group node. This is going to select everything upstream and we're going to drag gently a little bit to make some space. Next, we're going to create a Shader Assignment node to assign a shader to our model. Let's create the material, which is going to be a Disney material, one that ships with a proceed. And let's connect the out to the shader input. And there we have it. Now we can see the light affecting our robot. Now let's add some texture to the robot. Let's go a little bit to the left, then right click, go up, proceed, shader, texture 2D and color texture. Let's connect this out column to the base color. As you can see, we lost the diffuse because now it's all black. So let's load the texture. I'm going to paste this path and then we're going to create a new texture. Let's change the yudim to Mari and now we have the texture. So let's explain a little bit what's happening. So here this is the base name of the texture and then next in the actual file path you have the yudim identifier which is a southern one and then finally you have the yudim prefix. So the full path which would be base underscore col underscore southern one dot tx is actually completed by gaffer using those options and now we have the gaffer. But we have the texture applied on our material and to finish we're going to add a new shader and apply this shader only to certain pieces of the robot. So we're going to need a new shader assignment node. Let's connect it. Let's create a new Disney material. Let's change a few properties like this and now we're going to see how we can connect or filter this assignment. So let's say I want the two metal pieces here to be the only one with the new shader applied to. So we can expand the hierarchy and find out where they are or we can use the filter. So let's say a little bit lazy I'm going to type the filter and here we go we have those two pieces that correspond here. So I can click and drag and let go on the shader assignment. This is going to create a path filter node and then this path filter node will be set to the path that I dropped from the hierarchy. Now we can see we have this new piece using the new shader. Now what if we want both of them? We can either select this drag and drop hold on shift and then this will have a second entry or we can be a bit smart. Select this press minus and then change slightly this path by adding a star here and this is going to say everything that is this base path then start with anything and then finish with this part of the path which correspond to L and R. So we just basically replace this L and R and then find everything that correspond to this filter. So we can do even better than this. Let's remove this camera view and then select the piece and press F. So we can select a bunch of things. So say I'm going to click and drag and press shift the whole body and now this whole body path will use the new shader. Now let's say I don't like that. Let's click drag and drop and hold on control as you can see the icon changed and now it's going to remove it and let's finish this tutorial by selecting a few shapes and then click drag and hold on shift and there we go. We have our gaffer bot rendering inside gaffer using apple seed and this very nice procedural workflow. Thank you for watching.