 You know the resolution? It's 90, 20, and 1080 maybe. Okay, but the proportion? This is not this one. How to make twins? So a small introduction. I'm Tal from Tel Aviv. I'm currently working in Berlin as character animator and Rigger for a video game company using Blender and my free time I sometimes help with the production of a tube film that you probably heard of or participate and I also developed a crowd system with the game engine and Python which is my first experience so it's not perfect and could be improved and optimized and would be nice also if people will continue this development because it's almost there and actually since last week there was since the release of 2.6 there was a new function that added to the game engine that make almost everything that I was working on with an interface so so now it's easier to make this so first I show you the three shots everything is still working progress and this is from the film tube and this is still just the AI of the cockroaches there is still no animation and the characters are still proxy and for the animation we are going to use a auto walker from Josh World Lake show it one more time that because it's really fast yes so the plan now is to use a auto walk for the animation and also to export the movement into curves so also the body could have the path modifier not the path like that the body can also bend a little bit okay so I show you the process for making how to start to make the crowd system so so when you start this is a unlike other crowd system it's not based on particles it's based on the game engine and we use I used here all the radars for to avoid collisions and when you start the crowd system you don't start from a crowd you start from one or two agents agents is the name for each unit inside the crowd system and the boxes is the collision object and it's the brain of the cockroach actually and the cockroach right now is just linked of course yeah so first I use different radars there is the rather for the front rather to the sides to for detecting collisions special ray for walls collision for climbing raise for the ground to detect if there is a ground under and the nearest sensor I use Python mainly for conditions so the Python script is a lot of ifs and a lot of really long if if if and actuators is a touch actuator for making the cockroach stick motion for the movement and tracking targets now I could write everything with Python but I preferred to like instead of creating all these radars I could just write everything in Python but it was easier to make it like this for me because I'm a new Python user it was the first script for me and also because of this that I make this I can adjust each agent also if I make a with a script they all have the same values and like this I could adjust variations oh and there is also on the left they use the properties for inputs and outputs and some of them are manual like the speed of each agent a priorities and the rest is more to use for the script to get back and forth inputs so when we start to work on a cloud system we start with one or two agents and we need first to decide what kind of behaviors they are going to have it will also depend on the shot of the film so for this for this project a tube project they use the mostly a similar script with there is some changes but it's mostly similar it's cockroach and the yeah so the first behavior except moving forward with action actuator so the first behavior is normally to avoid collisions so this two agents they need to decide now they need to decide one if I turn left right or I stop so to help us with these decisions we make some kind of hierarchy system so when I create the agents each agent have a property called priority so the priority defined the hierarchy so the one with the higher priority he will continue he will turn and continue and the other one will stop and the one that stops you have also a timer that says okay if you stop too long you have to start to make a decision so after a certain time if there is too much cockroach around that he don't that have higher priorities he don't get stuck he started to look for a different solution now which direction when the agent see the one the orange one he need to decide which direction he want to go so for this there is the target object these are the targets that they need to reach to each target and there is a calculation it's also using the track to constraint a actuator but it's also using a function in Python that says in which vector is your target and which direction you want to turn but this is not the only decision for a turning it's also depends do you have something on your left side or do you have something on your right side so right now we have an obstacle on the right side of the orange agent so with the you have the right and left radars so when the right rather turn positive it means you have a collision turn left doesn't matter where is your target and if we move the tackle to the left of the orange agent he will go right it will always try to optimize the to get the best result to reach his target it's important it's important to him to reach his target because we want to it's not a game it's it's meant for a movie and we still need to have some control over our our agents and to decide on the direction and what is the best way to reach their destination now the another behavior would be trigger behavior this means that there is something that triggering our agents for example now they start from speed zero but they have here a trigger object and in the film you could see in the shot that I show you could see there is the papers falling and in another shot there is the sound of the train coming so when something is triggering them so they use the they use the near sensor and when this is on a certain distance they get higher speed so right now they're relaxing and when this is in a certain distance they start to move now one target is not enough for us to control because if we have a more complex scene we need it cannot if we just put our target here it will get lost inside this maze so for this we create an array of targets and it means first go to okay it use for it use a property called the target and I put input for the target for this agent and right now I use the targets are the base name of the targets are called the cube blue so the array is searching for all the objects that have the name cube blue inside of their name so this is cube blue 001 cube blue 002 and so forth and the array will organize the in the alphabetical order so the agent will go to this then to this and in the end we can decide when you reach your last object here I don't remember what he decided he just go back to the first maybe but you can make him if you want to stop or if you want to go backwards from the array so this give us much more control of our agents and we can define for different groups of agents the path that they want to go and this is really important when you have your director and you don't in the beginning I was actually using a lot of random functions but with the random you don't know what to accept expect and when the director tell you that this part should go there and this part should go there then random is not really helping now the next step for cockroaches is of course climbing so for this there is a decision when you are reaching an object with a property called the wall it has a wall property on zero and the priority is also the number is not important it just searched does the next object have a property called wall and you can see in the array that it has you enter a wall and when it's reaching if it's positive then it starts to turn on the X like this until it's aligned with the face with the normal of the this object yeah also I forgot to say that in the trigger object the one that is falling down triggering them it's also it have a property called trigger so when the if they are on zero and the near sensor recognize that there is something with the property trigger so we use these properties to define the objects around so here it also used a attached constraint so it's basically almost always have is attached to the object of the ground there is a ground sensor a rather a ray ground that tell him do you have something under you if yes then what is it and then attach to this object but when you start to climb you disconnect the attachment and a little bit before he's aligned he go back is using again the attach constraint also for climbing it's we need also to cancel gravity because we use the bullet physics engine and to cancel gravity you simply adds in the force field had the same value of gravity so if gravity here is 0.6 so force in the force field you add 0.6 and it's a or minus I don't remember the yeah it's always to play back and forth with the numbers and we always use two agents to decide also here when before he starts to climb you can see that he tried to make himself himself parallel to the object so we have easy way to climb because right now we first he wants to reach his target that is on the right then he turned right but then he turned a bit left so we can climb and be parallel to the object and he's always checking if he's parallel or not to the object and yeah and like I said all these things they are released in the last version someone already worked on them and build an interface and there is the steering actuator that I still didn't try it but from what I saw that it makes most of the thing with interface and there is navigation mesh so it's actually it can be much easier to build a crowd system using this yeah so I show also the shot in tube so this is the shot that one of them that I show you before it's like two second no it's less than one second it's even faster than in the film and show you again so in this shot the crowd coaches need to disappear from the scene in in a split second it's even faster than in the actual movie it's even faster so for this I had to make an array of targets because they all go through really narrow passes path so this way it was easier to control also you can see that in crowds usually we don't the crowds are it's a big group with a lot of groups inside and to make life easier I give each group a different color and the color is the same color of the targets so this group the red group which have here a property Q red so all these red cockroaches they will follow the red pass and so on yeah and also in this shot some of them use the priority system that I explained before this hierarchy that if each it's the decision made by the priority that I decide when I designed the scene but I didn't use only some of them use this system but most of them because it wasn't we wanted that they really disappear as fast as possible in this shot by the way it's there is the sound of the train is coming and when the sound is coming they need all to yeah to disappear so the sound is it's these triggers is the thing that trigger them that it's as if it was the sound so you can see it has a trigger property and when they reach a certain distance the near sensor become positive and they all start to run and they get random speeds and what I said before that here the priority is not based on what I decide only it's based on the distance from the distance from the target so if one object is more close to the target the other one agent is closer to the target the second agent will let him path like in the highway maybe I don't know it's let him go and yeah so this I can show a little bit slow also you see there is holes in the ground here it doesn't look so good but this because we use I used more primitives for the simulation to make it easier and like there is the hole in the ground in the film it will be small cracks in the ground and you can see also that one of the objects like if you look in the orange one he let the one that was closer to the target he let him go first and and some of them are stuck in the back over there and usually actually this is a pretty fast for a crowd simulation I think and I run this simulation a lot of times until I get the best result that I like and in the end it needs a little bit of tweaking like you see there is the yellow in the back is a little bit lost there and the green one or sometimes I just add extra agents and the ones that I don't like I can delete for this shot also it's better to like in the shot they are moving really fast and it's better that for the simulation I give them a much lower speed now it was also really slow because of calculating of course but it's better that they will be slower because it's you can be more precise with the decisions and yeah you have less collisions actually like this also another thing is that I use the in this shot I use the dynamics for the agents yeah for the agents they use dynamics and it was better for this shot to get a solution but in another shot this this shot is a shot that I managed to work it out yesterday it's one of the most difficult shots in this movie and it's really slow of course because these shots there is a lot of interaction with the papers falling and there will be also interaction with the character that is tapping on the cockroach and here they are using Rigid physics Rigid body and the reason for this is because this shot it's all using mainly one mesh that is using triangle mesh normally it's easy it's easier with primitives and to use dynamics but because this this shot have a lot of bumps when you get closer you can see that it's not really straight so with Rigid bodies it was easier to achieve this but with Rigid bodies you need to be more I think precise with more simple things like to go on the cubes it can get some problems but with yes small bumps it's getting much better results with the Rigid bodies the last thing I would want to talk about is because this is not really a crowd simulator it's the game engine but I think it's really it's not far from being a crowd simulator because crowd simulators are normally it's something very similar to a game engine and yeah and because we have the recorder it can can be used as a crowd simulator but there is a problems with the recorder I already reported so right now it's recording only on 60 frames per second so I always have to speed up the scene also because I make it slower on purpose and also because it's 60 FPS and the movie is played at 24 frames per second so this is something that could be fixed and also I knew I think it's a bug that I found that the action actuator doesn't work when I use the recorder it could be really nice to have more properties for the recorder and also I didn't find any way to record the animations like armature actions and if this was possible I think this would be already a crowd simulator because then we can decide which animation clip does the agent want to use every time and we wouldn't need to use for example the outer walker script now because we could just already implement it inside the recording simulation yeah also one thing that I hope there is some developers here that will be interesting to develop it further and because I have really small knowledge about Python but to create foot system mainly for a wiped characters so the legs don't slide when you make work cycles it's something that you can calculate more or less for work cycles like how much is distance but if there is like a really foot system it could be something really helpful also for adjusting I had to copy each agent and to change each property and if it could be an option I'm sure it's I'm going to check it out how it's possible to write but to make a script or something that if I choose this character and this character and I want to end some other characters agents and I want to change the property for all of them that it's parallel adjustment for like for all the selection and also if I want to choose a bunch of agents and to change for all of them so instead one by one to yeah to make like parallel adjustment is there is someone know if there is an option like this there is a script because I don't think it should be something really difficult you also to make these things built-in so you don't need to write all these properties if it will be already part of the game engine it will be a big step and actually the steering actuator actuator it's already a big step for this crowd system and I'm going to test it and I think it's already almost there from what I saw from the sample files and last thing is that I think one thing that I really like about Blender is that you have a lot of small tools like the game engine for example like a lot of different tools and think when you combined the tools or the editors we could create new tools by combining them so if there was more connection for in and outs between different like for example a connection between the party particle system and this kind of crowd simulator could be maybe there is and I don't know but it could be a really good tool to combine those particles in this so even to combine with the node editor or with different tools and the different physics the different simulation because there is the bullet engine and there is the other simulations with the modifiers and particles yeah that's it I would like to know if people have questions or suggestions or opinions for this project maybe Bassem wants to say that yeah so first I used the attach constraint so they are being attached when you start to climb you have like a property called climb zero means is not climbing one it's climbing up and the two is climbing like one is the X is rotating like this and two is rotating like this and I also use in Python use the function to look if he's parallel to the normal he gets the normal and they see how much degrees and if it's not parallel he always try to balance himself yeah Python and in the end when he start to climb we don't use the attach constraint because then he couldn't attach to the set to the next object but so he disconnects but once it's it recognize that it almost aligned he used the attach and it's attaching back one thing also that I forgot to mention about climbing it was the last one is that when he climbed up he rotate but when he climbed back he used the ground sensor and when he see that there is no ground under him the Python says okay slow down look if there is no ground the makers like rotate back and then attach again yeah as much as you want yeah but the problem is now I was duplicate one by one and changing one by one the priority so right now there is 100 and something agents but for thousands first you need a good computer what yeah all to make a script that's a make random random priorities and yeah also the problem is the recorder it's recording everything and when you save the recorded file you have everything with keyframes and it's really heavy and the last shot that I make that is pretty long shot it's when I pray when I try to access the keyframes and make scale for the keyframes the blender would crash and if there was more options in the recorder to choose which objects I want to record and which not would be also something useful yeah I think it will it's something that I hope that people will use it I mean now people can use the steering actuator and yeah but I think for multiply selections there is the option what you show me with the grease pencil that you can make a yes scattered them around the grease pencil and this I still didn't really try it but yeah there is one more question in terms I don't hear right now is using these targets as pet finding what I saw the steering actuator it has a navigation mesh session I've been just hearing a lot of good things about