Posts

Showing posts from June, 2021

3D Math - Always a Single Plane to Cut Three 3D Objects in Half with Borsuk-Ulam Theorem - by Zach Star

June 28, 2021 Borsuk-Ulam Theorem 3D Math Title: A surprising topological proof - Why you can always cut three objects in half with a single plane By: Zach Star Youtube - Information Description: Proving that any set of n n-dimensional objects can be cut in half by n-1 dimensional object (i.e. 3 3D objects can be cut in half by a 2D plane). Overview This was just a fun and interesting mathematical proof I came across. Using the Borsuk-Ulam Theorem at its core, it proves how any set of 3 3D objects can be cut in half (by volume) by some 2D plane. It then expands that to show that this works for any n amount of n-dimensional objects, which are then divided by an object with n-1 dimensions. Borsuk-Ulam Theorem This can be read up on here at the corresponding wikipedia page: Wikipedia - Borsuk-Ulam Theorem This states: "every continuous function from an n-sphere into Euclidean n-space maps some pair of antipodal points to the same point". ...

Unity Shader Graph - Signed Distance Fields - Update with Subgraph Fix

June 24, 2021 Shader Graph Unity Title: Drawing Boxes and Rectangles in URP Shader Graph with 2D SDFs! 2021.1 | Unity Game Dev Tutorial By: Ned Makes Games Youtube - Tutorial Description: Exploration into calculating signed distance fields and using them with Unity's Shader Graph. Title: Rectangle SDFs and Procedural Bricks! Video Production Stream | Unity Game Dev Livestream By: Ned Makes Games 2 Youtube - Tutorial Description: The full stream which most of the previous tutorial is pulled from. Useful for any more in depth questions of previous tutorial. Overview When I visited this tutorial yesterday I ran into an issue with Unity 2021.1.3 that working with subgraphs was extremely bugged and error prone. I had seen online that later versions potentially fixed the issue, so I download the latest version, 2021.1.12, and this did indeed fix the issue for me, making this tutorial much easier to follow along with. This tutorial was m...

Unity Shader Graph - Signed Distance Fields and Subgraph Errors

June 23, 2021 Shader Graph Unity Title: Drawing Boxes and Rectangles in URP Shader Graph with 2D SDFs! 2021.1 | Unity Game Dev Tutorial By: Ned Makes Games Youtube - Tutorial Description: Exploration into calculating signed distance fields and using them with Unity's Shader Graph. Overview This shader tutorial quickly explores calculating signed distance fields and using that for interesting effects. These effects were built in HLSL in the tutorial video originally, but they also show how these can be implemented with Unity's Shader Graph system. I wanted to use the Shader Graph approach, but unfortunately I found that Unity's Shader Graph Subgraphs have some major issues. Signed Distance Fields (SDFs) Signed Distance Fields (SDFs): calculate the distance from any arbitrary point to a specific shape Principles of Calculating To start, they look at an example using a rectangle whose center is at the origin (0, 0). First, they find t...

Modding Monster Train - Editing Name of Champion Tutorial

Image
June 22, 2021 Modding Monster Train Title: Monster Train - Shiny Mark mades mods By: Good Shepherd Entertainment Youtube - Tutorial #1 Description: Extremely basic introduction to setting up a C# project for modding Monster Train (slightly outdated). Overview This was an introductory tutorial mostly meant to help you learn how to setup a C# project to mod Monster Train. It has however become slightly deprecated since the DLC was launched, however it did lead to me gaining a better grasp on the logging system for debugging. Following Tutorial This tutorial is rather straight forward, but even this had its fair share of issues. One of the first major blocks I ran into and resolved was how strict Harmony is with some of the ways it interacts with the base game code. Specifically, the __result parameters used in the Postfix() methods specifically require EXACTLY 2 underscores before 'result'. This is actually just part of their system of naming c...

Modding Monster Train - Basics and Introduction

June 21, 2021 Modding Monster Train Title: Monster Train - Shiny Mark mades mods By: Good Shepherd Entertainment Youtube - Tutorial #1 Description: Extremely basic introduction to setting up a C# project for modding Monster Train (slightly outdated). Title: Monster Train Modding Card Creation Tutorial Mod By: Good Shepherd Entertainment Youtube - Tutorial #2 Description: Introduction to using the Trainworks API, a modding tool for Monster Train geared towards adding new content. Title: Getting Started with Trainworks Modding Tools By: KittenAqua Github - Wiki Description: More detailed and indepth documentation on properly setting up a C# project for modding Monster Train as well as examples for modding various content. Overview Monster Train is a game I have played a lot and really enjoyed, and it recently put out some modding support in the last year. Being a Unity-based game, I figured I could use some of my Unity a...

