|
May 18
2009
|
|
|
Hi everybody!
I have decided to distract from my diploma and write about our progress.
So. Image system is totally rewritten. Before now we were using D3DX Sprites and we decided to use pure vertex buffers. Results:
- rendering to large images and textures works fine now
- reflection of fan in Robodoll demo works correctly (it didn't work on some videocards)
xScript is updated. Now xExecuteScript has two arguments. The first one stayed permanent, the second argument is an entry point prototype. It's needed for calling of any function from a script ( int main() was allowed before). Moreover following functions were added too:
- void xSetIntegerArg(int index, int value);
- void xSetFloatArg(int index%, float value);
- void xSetStringArg(int index%, const char * value);
- int xGetIntegerReturn();
- float xGetFloatReturn();
- const char * xGetStringReturn();
The first three functions are used for passing arguments to called function.The last functions are used to get return value.
Rendering of animated meshes works faster now. Especially in PSSM. For example, some code showed 11 fps, after optimization it shows 100-120 fps! Anyway it's not the limit, we are still optimizing our engine.
Log system works now! I'm sure you've noticed every error message ends with "See log file for more information", but no log file was there. Now it's fixed. New log system allows writing log entries into html-file with color highlighting, standard output buffer (some Blitz3d editors capture and show it, for instance BlitzEdit does this. Or you can capture std::cout by yourself if you use c/c++) and a string. Output targets can be combined. It means you can log into html and string, or only std::cout or use all targets, anything you want. Secondly, log system makes entries with different priorities. They are:
- info
- message
- warning
- error
- fatal
If you are not interested in entries with low priority, you can change output level and log only errors and fatal errors, for instance.
But it will take some time to add logs for every function, because number of functions in Xors3d is already greater than 450, not to mention thousand functions and mentions which are not accessible for users.
Shader materials. Fresh ground is broken. Now the majority of constants the engine passes to shader automatically. You just need to specify semantics of constants in shader and load this shader as usual. Xors3d will make all dirty work for you. Here is a full list of supported semantics:
- Matrices
- MATRIX_semantic // semantic is a semantic like WORLD, VIEW etc (float4x4)
- Textures
- TEXTURE_n // n is a number of texture layer
- Light sources
- LIGHTn_POSITION // n is a number of light source (float4)
- LIGHTn_DIRECTION // n is a number of light source (float4)
- LIGHTn_RANGE // n is a number of light source (float4)
- LIGHTn_INNER // n is a number of light source (float4)
- LIGHTn_OUTER // n is a number of light source (float4)
- LIGHTn_COLOR // n is a number of light source (float4)
- Surface material
- COLOR_DIFFUSE // A-component contains alpha value of surface (float4)
- COLOR_SPECULAR // (float4)
- SPECULAR_POWER // (float)
- Global
- COLOR_AMBIENT // (float4)
EntityFX and blending modes are set automatically too.
BTW, we are going to make a visual editor to make shader development more easier.
Deferred Shading. Before now Xors3d used only Forward Shading. It's not so bad, but only if you use one or two light sources. That's why we implemented Deferred Shading. It allows to render dozens of light sources and get a good FPS. Here is some statistics
|
|
1 | 2 | 4 | 8 | 12 | 100 | ||
| Nvidia GF 9600 gt 512 mb | 600 | 420 | 320 | 220 | 140 | 25 | ||
| GF-8800 GT 256MB | 550 | unknown | unknown | unknown | 235 | 36 | ||
| Radeon X1300LE 256MB/64 bit | 30 | 25 | 19 | 13 | 10 | unknown | ||
| GeForce 6600 128MB/128bit | 53 | 44 | 34 | 23 | 17 | unknown | ||
| GeForce 6200 512MB (int) | 41 | unknown | unknown | unknown | 16 | 3 | ||
| GeForce 6200 128MB | 25 | unknown | unknown | unknown | 10 | 1-2 | ||
| GeForce 6150SE (int) | 19 | 16 | 12 | 8 | 6-7 | unknown | ||
| Radeon HD4850 512Mb | 560 | 515 | 425 | 315 | 250 | 46 | ||
| Radeon HD3870 | 430 | 280 | 270 | 260 | 238 | 40 | ||
| Radeon X1250 | 20 | 18 | 14 | 11 | 9 | unknown | ||
| Radeon X700 Pro 128 Mb | 70 | 55 | 40 | 25 | 20 | 3 |
To enable DS you should write only a couple of strings of code (more information in update). All information about light sources and entities passes to DS-shader automatically.
Xors3d Deferred Shading Test from Xors3d Team on Vimeo.
This small scene is lit by 16 light sources. 40K polies, 65fps on 7600GT
Deferred Render Video by Knightmare from Xors3d Team on Vimeo.
Captured on ATi Radeon 3650, 100 point lights, 40K triangles in scene, normal-mapping, per-pixel lighting, specular lighting
Now we are working on improvement of PSSM for Forward and Deferred Rendering.
Stay tuned.