diff --git a/3D-files/Drone v9.fbx b/3D-files/Drone v9.fbx new file mode 100644 index 0000000..5ff224a Binary files /dev/null and b/3D-files/Drone v9.fbx differ diff --git a/docs/Assignments/week_2_computer_aided_design_(cad)/drone_designing.md b/docs/Assignments/week_2_computer_aided_design_(cad)/drone_designing.md index ccea1f7..ef7f3d3 100644 --- a/docs/Assignments/week_2_computer_aided_design_(cad)/drone_designing.md +++ b/docs/Assignments/week_2_computer_aided_design_(cad)/drone_designing.md @@ -151,4 +151,122 @@ After that I created a sketch on the front surface with a offset so I could extr After that I sketched the motor arms and sketched holes on top to cut the holes. ### Other notes -I think Onshape is a solid to fusion360 but the part that im missing is that I can instantly assign variables to anything. On another note Onshape is a lot nicer when working parametrically because you can slide the parameter menu on the side next to the design. \ No newline at end of file +I think Onshape is a solid to fusion360 but the part that im missing is that I can instantly assign variables to anything. On another note Onshape is a lot nicer when working parametrically because you can slide the parameter menu on the side next to the design. + +## Blender +I wanted to make a render of the drone so I could visualize my idea to everyone. I don't have any experience with blender. The only experience i have is from the lecture we had. + +### Animating in blender +To learn animating I used [this](https://www.youtube.com/watch?v=CBJp82tlR3M) video. + + +#### Animating the rotors. +I have imported rotors from grabcad and aligned them on top of the motors. Using the `G` key. If you wanna grab something in blender you need to use `G`. The rest of the model I imported from fusion360. +![alt text](../../assets/assets_week_2/blender/image.jpg) + +Then I opened the animation menu and pressed `N` to get the extended menu. +![alt text](../../assets/assets_week_2/blender/image-1.jpg) + +After that I selected all the rotors using shift click and pressed `k` to get to the keyframes menu. + +![alt text](../../assets/assets_week_2/blender/image-2.jpg) + +In there I selected the Rotation option to save that information inside the keyframes. + +Then the Z Euler rotation should appear. + +![alt text](../../assets/assets_week_2/blender/image-3.jpg) + +After clicking that I went into the modifiers menu and added a Generator and enabled additive. This makes sure that the Z angle only keeps going up. So it keeps spinning indefinitely. + +After that you can select everything and press `Control + L` and then link animation data so all the propelors do the same. Then it should look like this. And if you press space they should start spinning. + +![alt text](../../assets/assets_week_2/blender/image-4.jpg) + + + +##### Quirks of the animation timeline +The keyframes only show up when you've selected the part/parts that have keyframes. Otherwise your timeline would be empty. Don't get confused by it. + + + +#### Animating the drone + +When animating the drone I ran into some issues. When adding keyframes my drone was flying away without it's propellors. + +![alt text](../../assets/assets_week_2/blender/image-5.jpg) + +![alt text](../../assets/assets_week_2/blender/image-6.jpg) +I fixed the issue by right clicking the location data in the Transform menu and clicking clear keyframes. Animating in blender is really straight forward. You move the objects and then press `k` and choose the keyframes that you wanna store. + + +### Rendering in blender + +#### Making a scene +The first thing I did is make a floor. I did that by placing a flat plane and scaling it by a lot so it covers the floor. + +When you want to give objects textures or colors you need to assign materials to them. You can assign a material by going into the material tab on the bottom right. +![alt text](../../assets/assets_week_2/blender/image-7.jpg) +In there you can change colors and do all other sorts of fun things. If you press `Z` and then select render you can see the rendered project. + +#### Rendering with images +I've struggled with rendering images. But I found out you can import images as materials and then they do get rendered. If you import as image it doesn't get rendered. + +First you wanna go to the material and import the image into the material. When you the box next to base color a big menu appears with a lot of options. + +![alt text](../../assets/assets_week_2/blender/image-8.jpg) + +![alt text](../../assets/assets_week_2/blender/image-7.jpg) + +In the menu you wanna select image texture. When you've done that it will probably look something like this. + +![alt text](../../assets/assets_week_2/blender/image-10.jpg) + +To fix this we need to do some UV-mapping? A UV-map is a way to tell blender how and where textures should be rendered. First start off creating a second view by dragging the top left corner of the 3d viewer to the middle. Then open the UV-editor using the top left button. + +![alt text](../../assets/assets_week_2/blender/image-11.jpg) + +Then you can press the object you wanna edit on the right and edit it on the left. To get the object in the uv editor you need to select it and then press `tab`. + +![alt text](../../assets/assets_week_2/blender/image-12.jpg) + +Then you will get something like this. Now drag over everything and press `unwrap` + +![alt text](../../assets/assets_week_2/blender/image-13.jpg) +That will make everything dissapear. +![alt text](../../assets/assets_week_2/blender/image-14.jpg) +Now you can select faces in your 3d editor you want the image on. And right click and press `UV unwrap faces -> Unwrap -> Smart UV project` + +Now you have a couple of face on the image and you can see your changes directly reflect on the 3d model. ![alt text](../../assets/assets_week_2/blender/image-15.jpg) + +You can move and edit the faces around on the uv map using `G` `R` `S`. +Result: + +![alt text](../../assets/assets_week_2/blender/image-16.jpg) +#### Setting the camera and lighting +For a render to look good the camera needs to be positioned well and there needs to be lights. +When in object mode you can move your cursor using `shift + right click` and then press `shift + a` to create a light. When you've created a light or selected one you can change the settings of the light. For now i've used `Sun` as light type because I couldn't get any other to work. + +![alt text](../../assets/assets_week_2/blender/image-19.jpg) + +#### Rendering +To start rendering a video or image you first need to set the render settings. That can be found on the left bar at the tv icon. + +![alt text](../../assets/assets_week_2/blender/image-17.jpg) + +After that you need to set the output location and file type. That can be done in the menu right under the first menu. Otherwise your render will get saved in a random location. + +![alt text](../../assets/assets_week_2/blender/image-20.jpg) + +In there you can change render settings for this project. There are multiple render engines. Eevee is the fastest but lowest quality and Cycles is the slowest and heaviest one but looks the nicest. Workbench is somewhere inbetween. +After setting all your settings you can go to the top menu and press `render` and choose if you wanna render an image or video. + +![alt text](../../assets/assets_week_2/blender/image-18.jpg) + + + + +## Sources: +* https://www.youtube.com/watch?v=JPkzmWpZbLw +* https://www.youtube.com/watch?v=jLGWE335J28 +* https://www.youtube.com/watch?v=syg2Oy43zJ0 diff --git a/docs/assets/assets_week_2/blender/droneAnimation1.mp4 b/docs/assets/assets_week_2/blender/droneAnimation1.mp4 new file mode 100644 index 0000000..e8a78a4 Binary files /dev/null and b/docs/assets/assets_week_2/blender/droneAnimation1.mp4 differ diff --git a/docs/assets/assets_week_2/blender/image-1.jpg b/docs/assets/assets_week_2/blender/image-1.jpg new file mode 100644 index 0000000..ea526b8 Binary files /dev/null and b/docs/assets/assets_week_2/blender/image-1.jpg differ diff --git a/docs/assets/assets_week_2/blender/image-10.jpg b/docs/assets/assets_week_2/blender/image-10.jpg new file mode 100644 index 0000000..4dd1dae Binary files /dev/null and b/docs/assets/assets_week_2/blender/image-10.jpg differ diff --git a/docs/assets/assets_week_2/blender/image-11.jpg b/docs/assets/assets_week_2/blender/image-11.jpg new file mode 100644 index 0000000..2dc0917 Binary files /dev/null and b/docs/assets/assets_week_2/blender/image-11.jpg differ diff --git a/docs/assets/assets_week_2/blender/image-12.jpg b/docs/assets/assets_week_2/blender/image-12.jpg new file mode 100644 index 0000000..377fee2 Binary files /dev/null and b/docs/assets/assets_week_2/blender/image-12.jpg differ diff --git a/docs/assets/assets_week_2/blender/image-13.jpg b/docs/assets/assets_week_2/blender/image-13.jpg new file mode 100644 index 0000000..ce979d2 Binary files /dev/null and b/docs/assets/assets_week_2/blender/image-13.jpg differ diff --git a/docs/assets/assets_week_2/blender/image-14.jpg b/docs/assets/assets_week_2/blender/image-14.jpg new file mode 100644 index 0000000..f320c62 Binary files /dev/null and b/docs/assets/assets_week_2/blender/image-14.jpg differ diff --git a/docs/assets/assets_week_2/blender/image-15.jpg b/docs/assets/assets_week_2/blender/image-15.jpg new file mode 100644 index 0000000..002ab9a Binary files /dev/null and b/docs/assets/assets_week_2/blender/image-15.jpg differ diff --git a/docs/assets/assets_week_2/blender/image-16.jpg b/docs/assets/assets_week_2/blender/image-16.jpg new file mode 100644 index 0000000..79b20cd Binary files /dev/null and b/docs/assets/assets_week_2/blender/image-16.jpg differ diff --git a/docs/assets/assets_week_2/blender/image-17.jpg b/docs/assets/assets_week_2/blender/image-17.jpg new file mode 100644 index 0000000..ef2ab47 Binary files /dev/null and b/docs/assets/assets_week_2/blender/image-17.jpg differ diff --git a/docs/assets/assets_week_2/blender/image-18.jpg b/docs/assets/assets_week_2/blender/image-18.jpg new file mode 100644 index 0000000..7780927 Binary files /dev/null and b/docs/assets/assets_week_2/blender/image-18.jpg differ diff --git a/docs/assets/assets_week_2/blender/image-19.jpg b/docs/assets/assets_week_2/blender/image-19.jpg new file mode 100644 index 0000000..a584f2a Binary files /dev/null and b/docs/assets/assets_week_2/blender/image-19.jpg differ diff --git a/docs/assets/assets_week_2/blender/image-2.jpg b/docs/assets/assets_week_2/blender/image-2.jpg new file mode 100644 index 0000000..03cd6b4 Binary files /dev/null and b/docs/assets/assets_week_2/blender/image-2.jpg differ diff --git a/docs/assets/assets_week_2/blender/image-20.jpg b/docs/assets/assets_week_2/blender/image-20.jpg new file mode 100644 index 0000000..846ae8d Binary files /dev/null and b/docs/assets/assets_week_2/blender/image-20.jpg differ diff --git a/docs/assets/assets_week_2/blender/image-3.jpg b/docs/assets/assets_week_2/blender/image-3.jpg new file mode 100644 index 0000000..e3d9eab Binary files /dev/null and b/docs/assets/assets_week_2/blender/image-3.jpg differ diff --git a/docs/assets/assets_week_2/blender/image-4.jpg b/docs/assets/assets_week_2/blender/image-4.jpg new file mode 100644 index 0000000..7e0d5b5 Binary files /dev/null and b/docs/assets/assets_week_2/blender/image-4.jpg differ diff --git a/docs/assets/assets_week_2/blender/image-5.jpg b/docs/assets/assets_week_2/blender/image-5.jpg new file mode 100644 index 0000000..ce5882a Binary files /dev/null and b/docs/assets/assets_week_2/blender/image-5.jpg differ diff --git a/docs/assets/assets_week_2/blender/image-6.jpg b/docs/assets/assets_week_2/blender/image-6.jpg new file mode 100644 index 0000000..a31f736 Binary files /dev/null and b/docs/assets/assets_week_2/blender/image-6.jpg differ diff --git a/docs/assets/assets_week_2/blender/image-7.jpg b/docs/assets/assets_week_2/blender/image-7.jpg new file mode 100644 index 0000000..522078c Binary files /dev/null and b/docs/assets/assets_week_2/blender/image-7.jpg differ diff --git a/docs/assets/assets_week_2/blender/image-8.jpg b/docs/assets/assets_week_2/blender/image-8.jpg new file mode 100644 index 0000000..1b3bb3d Binary files /dev/null and b/docs/assets/assets_week_2/blender/image-8.jpg differ diff --git a/docs/assets/assets_week_2/blender/image-9.jpg b/docs/assets/assets_week_2/blender/image-9.jpg new file mode 100644 index 0000000..edfdd11 Binary files /dev/null and b/docs/assets/assets_week_2/blender/image-9.jpg differ diff --git a/docs/assets/assets_week_2/blender/image.jpg b/docs/assets/assets_week_2/blender/image.jpg new file mode 100644 index 0000000..afa953b Binary files /dev/null and b/docs/assets/assets_week_2/blender/image.jpg differ