Making a stylized FPV drone simulator | Devlog 0

hi and welcome to devlog zero of unknown fpv 
my name is Robin I'm a C plus plus developer   and I'm very excited to show you what I've 
been working on the last year let's go [Music] [Music]   in this devlog I will give you a brief 
introduction to the project I will explain   the process that I use to recreate real-life 
race tracks and a play test yes there is a   Playlist Live and I will tell you all about 
how you can join that later on and how to get   started with the simulator as well the reason 
I started making a drone simulator is because   I was flying a lot of drones at the time and 
I wanted to improve my C plus plus skills and   this was such a nice combo that I just had 
to do it in this simulator I wanted to be   able to practice multi GP Style Racing just 
like in real life I also wanted the world to   be stylized and vibrant because I hadn't seen 
that in a simulator previously and the physics   I wanted to go for somewhere between arcade 
and real life experience so with that out   of the way I had to figure out how does a flight 
controller work and how to implement the physics   the flight controller software took a little bit 
of digging and time reading through the code to   understand but basically it starts with your 
controller input that is filtered and then used   with something called rate to calculate how fast 
your drone should rotate along an axis thanks to   onboard sensors the flight controller knows its 
rotational speed and it also knows the target   speed we requested what happens next is that with 
the help of a pit controller the flight controller   software regulates the motor of put mixed to the 
four quad Motors by mixing I mean controlling the   quad's individual motor speeds depending on 
the way we want the Drone to rotate or not   let's have a look at the physics so the Drone has 
four motors with propellers attached to them this   generates four trust vectors that gives the Drone 
both lift and forward momentum the Drone is also   affected by gravity and there is also a force 
called drag acne on the Drone that is affected   by surface area angle of attack and the speed of 
the Drone so then I got started implementing my   drone character using blueprints I use a sphere 
collider for the Drone and I merged all the trust   vectors into a single one I also used the physics 
approach with simulate physics turned on and then   I started implementing a control Loop using 
blueprint functions I added trust by using the   blueprint function called add force and since I 
had merged all the four trust vectors I could not   control rotation using that but that was sorted 
by using an a torque node so these were great for   prototyping or single player however it didn't 
work good for multiplayer which is also called   replication in Unreal Engine what you can see 
here is the amount of network erections going   on and this is not good fortunately for us there 
is a third person example shipped with Unreal   Engine that has great multiplayer performance 
as you can see here there is way less Network   reactions going on and this is still using the 
same emulation settings that I used previously   which means this is performing much better of a 
network the magic behind the third person example   working so good over network is partly because 
of the correct movement component however I'm not   going to cover the CMC into detail since it's a 
very Advanced topic and it could be pretty boring   side of the Box the third person example doesn't 
support 6 degrees of freedom movement and I had   to detrimp the code to find spots where I could 
change it to allow for that and I made this lunar   lander example project as a proof of concept 
and if you would like to try that you can find   it in the description and feel free to use it as 
inspiration so once I had a lunar Landers sample   working I continued by implementing a replicated 
six degrees of freedom drone once I hit the level   of performance you see here I knew that I could 
safely move on to creating a world Ford drone to   Flying and this is what the Sim looks like after 
about five months of level design creating assets   sculpting rocks making grass it's got the 
trees well just making a lot of stuff right   for track creation I used to Consumer grade 
drone I set the track as my subject and then   I Circle that while taking photos these photos 
are then used in a process called photogrammetry   after I've taken enough photos I'll then process 
all of them in a software like reality capture   that turns it into a 3D model which I can import 
into Unreal Engine with the help of the 3D model   I can now place the stylized obstacles along the 
racetrack just as you were in real life and once   that is done it's time to try out the race track 
and here you have a side by side comparison of the   simulator versus real life and to be honest with 
you the footage on the right is actually slowed   down since I cannot match this Pro Palace page 
just yet but I guess with time I'll get there as   well if I put in the effort anyway I'm just really 
happy how this track Recreation turned out [Music]   okay then it's time for me to show you how 
you can join the play test open your browser   go to anonfpv.com you can also find a link in the 
description here you'll find buttons for Steam and   Discord over at steam you'll have two buttons one 
for wishlist and one for the play test make sure   you click both once you join the Discord server 
please write something in play test because that   will alert me of you wanting to join I'm gonna 
give you some tips now of how you can set up   your drone we start with binding the axis so if 
you look on the illustration down below you have   the left joystick for throttle and your and the 
right joystick for pitch and roll there are many   different ways to set up your joysticks but this 
is the most common way so that's what I recommend   let's open up the quad settings so under the quad 
settings you have a setting called camera angle   the camera angle is gonna affect the angle of 
the Drone while you're flying and a higher angle   is going to give you more forward momentum but 
less lift and a lower camera angle is going to   give you more lift but less forward momentum 
let's move over to the raid settings so the   rates are basically the speed at what your drone 
can turn depending on the joystick movement for   now I would recommend you to use a profile like 
slow and steady if you're new last but not least   the physics settings I've added a few presets 
here and I'd recommend you to play around with   the freestyle one first however let's say that you 
want to play around with the physics yourself then   you have three sliders here trust will basically 
change the amount of trust that the Drone   generates and it would equal like putting bigger 
engines and batteries on the Drone the second one   which is the air resistors basically translates 
to the drone's surface area if you would increase   that the Drone is going to fight more against air 
it's going to reduce the top speed and it's also   gonna slow down much faster on the other hand if 
you decrease it the Drone is going to get the much   higher top speed but it's gonna take way a longer 
time to slow down and the third one which is the   Gravity by increasing that you can increase the 
pull of the Drone to the ground and by decreasing   it it will become basically like flying on the 
moon you're just gonna be floating forever two   questions for you so the map is pretty big right 
and I'm curious what you would like to see added   to it if you could choose what would you like 
to see and the second one the dev Vlog is there   anything that you wish that I would cover into 
detail that you may be seen here but you um how   did he do that kind of and with that said enjoy 
the play test and I'll see you in the next one

As found on YouTube

Tags: