Hi! I’m a technical director at Pixar. I love computer graphics, especially in the context of animation, video games, and vr/ar/mr. Feel free to reach out!
Implementing an algorithm sounds scary, but in reality, we're just taking a recipe and translating it into a language the computer can understand (code). I thought it would be fun to make a tutorial on implementing a simple graphics algorithm. From the title, you'll know we're going to be implementing gaussian blur, with the help of OpenCV. OpenCV is a computer vision library you can use in Python to do lots of cool things, from face recognition to image segmentation. In fact, it has a gaussian blur implementation built in to it! We won't be using that though, of course - what we will use is its ability to easily read and write images, as well as comparing our implementation of gaussian blur to its implementation. Setup Before we dive into code, we need to get 2 things done: 1) Understand the gaussian blur algorithm (recipe) 2) Install OpenCV and numpy (if you don't have them) First, let's understand gaussian blur. Since we're implementing it in code, we can...
In my free time, I've been developing a digital trading-card game in Unity with my twin brother. We had accumulated a large amount of card data in a Google Sheet, and when it came time to start porting them into Scriptable objects in our Unity project, I decided I would rather spend some time trying to automate this process. The goal of this was simply to allow us to use the Google Sheet as our card database, and have the Unity project automatically populate its internal Scriptables folder with the appropriate card Scriptables based on the data present in the Sheet. The first step I took was determining how to get Google Sheets and Unity to talk to each other. After some initial research, I determined that there were two possible courses of action - I could utilize Google's C# API to access Google Sheets directly with Unity, or I could write a Python script using Google Sheet's API that acted as a sort of middle-man between the two services. There were several fact...
I've written about the dot product before. It's simple in implementation, but maybe you weren't sure what it's practically used for. The cross product, on the other hand, has the added dimension of being complicated to compute. It would be pretty difficult for someone to determine the cross product in their head! So, before we get into what the cross product is used for, let's recall how we compute it. First, we need two vectors, let's call them a and b. When we compute the cross product between two vectors, we will end up with a resulting vector, we'll call that C. How do we get C? C = <a.y*b.z - a.z*by, a.z*b.x - a.x*b.z, a.x*b.y - a.y*bx> One way I like to remember this is - for every component in C, the other two components are used in the computation. For example, let's look at C.x. C.x = a.y * b.z - a.z * b.y Notice, this is for the 'x' component of C, and yet in the computation, only y and z components are used! Important note: ord...
Comments
Post a Comment