Thứ Sáu, 10 tháng 5, 2013

Friday Gotta Wear Shades

We Have Colour

That's right boy and girls, we have a texture and shader now rendering the polygons in my massive geometric soup! Here is what I am looking at right now at midnight:


So what you are looking at is quite a lot of magical back-end stuff, and precious little front-end eye candy!  The Paradroid System is complete and buffers are now retired until needed again. As I suspected, after a few seconds of roaming the buffers level out at a certain memory usage and stays there which is great.

The above scene is a typical 200x20x200 universe with a simple floor segment pasted randomly once every three roles of the dice.  As you can see, it stretches from the floor to 20 layers high and off into the distance which I have cropped at 40 segments in any direction. This was the maximum distance you could view in the classic FPSC so should not upset too many people, and until we start adding real assets I am not sure what the final distance should be, and will probably be in the SETUP.INI file so you can change this from game to game.

As you can see from the statistics we are really hogging the graphics card which can only manage 22fps with unoccluded polygons, but the critical figure to view is the memory which is only 379MB.  That's a third of the potential 800,000 segment tiles filled and rendering in all directions, and it's well within our maximum memory budget.  The theory worked!

I Could Stop

With such a result I could pat myself on the back and have the rest of Friday off, but I am in a coding mood and not tired so will continue onwards.  Given what I have now, I need to move it to the next stage of using different kinds of segments.

I reduced the default size of buffers from 20,000 vertices to just 200 polygons so I could accommodate such as large scene, but the final system needs to handle buffers of many sizes. Some tiles will just have a floor segment, but others could have a complicated 10K polygon entity duplicated many times, and the system needs to adapt to this scenario.

Once this has been dealt with, I can create a more realistic scene with different segments and entities to populate my prototype with.  I also need to think about a few levels of LOD while I am in the neighbourhood too.  No sense rendering everything within the camera frustum at full detail as a nice carved statue viewed at the very edge of sight would not contribute much to the game except slow it down and hog memory.

Signing Off

If anyone knows of a good 'free' tool which can take an X file and reduce it down to use fewer polygons, then save it back out as an X file, that would be good. I have used many, but not done so recently, and maybe something new has appeared? Ultimately of course the assets will have professionally prepared LOD meshes for improved in-game rendering. Plenty more to do of course, including putting the light mapping back in, selecting a good universal shader set, dynamic meshes and dynamic lighting, adding physics on the fly, cutting CSG operations directly into the buffer data, the list is endless :) Just like climbing Snowdon, you do it one step at a time!

Không có nhận xét nào:

Đăng nhận xét