
First demo of kri-3rd-iteration: DUDE
Posted Wednesday, 30 September, 2009 - 16:43 by kvarkAfter several months of development, I'm uploading the first demo of my 3-rd iteration engine.
The Dude.
http://code.google.com/p/kri/downloads/list

Found this model in free access on the internet: 20k vertexes, 52 bones.
- Rendering it in 6.5 passes:
- (0.5) applying skinning via TransformFeedback
- (1) filling depth buffer (early z-cull)
- (1) filling color buffer with emissive component
- (2) filling exponential shadow maps for 2 lights
- (2h) applying these 2 lights contribution
Render result is almost indistinguishable from Blender rendering, but still there is work to do with lighting (specular component seems to be higher than it should).
Performance is constant 250 fps on Radeon 4670 HD regardless of a window size.
Of course, deferred Render will fit *much* better to render this high-poly model, and it's now in development.
Anyway the engine aims primarily for low-poly models with parallax maps, so deferring is not strongly necessary.
Engine's features can be found near the download page.
Hope it will run on your machine... Enjoy!
- kvark's blog
- Login or register to post comments


Comments
Re: First demo of kri-3rd-iteration: DUDE
It shuts down without any error message or other useful information why. The OS install is rather young: Win7 x64 RC1 with all hotfixes, Catalyst 9.9 (Radeon 3870), .Net Framework 4.0 beta 1. Does the demo require any other libraries installed (python or something else)?
Re: First demo of kri-3rd-iteration: DUDE
Also crashes here, in the Shader() constructor (soryy, tested only on Mono so no line numbers):
Couldn't find "copy_v.glsl" anywhere in the zip - some resources are missing?
Re: First demo of kri-3rd-iteration: DUDE
Thanks for trying, guys! It's a pity you weren't able to see it...
The demo requires the following:
.net 3.5
proper OpenGL 3.0 support from driver (Catalyst 9.9+ for ATI)
I tried it on a different computer as well and saw the crash. But I really don't know what's happening... I'm not aware much about aspects of .Net apps execution on different computers. Building the same code produces working executable on the computer where I failed to launch the demo.
2Fiddler:
You probably running the app directly, where the working dir is not set up properly. Try launching the run.cmd script from the demo root folder, please.
Re: First demo of kri-3rd-iteration: DUDE
Ah, I see. Still fails: dude is trying to load copy_v.glsl from the engine/shaders folder but this file does not exist there (note: there's no engine folder in demo_dude.zip, I used the one from kri-1.95.zip).
The closest match seems to be vp_copy.glsl, which fails with:
Ati 4850 with catalyst 9.9 on Ubuntu amd64.
Edit: adding "#version 130" to the shader resolves this issue. However, dude is still looking for non-existent shaders (copy_f.glsl, copy_ar_f.glsl and so on).
Re: First demo of kri-3rd-iteration: DUDE
Oh, sorry guys!
I have to supply engine shaders to allow demo to run...
Give me a second to reupload the demo ;)
Re: First demo of kri-3rd-iteration: DUDE
Tried the updated version - now it finds the shaders as expected!
The #version issue remains, however:
Ati seems to require the #version 130 directive when using forward-compatible contexts. I haven't cross-checked this with the specs, but IIRC this is the correct behavior.
Re: First demo of kri-3rd-iteration: DUDE
Weird things happen around:
* I deleted the old file from google project, uploaded a new one with the same name, but it seems to be the old one now...
* You can not use shaders from kri-1.95, because it's an old version of iteration-2. It was long ago... in C++, it's not compatible with current version.
* You can use shaders from SVN of the project - that's the only one solution for now...
* 9.9 Driver doesn't complain about missing #version in GLSL under Windows by some reason. Adding #version 130 makes numerous compiling errors in fragment shaders with following messages:
"error(#239) Declaration must include a precision qualifier or the default precision must have been previously declared"
I know it can be bypassed by putting 'lowp' before any type mentioning, but it's ridiculous! Do you know a simpler way?
* The current version (that I tried to upload) features complete DualQuaternion-based skinning (on both sides: CPU+GPU) and fixed tangental space of mirrored UV polygons (not too many on this model, so you'll not see the difference).
Re: First demo of kri-3rd-iteration: DUDE
Google tricked twice on me :) I though the file wasn't uploaded correctly, but it was just my Chrome's cache containing old archive :)
So, those, who use Windows sometimes, are able to see the demo.
For Linux-based minds, the problem with precision qualifiers remains...
Re: First demo of kri-3rd-iteration: DUDE
[#version]
It could be that 9.9 linux drivers are using an older version of the OpenGL stack. This will probably be fixed in 9.10.
[Precision qualifier]
You can add "precision lowp float;" to each shader file (instead of each type). It's still ridiculous, albeit less so.
[Dual quaternions]
I've been reading some material and they look very interesting.
Re: First demo of kri-3rd-iteration: DUDE
[version]
No, I think it has to complain about missing version in GL3. My context under Windows doesn't seem to be correct 3.0 (but the logs are OK).
[precision]
thanks, that helped! I can afford 2 lines per shader (version + precision).
[dual quaternions]
As I initially aimed to deal exclusively with quaternions (no matrices!), this new technology fits my engine very nicely. However, I have to admit that the code for DQ is a bit tricky: I'm using just 2 complex optimized operations:
1) form a DQ from weighted 2 spatial transformations (represented by rotation quaternion + position offset).
2) write the normalization result to the output transformation (used math optimizations described in DQ paper to avoid real DQ normalization).
I'm trying to say that If I had DQ fully supported by OpenTK with standard operations like addition, multiplications & normalizations - it wouldn't help me even a bit...