Friday 3 May 2013

Friday Stamping

Finally A Shot

More coding done and finally a little screen shot for you.  Nothing too exciting, but if I was reading this blog I would like 'any' kind of screen shot by now.


What you see here is a prototype program which compares the memory and performance of the three competing techniques of CLONING, INSTANCING and STAMPING.  You are looking at the third mode, with one hundred objects being stamped into a single DirectX buffer and not taking more than 271MB of application memory.

The reason we are at 1fps is the next thing I am tackling, which is that populating a single buffer with the polygons you see takes almost a second, as each vertex is transformed a fresh.  The final implementation will only create and introduce new vertex data as you initially encounter it. Where I to stop the polygon additions, the FPS would jump back up to a steady 3000 :)

Large Buffers

I am not sure what effects using very large buffers will bring with the final engine as it is recommended a buffer should only be around 1000-2000 polygons, with mine holding many many times that right now.  I am also deciding how to group up the polygons to make occlusion more efficient.  Having one buffer holding 10000 polygons of floor in it spread over the whole level would be impossible to occlude, where as 10 buffers each with 100 polygons would occlude better but won't render as quickly. For decisions like that, you can only really tell when everything is coded and you start performance tests with everything else running.

For now, I have added to code ensure the larger buffers are not overfilled and render properly. I am transforming the parent mesh data directly into the buffer so there is no redundant memory usage, and we will see if too many buffer locks impact on the performance side. Ultimately it will be down to memory vs performance ;)

Signing Off

I have the family visiting over the weekend, but will be aiming to get some good hours of coding in to further this prototype and hopefully be in a position next week to add to the main map editor and see what kind of memory usage scenario we have.  From an overall progress point of view, it might seem like a step backwards now we have no textures and light maps, but I think this was a battle worth fighting early, and I am pretty sure 100% of the Reloaded community agree on that ;)

2 comments:

  1. "I think this was a battle worth fighting early, and I am pretty sure 100% of the Reloaded community agree on that ;)"

    ABSOLUTELY! No doubt about it :)

    ReplyDelete