Unity Shader Graph - Liquid Effect by Gabriel Aguiar Prod.

June 18, 2021 Shader Graph Unity Title: Unity Shader Graph - Liquid Effect Tutorial By: Gabriel Aguiar Prod. Youtube - Tutorial Description: Quick shader graph tutorial exploring interesting effects of moving shader based on psuedo-physics. Overview This shader tutorial looked like a great way to extend my knowledge on Unity's shader graph since it appears to have some neat and unique mechanics. The fact that the shader is responding to the changes in position and rotation of the object explore ways to have shaders follow physics-like rules to create effects visually that can mimic for physical phenomena. Many of this user's tutorials also include setting up the initial models, but I think this effect can work decently with other simple shapes I can easily make with ProBuilder.

Unity Shader Graph - Grid Shader by UGuruz

Image
June 16, 2021 Shader Graph Unity Title: Grid Shader in Unity LWRP - Shader Graph Tutorial By: UGuruz Youtube - Tutorial #3 Description: Experimenting with tiling and the rectangle node in Unity Shader Graph to create a Tron-like glowing grid pattern. My Final Grid Shader Graph (w/ Color Change Addition) Overview Following my exploration of Unity's shader graph, I did this tutorial by UGuruz on creating a grid shader similar to what you see in Tron. I really liked the effect so I continued it slightly further by adding a color changing effect over time, as can be seen in my examples provided. Learnings from Tutorial Using a Fraction node with a Tiling & Offset node is an effective way to give you standard expected tiling and offset results. I however had some strange effects because of interactions with the UVs of the models. The base UVs of just a standard Unity cube did not tile effectively for me, so I tried using Unity's ProBuilder...

Unity Shader Graph Examples and Tutorials

Image
June 10, 2021 Shader Graph Unity Title: FORCE FIELD in Unity - SHADER GRAPH By: Brackeys Youtube - Tutorial #1 Description: A quick introduction to shader graph in Unity making a transparent force field with glowing edges. Title: ART 200: Creating an energy Shader in Shader Graph in Unity By: Casey Farina Youtube - Tutorial #2 Description: An introduction to using noise effects in Unity Shader Graph to create a glowing generic energy effect. Title: Grid Shader in Unity LWRP - Shader Graph Tutorial By: UGuruz Youtube - Tutorial #3 Description: Experimenting with tiling and the rectangle node in Unity Shader Graph to create a Tron-like glowing grid pattern. Title: Unity Shader Graph Tutorials - Youtube Playlist By: Gabriel Aguiar Prod. Youtube - Playlist #1 Description: This user creates tons of VFX tutorials for games, and has delved into Unity's Shader Graph, giving great examples of quick but well done...

Game Project: Flying Game - Part 5 - Projectile and Environment Interaction (Part 2)

June 8, 2021 Flying Game Projectile Overview I wanted to have the player projectile add force to objects that it came in contact with. This originally was just to prevent strange occurrences where originally if the player hit obstacles sitting on top of others, nothing would happen since the only force moving them at all was gravity. This additional force adds some extra displacement to make sure that whenever any objects are hit, there is some dramatic impact. Voxelized Environment Obstacles Update IDestructible Interface Update for Voxel Obstacle Element Class This interface is implemented by the individual voxel obstacles. It originally just had a Destroyed() method, but with this update I wanted to add a secondary method to deal with simply being hit at all, so I added a Damaged() method. I then also renamed the Destroyed() method to EndLife() since it may not necessarily be destroyed when its job is done. Internal Hit Cooldown Timer Because the objects were ...

Game Project: Flying Game: Sonic Boost - Part 4 - Projectile and Environment Interaction

June 2, 2021 Flying Game Projectile Overview I was trying to think of ideas on how to add an extra mechanic to the flying controller that ties in with a fast and agile moving controller, and thought of tying in some type of sonic boom effect. With this, I thought creating an expanding projectile from the player after boosting could be an interesting way to generate these projectiles. I then explored a few ways to have the projectile interact with the environment and came across a relatively simple one that provides some fun feedback. Sonic Boom Projectile Everything about the projectile is rather simple. The projectile is generated when the player performs a fully charged boost. It then expands at some growth rate (dictated by the projectile controller on the player) up until some maximum size (dictated in the same location). As it encounters objects with an IDestructible interface, it will cause them to perform their Destroyed() method. This gives a pretty cool ef...