Tuesday, 27 January 2009

Long Overdue Update - Program Structuring and Initial Implementation

The requirement of having to hand in other courseworks have meant that progress in the project area has been slow until just recently so partially the reason for no blog updating was because there just wasn't much worth reporting. Though the possibility of being unable to start implementation was planned for in the predicted timetable so besides the lack of updates the schedule is not far off the mark.

One advantage of having these other courseworks is that it has given the opportunity to learn more about optimisation and program structuring through practice. For one thing the framework I have built up for DirectX is now almost all Object Oriented. The application is currently having to be thoroughly planned before progressing much further in order to avoid massive restructuring later on, not only that but bad structuring could also hinder the application at run time. One issue when creating Objects is whether to create a new Object and pass data to it from the Objects or whether to make the Object part of a heirarchy so that it's members and functions are inherited.

One thing that I have been adding to the framework that was not originally intended is now to make the application capable of using DirectX 9 or DirectX 10. There are large differences between the two API versions but greater application portability could be helpful. It seems sensible to try a similar approach when it comes to try to implement CUDA though that is far off yet.

Using a similar approach to one of the aforementioned courseworks a system for plotting and positioning Basis Splines (B Splines) has currently been included in the application. The ends of the Basis Spline are clamped to avoid unwanted behaviour at those points. Positioning the Splines in space at current uses Rotation and Scaling matrices to result in a semi spherical pattern. This pattern is basic butwill serve for now. At current the rotation of the individual Splines is not quite what was intended, the matrix multiplication probably requires changes in order to rectify the mistake.



Optimised rendering has quickly become the main issue to consider for the work at hand. At current the application is rendering keyhairs as green lines and each line has it's own vertex buffer. This is a grossly inefficent manner of using vertex buffers and the framerate suffers as a result. Luckily the keyhairs don't need to be rendered in the final version. A single Vertex buffer and Index buffer would probably be the best approach to improving rendering efficiency.

No comments: