3D Scene Manager

The first coursework during the third year of the course was to create a 3D application for the PS2. We were given a framework to use if we wished. The first problem with the framework was that it loaded textures into static memory, a problem I had with the 2D framework that loading textures dynamically would lead to filling the memory very quickly, but loading all the textures at the application initialisation was messy.

I solved this problem by creating a simple texture manager that used a linked list containing the texture information, as well as a filename and an id for comparison. This way multiple objects could all dynamically load the same texture and they would all just be returned an index to the same texture.

The scene I was planning on making for my coursework was a representation of my Dad’s holiday house in Sweden in the Winter so I decided early on I wanted to experiment with particle physics. After reading a couple of articles on the subject I created a working particle engine that would work for both snow and smoke changing just the initialisation parameters. I then created a particle manager to manage multiple particle systems.

The problem I had with my particle engine was that it doesn’t use the PS2’s Vector Units, doing all calculation on the CPU. My final submission contained 3 particle systems which lowered my framecount to 56fps. For a demo this is acceptable, but would not be usable in a larger application.

The final addition to the application was a scene manager that used TinyXML to load the scene information from a config file so changing particle location and lighting would require the application to be recompiled every time. With this in place it would then be possible to create, modify and remove all aspects of the application, except from textures, as was mentioned above. It was also possible to replace textures for models using the scene manager, making it more flexible.

The final application showed the house and ground as 3D models loaded in with the ground having a different texture specified than is in the model file (that of a snowflake infact) it had 3 particle emitters to give an even spread of snow across the application and it had a single directional light.

Note: The screenshot was taken shortly after implementing the scene manager and while experimenting with positioning, spread and number of particle engines. It also does not contain the ground model.

Leave a Reply

Your email address will not be published. Required fields are marked *

Diary of a Slacker