Posts

Modding Monster Train - Harmony Reverse Patches

July 14, 2021 Modding with Harmony Monster Train Title: Harmony ParDeike - Reverse Patch By: Harmony Harmony - Documentation Description: Harmony documentation on patching with the Reverse Patch. Overview I was investigating ways to use Harmony to access private methods and fields from classes within the Unity target game itself, Monster Train in this case. One of the first direct options I came across was using reverse patches. Basics of the Reverse Patch "A reverse patch is a stub method in your own code that 'becomes' the original or part of the original method so you can use that yourself." Typical use cases: easily call private methods no reflection, no delegate, native performance you can cherry-pick part of the original method by using a transpiler can give you the unmodified original will freeze the implementation to the time you reverse patch Implementation After seeing its first use case being calling private ...

Unity Shader Graph - Black Hole VFX - by Gabriel Prod.

Image
July 7, 2021 Shader Graph Unity Title: Unity VFX & Shader Graph - Black Hole Effect Tutorial By: Gabriel Aguiar Prod. Youtube - Tutorial #1 Description: Tutorial for a black hole VFX using Unity's Shader Graph, particle systems, and Visual Effect graph. Title: { How to CHANGE the SKYBOX in Unity } - HDR Textures in the description By: GameDevTraum Youtube - Tutorial #2 Description: Quick tutorial to use texture as Skybox in Unity. General Notes Fixing Errors I immediately ran into an issue with the Scene Color node. The fix for this was going to the Main Camera and setting the "Opaque Texture" to ON (found under the Rendering section of the Camera). This made the shader and material match the scene color appropriately, giving that transparent look. I found a generic space texture to use for my background to emulate the one used in the tutorial. I turned it into a Cube texture to create a Cubemap material to use a...

Modding Monster Train - Using Harmony to Track Methods and Log

Image
July 1, 2021 Modding with Harmony Monster Train Title: Getting Started with Trainworks Modding Tools By: KittenAqua Github - Wiki Description: More detailed and in-depth documentation on properly setting up a C# project for modding Monster Train as well as examples for modding various content. Title: Harmony Patching Article By: Harmony Harmony - Article Description: General documentation on Harmony. Overview As of the writing of this blog, the state of the Trainworks modding API with Monster Train after its DLC release is a bit rough. Creating custom cards was a core feature of Trainworks, but the DLC update has broken a lot of the original system. I have been investigating these issues to see if I can identify the problem(s) and potentially fix them. This has led me to learning a lot about using Harmony, a tool for modding Unity games, especially in a way to create logs to help me track bugs and problems when integrated with BepInEx. ...

Doppler Effect in Mario Kart - Game Audio - by Scruffy

Image
July 1, 2021 Doppler Effect and Audio Controller Game Audio Title: Mario Kart and the Doppler Effect By: Scruffy Youtube - Information Description: Explanation of how Mario Kart creates the doppler effect and efficiently distributes audio to multiple players. Overview This video covers how Mario Kart Wii specifically uses the doppler effect, as well as just how some of their audio systems work in general. It is decent coverage of how to implement a basic doppler effect system into a game in general. Fig. 1: Image from "Mario Kart and the Doppler Effect" Video Above by Scruffy Setup of Doppler Effect System The key is the relationship between sound frequency and relative velocity of objects. Their approach to measure this is just by measuring the distance from the audio source to the audio listener each frame, and if there is a difference, that is used for a relative velocity term. This relative velocity term is bound to some negative and ...

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...