BHARAT GUDIHAL
  • About Me
  • Resume
  • Game Projects
  • Other Projects
  • Engineering Dev Blog
  • About Me
  • Resume
  • Game Projects
  • Other Projects
  • Engineering Dev Blog

This blog is me documenting my learning in the game engineering class at the University of Utah. I will post the progress on my assignments and what I learned from each of them. The final goal will be to create a platform independent asset pipeline and rendering system which supports OpenGL and Direct3D

Assignment 13 – Cleaning Up the Pipeline

11/23/2017

 
​So far I have been building all my assets through a lua file which contained specific code for each asset that would be built. This meant that every time I had to build a new asset, I had to copy and paste a bunch of code and change the asset and builder names. As you might have guessed, this is error prone, cumbersome and not scalable.
In this assignment I aim to fix this by making changes to the build system. I now have two lua files: one which contains generic code to build all the different types of assets and the second lua file would just be a list of the assets that need to be built.
The “AssetsToBuild” lua file is passed to the “AssetBuildExe.exe” which in turn will pass the file names to the “AssetBuildFunctions” lua file which will call the appropriate builders to build the asset files.
Picture
​Let us walk through this file:
  • The meshes are processed one at a time by the “MeshBuilder”.
  • The list of shaders. The “ShaderBuilder” needs to know what type of shader it is building (vertex/fragment), therefore we have to pass some extra arguments
  • Similar to the meshes, the textures are processed one at a time by the “TextureBuilder”
With the new asset build systems, if I ever want to build a new asset, all I need to do is add it to the appropriate list and the build system will ensure that the file is available in the right format at runtime.
The built shader and texture files have a different extension to the unbuilt ones. To enable this I had to override one of the functions in the “AssetBuildFunctions” lua file.
There is one thing that the new build system cannot do and that is selectively build assets for D3D and OpenGL. This means that I need to make sure that the Vertex Input Layout shaders get built for OpenGL even though I don’t use it.
Once everything built, the game looks the same as before so we know everything is working.
Picture
​You can move the camera using the following controls:
  • W,S : Move camera forward and backward
  • A,D : Move the camera sideways
  • Q,E : Rotate the camera around the Y-Axis
You can move the mesh around in the scene using the arrow keys.
examplegame_assignment_13.zip
File Size: 1620 kb
File Type: zip
Download File


Comments are closed.

    Archives

    December 2017
    November 2017
    October 2017
    September 2017
    August 2017

Powered by Create your own unique website with customizable templates.