Custom Shaders
Using a modified verson of HLSL (which is a modified version of the GLSL used in Project 4 of this class), we were able to create various non-photorealistic shading methods such as Pastel Shading, Manga-Style Shading, and Cel Shading.
In this project, we started with two objectives in mind: To inject custom shaders into Genshin Impact, and also to attach NeRF onto a game engine so that future applications can leverage this neural representation in use with alternate rendering methods, mesh generation, and scene reconstruction.
For the first part of our project, in terms of generating custom shaders, we've decided to do a deep dive exploration on non-photorealistic shading methods, including three versions of Pastel Shading, Manga-Style Shading, and Cel Shading. As for the second part,
Game Engines and NeRF have often been somewhat separated by their purpose. Afterall, who wants to wait to query some large model for rendering that could potentially take minutes?
In this project, we've decided to create this unlikely fusion by dedicating NeRF to one particular usecase for a Game Engine, to potentially enable future feature sets that allows
texture generation via Large Language Models, accurate scene reconstruction, and integration of visual large language models into the game-dev process. To enable these features we've decided to create
a link between the game engine and NeRF studio synchronized in real-time. The game engine is secondary to this purpose, however, since the functionality is mainly based upon the application ability to create poses, so any game with a proper .dll injection to capture camera poses will work with our implementation.
Using a modified verson of HLSL (which is a modified version of the GLSL used in Project 4 of this class), we were able to create various non-photorealistic shading methods such as Pastel Shading, Manga-Style Shading, and Cel Shading.
Similar to LERF, we made a new method for nerf studiio which extended the nerfstudio codebase to allow live streaming on a TCP connection. Specifically, we altered the PyTorch code to allow for a TCP connection to be established, and then we created a C++ DLL that would be injected into the game engine to send the camera poses to the nerf studio.
Upon completing the different shaders, the game runs very smoothly and with different visuals.
Genshin Impact without any custom shading
Genshin Impact with Square Kuwahara shading
Genshin Impact with Circular Kuwahara shading
Genshin Impact with Anisotropic Kuwahara shading
Genshin Impact with Noir Pencil shading
Genshin Impact with Cel shading
Shaders
NeRF
Levy
StreamDataset(IterableDataset) to query TCP stream and retrieve dataStreamDataManager to synchronize with the StreamDataset and DataloaderStreamDataloader to interact with the StreamDatasetJason
Rahul
StreamDataparser and StreamPipeline to use inheritance for easier implementationPierre