Engineering III - Assignment 3.01
The objective was to use an existing mesh and materials and imported them with correct rendering into the existing game engine. We also needed to provide simple "Fly Cam" camera movement.
Technical Write-Up
Meshes and Materials
We were given a mesh of a building, and each piece of the building has a particular material associated with it. There were over 1,000 meshes for the entire scene. Due to the number of meshes, I wanted to simplify the structure of the scene. I didn't want to import each mesh separately.
Below is a picture of the entire mesh:
Overall, the scene only uses 5 different materials. This allows me to group the meshes into combined meshes that are using those materials.
I was able to separate out the multiple sections of the mesh, using the same materials. This created a total of 7 meshes that I had to export for the entire scene, instead of over 1,000 meshes. To export these I accessed the "Hypershade"r. The image below shows where this is located:
The "Hypershade" allows the user to select portions of the mesh using the same material. The image below shows that if you right-click on the material name, and select "Select Objects With Material", it will select every mesh object with that material:
The image above shows the material name is "ceiling_m", and this means all of the mesh objects with that material will be selected. The image below shows those selected objects:
Once these separate meshes are selected, they can be exported for use in the game engine. I saved a total of 7 meshes, allowing me to simplify my scene structure.
Once this was completed, I created new materials based on the texture files I received, and imported them into my game engine.
I assigned the correct materials to each mesh. Each of the meshes is attached to an entity in the engine, which means I had to generate each entity for each mesh.
One of the meshes, "lambert2" didn't have a recognizable material, so I placed the "railingMaterial" on this, because it stands out as a yellow color, helping the "lambert2" objects stand out from the walls and floor.
Camera Controls
We were given a mesh of a building, and each piece of the building has a particular material associated with it. There were over 1,000 meshes for the entire scene. Due to the number of meshes, I wanted to simplify the structure of the scene. I didn't want to import each mesh separately.
Below is a picture of the entire mesh:
Overall, the scene only uses 5 different materials. This allows me to group the meshes into combined meshes that are using those materials.
I was able to separate out the multiple sections of the mesh, using the same materials. This created a total of 7 meshes that I had to export for the entire scene, instead of over 1,000 meshes. To export these I accessed the "Hypershade"r. The image below shows where this is located:
The "Hypershade" allows the user to select portions of the mesh using the same material. The image below shows that if you right-click on the material name, and select "Select Objects With Material", it will select every mesh object with that material:
The image above shows the material name is "ceiling_m", and this means all of the mesh objects with that material will be selected. The image below shows those selected objects:
Once these separate meshes are selected, they can be exported for use in the game engine. I saved a total of 7 meshes, allowing me to simplify my scene structure.
Once this was completed, I created new materials based on the texture files I received, and imported them into my game engine.
I assigned the correct materials to each mesh. Each of the meshes is attached to an entity in the engine, which means I had to generate each entity for each mesh.
One of the meshes, "lambert2" didn't have a recognizable material, so I placed the "railingMaterial" on this, because it stands out as a yellow color, helping the "lambert2" objects stand out from the walls and floor.
Camera Controls
I kept the controls for the camera fairly simple. I had to remove all of my control scheme I had from my previous project, but this allowed me to place most of these on the camera. I gave the camera forward, backward, upward, downward, leftward, and rightward movement. The controls are described as follows:
Up Arrow Key - Forward Direction Movement
Down Arrow Key - Backward Direction Movement
W Key - Upward Movement
S Key - Downward Movement
A Key - Leftward Movement
D Key - Rightward Movement
I didn't currently add in any rotational movement for the camera, as I didn't see the point of it yet, because I don't know why I'd be altering the direction of the camera, and saving that for the entity.
Realized Learning Moments
I had to alter the Maya Exporter to allow multiple meshes to be exported at once, which required a little research from old emails for our class content, and an update from our other professor. I also realized I had still been using a particular "water shader" I created for a water effect, and I needed to remove it from the scene.
I altered the shader and confirmed it works appropriately. I learned a bit with this, and it was exciting to see the mesh working well in the engine. It was also a good reminder of some of the code from the Exporter I hadn't seen in a while.
I altered the shader and confirmed it works appropriately. I learned a bit with this, and it was exciting to see the mesh working well in the engine. It was also a good reminder of some of the code from the Exporter I hadn't seen in a while.




No comments:
Post a Comment