Monday, December 11, 2017

12/6/17 MATH / BLOG

Recently, I've been tinkering with Unreal Engine 4's built in lighting and rendering, trying to get a nice looking product. A lot of math goes into the lighting, and there are several variables that you can change. First of all, I believe the most important thing is the light falloff. The light falloff is defined as "the rate at which light loses its energy as it travels away from its source." The falloff can be separated into two categories, a Falloff Exponent, and an Inverse Square Falloff. The Falloff Exponent is a very simple lighting system that produces a light who's brightness is based on an exponent.
4.1 - Falloff Exponent

The inverse square falloff, however is much closer to reaching realism in lighting. It uses the Inverse-Square Law, which is defined as "The inverse-square law, in physics, is any physical law stating that a specified physical quantity or intensity is inversely proportional to the square of the distance from the source of that physical quantity. " So in lighting, this would mean that the intensity of the light radiating from a point source is inversely proportional to the square of the distance from the source.


4.2 - Inverse Square Falloff

For an example, we have the Intensity of the light (I), the Brightness of the light (P), and the area of a sphere of radius (A, or 4𝝅r²), and the distance(r).



{\displaystyle I={\frac {P}{A}}={\frac {P}{4\pi r^{2}}}.\,}

The intensity decreases (divided by 4) as the distance r is doubled.

Friday, December 1, 2017

11/27/17

The past week has been thanksgiving break. Over break I practiced working with some more complex blueprint, including event dispatchers. The week after break I have been practicing more with VR Blueprints, such as Navigational meshes, and tweaking the teleport UI.

Monday, November 13, 2017

11/9/17

Coming up to the end of the second game jam, I have learned alot about team management and co-operation. In the first week of the game Jam, I had to work with character possession as well as trying different post processing effects. I used the normal amount of math, such as vectors. In the second week of the game-jam I began to work with Animation and character blueprints, as well as Animation spaces. I had to mess with them quite a bit before I got it working.

Wednesday, October 25, 2017

10/18/17

 

This past week I have been messing around the UE4's 2d plat former template. I made some practice sprite sheets in order to learn how to animate basic 2d sprites. I practiced working with flipbooks in UE4, seeing how they functions and making basic flipbooks such as an Idle animation and a Run animation. 

I also worked with materials as well, including working with textures that line up no matter where they are in the world space.











Random Isn't Random

Many Random Number generators that are included with programming languages aren't really random at all. These often use Pseudo-Random Number Generators. This means that every output is predetermined by the computer, making it deterministic. When it is started, it generates tons of 'random' numbers, and when a value is needed, it just chooses the next number in the list. Seeds are also used in these pre-determined numbers, and each seed is a different pattern.

This can be seen in a test made using python on Trinket. Multiple tests showed the dots appearing in what seems like a non-formal pattern, but after awhile, it would only repeat the dots it had already been too, and the blank spaces would never be filled in. This can be seen with Unreal Engine 4 as well.


Thursday, October 5, 2017

10/5/17

As of 10/4/17 I am starting work on the "The Inventor" project lead by Mr. Compton. I will be programming for this project. I am going to need to learn more about construction scripts, cascade, and VR Programming in Unreal Engine. I am also going to start learning C++ with Unreal engine.

Tuesday, October 3, 2017

10/3/17 - Linear Interpolation

For this weeks math Monday we were assigned to research Linear Interpolation or Lerp. Linear Interpolation in mathmatics is defined as "a method of curve fitting using linear polynomials to construct new data points within the range of a discrete set of known data points." In more simple terms LERP Draws an imaginary line between point A and B and tells how far along the line you are. LERP is often used when making games in order to either blend a transformation, material or more. For Example: 
In this example I am Lerping two texture samples together, or in other words, I am joining them together along a line.

A Lerp can also be used to move an actor between two locations. For example I set up a platform which contained a start and an end collision box. I then got the location of the two collision boxes and made the platform lerp between the two over a timeline.