 be the very last presentation of the Blender conference 2015 and I'm really happy that a few of you are still here, not going home, still watching the very last presentation. And there already was a presentation about magic. I call this point density magic here. But there was another presentation already. It was on Friday. It was one of the very first. It was called Friday by Frederik Steinmetz. It was called Cycles Light Path Magic. Who watched it? Wow, nice. It was about magic. So this conference is opening with magic and closing again. But this is a different kind of magic I'm talking about here. Frederik was talking about how to do magic in Cycles, how to do magical tricks using the Light Path node. What I'm going to be talking about is how to create scenes that look magic or how you can spice up your scenes with some magic-looking effects that are called point density textures and that are finally available in Cycles. Let me first show you three example videos. And I want you to look closely, like where is the lighting coming from, are things visible in reflections and everything, is there motion blur? And of course also, how are the points looking? Are there any points? Is it more like a nebula or something? And then, yeah, please remember this because I will come back to those videos. Number two, and now for the last one. So you see, thank you, all these effects have been made from points. Here you see them more exactly, so more cores, points. And they are volumetric points in 3D space. And so what you've seen here is in Cycles, it was all been rendered in Cycles. But you know, it looks a little bit like the halo particles and the halo shader we have in Blender Internal. Who of you has ever used the Blender Internal halo shader? Okay. And do you like it? Okay, yeah, you like it. But I like it too, but it has some limitations. And I always wanted to have halos in Cycles. And to be honest, I wanted them from day one. Like four years ago, I first encountered Cycles that was at FMX 2011. This was the first public demo of Cycles. And when I saw what Cycles can do, we had this small presentation machine here. I thought, like, wow, that would be awesome if you had halos in Cycles. And I thought, like, wow, this path tracing, this would be so cool to have halos. And I had a talk with Ton and he told me that halos are planned. Halos will come and they will be all volumetric and have depth of field and everything. But it would take a while. And it took four years. Now we have 2015 and the project Gooseberry is what brought us the halo particles. So I'd like to ask you, who of you is subscribed to the Blender Cloud? Also on YouTube. I use Cloud Subscribers. Okay. You guys are awesome. I'm a Cloud Subscriber as well. And basically together, we paid the developers to create this awesome feature, point density textures. And here you see an example render from Gooseberry. It wasn't in the film, but it's a shot directly from below into the tornado. So you see clearly what people are using point density textures for normally. They're using them for clouds. But I don't. I use them for halos. I'm using them to replace this small feature we had in Blender internal for years now that's unfortunately kind of limited. You see, they're looking cool and everything. But there's no depth for field. They're not visible in reflections. They're not visible in reflections either. And they don't light up the scene, but at least we have motion blur. And now let's see how things are in cycles. So everything is fine. You see in below, it's a reflective, the floor is reflective. They are lighting up the logo and everything. And they have, I will later show you that they're also working with reflect reflections. So we got all fixed except motion blur. No motion blur, unfortunately. But I heard from the Blender developers that this will be fixed. So at some point, we will have really awesome point density textures in cycles that are doing everything the halo particles are doing in Blender internal, but much more. So I'm really excited about it. And now let me show you a few of the first demos I created when the feature had just arrived in the Gooseberry branch. And you see that they're lighting up the scene. So all the lighting is from the point density texture. So it's actually the particles lighting up the scene. And you see them in reflections behind. I put a little sussan. And at the beginning, you could see that they're actually reflected in the sussan. So really, really cool. And now for some theory, how is this working? Well, basically, and I made this slide a little bland deliberately. All it's doing is we have points in 3D space. And we render them as volumetric spheres. Okay. And, yeah, spheres. So we render spheres. We could do this already. I mean, you might remember this tutorial. Who remembers this tutorial I created once? Yeah. Actually, this was like I tried to create this effect in cycles when we didn't have these point density textures. And you might notice it is working, actually. I'm just using spheres. And there I have an emission shader. And everything is fine. But I do not use many particles. So this is very important. The density of particles are very coarse. You can actually see, even in the beginning of this stream of particles, you can see the particles each by themselves. And I used few particles, so they don't overlap. But let me first demonstrate to you that using cycles features, you can get the effect of point density textures by using simple spheres. So I've created a sa-sa left. I'm using point density textures from the vertices of sa-sa. So this is how it's looking. Look on the left. And on the right, I created the same thing, but I'm using dupli-words. So duplicating small spheres with the shader above. So on the right, that was already possible before. So on the right, that was possible with point density textures. It looks more or less exactly the same. It's just the sa-sa has a little different perspectives, so the points are at different places. But on the own total, it looks exactly the same. Now I want you to see an example, a real example, real world example, where I'm using one million particles. One million particles is not a lot. And I will be rendering the scene one frame. It's a time lapse. On the left, you'll see the scene with point density textures. And on the right, I recreated it using spheres as particles. And it's a time lapse. So down there, the number in the middle are minutes. The number on the left are hours. And hours, yeah. You see, it's still not even rendering. And now it has started rendering. Yeah, yeah, yeah, yeah, wait a little bit. It will render. And at some point, I just stopped because I didn't care anymore. That was like, yeah, that was when I read remaining 150 hours for one frame. OK, let's watch it again and see what's happening. Well, on the top right, it says updating object flags. And this is something that's usually ultra-quick, because Cycles just has to check whether an object has a volume or shader or not. But the problem is that it has to do it the number of objects times the number of objects times. So I'm having one million objects. So it has to do one million times one million checks. That's one trillion checks. And obviously, it made all those checks in like one and a half hours. So it was still pretty quick. But on the other hand, that's a lot of computation. And we don't need this with point density textures. But things are getting worse. At the point when it actually starts rendering on the right, it's super slow. There is several reasons. Reason number one is that, of course, if you have lots and lots of spheres and they all have a transparent surface, we need lots and lots of bounces, like 500 transparent bounces or so. But it's still not the cause why it's so slow at the end and why it says 150 hours. And the reason for that is simply that there are some corner cases where Cycles is not fast. And that's a problem with every path tracer. So that's a problem also the guys at Sony have when they're using Arnold and creating visual effects for big films. And that is Cycles is using this acceleration structure that calls it a BVH. And the idea is that when Cycles fires the rays, it needs to find intersections. And the idea of a BVH is to partition the space and tell the Cycles where he does not need to look. For see at the left, it takes all the triangles, uses a square around them, that's T1. And then it tells where Cycles on the left and on the right are triangles. And then it still separates them up until there are only two of them left. Actually, in reality, it's up to four or eight triangles in one of these boxes. There are the so-called leaf nodes. And now when a ray, for example, hits L1, it doesn't need to check all the other ones because it first sees, OK, it's in the big box, but it's on the left side. It doesn't need to check the four on the right. And then it finds out, oh, it doesn't need to check the two on the top. So it only needs to check L1 and L2. Now on the right, a similar thing, but the triangles are overlapping massively. And you can't even tell which one is left, which one is right. You can't really partition this anymore. And so Cycles has the big problem that when a ray enters this one, the right one, and first, let's say, hits a triangle, it has to check most of the other triangles as well. And depending on how difficult your overlapping is, it will probably have to check them all and go through linearly. And this will kill your render times. It will totally kill your render times. So what are point density textures doing instead? Well, they're creating a grid. We have the points. And either a point is in a cell or it's in another cell. No intersection checks at all. So that's why the rendering was a lot faster. And one question now for you. You've all seen the three videos I showed at the beginning, but I did use only point density textures in two of the videos. Which one do you think did not use point density textures but spheres? So any ideas? The last one, yeah. Because in the last one, you have seen that all the spheres are separated from each other. So we don't need those point density textures and by using small spheres as particles, we have a few more features like motion blur. So that's right. For the last video, I did not use point density textures. Okay, so we still got some times left. So let's do something directly inside Blender. Here I have a simple example. It's just a particle system, some particles and around them I created a cube. And that's the thing I have selected at the moment, the cube. And with this, I will go to compositing. Compositing. And now let's turn on material and use nodes. And what I will do is I will get rid of the default diffuse material and use an emission material instead. So let's go to shader emission and I plug it into the volume input here. And now you will see here that it will actually render the volume as an emission shader, which is already pretty nice. And so all I need to do now is add a point density texture. It's in texture and then the very last point density because that was the last one that was added. And here I have the option to select particle system. So let me make this a little bigger. So here let me select the object that has the particle system. It's called Icosphere. Here's the particle system. And now I can simply connect density to strength. And this should update soon. And here we should see some points. They're still quite big, so let me make them smaller. And now this is already looking quite nicely. Next thing I'd like to show you is down here that we can actually colorize them using data from particles. Here we have a nice selection and I'll go with particle age. And the data is already there in the node. It's coming in there from the yellow socket. So let's connect it here. And now you should see that the middle is not as bright anymore because it's going from black to white. So particles that have just been born are black and particles that are dying are white. So with this information at hand, we can select a converter color ramp and connect it up here. And now let's make them blue at birth, for example. Blue. Blueish. And you already see it a little bit. And now if we make them black when they're dying. Oh my God, I got dark blue and done. Oh, let's make it black. Okay. So this is already looking pretty nice here. So, and it's actually in 3D. So this is actually pretty cool because you can create some kind of nipula or something from it. But it's still not looking really perfect because it's kind of coarse and you actually see the voxels if you look closely. Like here, all the points are more like small squares. So let me go here from linear to cubic. This should fix this. And now everything should be looking a lot more soft and more sphere like. And here of course I can also increase the resolution to get more details. And now it's starting to look quite nicely. And what I'd also like to show you is that the, where is it 3D view here? That the points you see on the right are not really corresponding to the locations of the particles here. If you look here and then here over a little bit to the left. And that's because I'm using object space. If I'm using world space, the particles will be located exactly where they are in the 3D scene. So now we fix this. Beforehand this object space is actually made for clouds. What object space is doing, it will take a look at how big is the particle system, create like a cube around it. And then scale the particle system smaller so it fits into the domain and then render it. And of course this is perfect for clouds because you can put your particle system somewhere on some layer, some far, something far away. And then grab the data through the point density texture and then still edit your mesh. So you can still edit the mesh to change the scale and size of your cloud, even though the real particle data somewhere else, object space really makes sense. But for our case, we need world space and it is in world space. And now this is already looking pretty cool. And I'd like to add something and that is I'd like to add a sphere around it so you can see that this is actually working the, so this is actually working the three fractions. So like that. Let's simply add a simple sphere, mesh sphere, scale it up a little bit and give it smooth shading. And then we can give it a glass material and you will see that this is actually working even with refraction, so through the glass material, which is really, really cool. So the sphere will get a new material, just a simple glass shader, shift A, shader glass. And then connect it here to the surface. And it's roughly zero, everything should be all right. Yeah, so let's render this and this will actually work inside the glass sphere. So we will now have like a magic ball, you know, like in a movie, which will tell you the future and they will look into this magic glass and it of course looks a little cooler if you have something inside. And to show you even a little more, we can, for example, add the plane down there and it will even light the plane. And so let's get the plane down here. We have our magic ball or whatever that is. And now let's wait a little bit and you see the glass ball here and it's actually lighting the scene. It also casts a shadow, it has caustic still and everything is working fine. And we got our point density texture inside to create this cool magical effect. And this is actually also working animated. And for example you could create something like the particles are stopping at the ball and bouncing back and everything to make it really look cool and create any really nice looking magical effect using this kind of ball here. Because that's something that really was not possible before with halo particles in Blender internal because they wouldn't show up in refractions. And now we have a really nice physically accurate thing that the point density textures are lighting the scene. You can see them through refractions, you can see them in reflections. They are even working with depth of field. So everything is nice and perfect. And I'm very happy for everyone who subscribed to the Blender Cloud because you made this possible. So thank you for that. So I see we got still 10 minutes left. So let's like one, two, three questions. How does it look like if you don't use particles but use vertices and for example with a subdivision modifier with lots of subdivided vertices? Let me show you. Okay, because that's actually the best transition. Very nice question. Thank you. I will show you how it will look like with a subdivision surface modifier and a cool mesh because I still have one video left. And that's because I'd like to announce that there will maybe in the near future be a small training series on Blender Diplom about and on the Blender market hopefully about point density textures. And yeah, this is the final shot. Here, and here you'll see how it looks like if I don't use particles. So, good. Could you use point density clouds to create fire? Yes, but it wouldn't look as cool as the real fire in Blender simulation in Blender in Toronto. Or in Blender in Cycles, yeah. Thank you. It would be more like a stylized fire. Okay, the same questions. What kind of render times did you look for? Did you get for all these animations at Full HD? I rendered them mostly at 10 minutes per frame. 10 minutes per frame, and that's on an I7 kind of a... Yeah, okay, great. But that's mainly because the point density textures render almost instantly. You see, so if you just have a black background, you have just a few seconds. The problem is mainly if I want them to light the scene, then I need many samples. And that's why, for example, the first one I had shown, let's go back. This one, that was 10 minutes per frame. So, you see, I need to say you're still not perfect in one of the samples, so it probably would take even longer if I would add more samples, 500 or 1,000 or so. Can't remember, but thanks. Instancing? Yes, because actually particles and the other thing I use, the dupli words, they're all instances, so instancing works perfectly. Very faster. GPU or GPU? CPU only at the moment. CPU only at the moment, yeah. Thank you. We have a closing session in about 10 minutes, so maybe take a drink in meantime or... Okay, see you. I was kind of nervous, but now I am no longer...