aflorko
Community Member

Posts: 50
|
 |
« on: April 04, 2009, 09:18:55 AM » |
|
Hello everybody, I would like to share MSVS2008/C# demo project and I'll be very pleased to hear any comments and advises. It's more to engine than "lesson", so code is not very straight-forward. It'll be a kind of arcade racing simulator for home fitness purpose. Code is raw and unstable - it'll be refactored many times, no binaries in zip file, hopefully, sources will be able to compile Key features of demo: * Instancing * Multi-noised-parallaxed landscape * Meshes LoDs (not very usefull in demo) * Declarative approach to render and scene definition (take a look into themes\theme.xml) Version 0.2 http://www.megaupload.com/?d=VUW71SG3* Landscape even more variable. The only landscape mesh of 4K triangles is tiled and stretched by x- and y- axis. Chase the road with camera - it's very arcadable demo for my taste  Reminds me old good days of zx-spectrum )) * Basic collision detection. Not really collision, i just implemented the way to track camera on the road. * I parallelized some computations. Sorry, code became even less straight-forward. * Some minor bugs fixed, major bugs added )) Don't know what to do with shaders array sizes yet Version 0.3 http://www.megaupload.com/?d=N0IXLSXO* Multithreading issues fixed * Speculars almost on everything Version 0.4 http://www.megaupload.com/?d=SCW1E55K* Simple shadows addded (kind of PCF) * Some kind of deffered shading implemented (not completely deffered:) ) * Scene is optimized to be rendered when camera is on the road (where it is supposed to be)
|
|
|
|
« Last Edit: April 12, 2009, 09:37:53 PM by aflorko »
|
Logged
|
|
|
|
Omnicrash
Community Member

Posts: 66
|
 |
« Reply #1 on: April 04, 2009, 11:23:53 AM » |
|
Very nice landscapes! Thanks for sharing this!
|
|
|
|
|
Logged
|
|
|
|
aksoysoft
Community Member

Posts: 46
|
 |
« Reply #2 on: April 05, 2009, 03:51:22 AM » |
|
very a successful demo.  The building was beautiful reflections. I wish you success.
|
|
|
|
|
Logged
|
|
|
|
aflorko
Community Member

Posts: 50
|
 |
« Reply #3 on: April 05, 2009, 09:09:08 AM » |
|
Thanks everybody, I am programming 3D last 9 months )) My programming experience is related to asp.net/t-sql area 
|
|
|
|
|
Logged
|
|
|
|
|
Zaknafein
|
 |
« Reply #4 on: April 05, 2009, 05:20:58 PM » |
|
Hmm.. Doesn't seem to work as expected on my machine. There's only one building, no forest, and the building is reallllly slow when I move too close to it. I suspect that the position values are screwed and all the assets appear at the same place. In the debug, the only offending lines are : 04-05-2009 18:14:19 | STREAM MANAGER : Couldn't open file 'C:\Users\Renaud\Downloads\Demo\Themes\..\Textures\rocks1_diff.dds' 04-05-2009 18:14:19 | TEXTURE MANAGER : Couldn't find the texture file C:\Users\Renaud\Downloads\Demo\Themes\..\Textures\rocks1_diff.dds. I don't think that's a problem. One thing, I'm on a machine with fr-CA (french canadian) culture, so the numbers use commas instead of periods for decimal separators. But I looked in your code and it looks like you're using InvariantCulture wherever you need to, so I dunno. Also I tried putting Thread.CurrentThread.CurrentCulture = CultureInfo.InvariantCulture; In the Form_Load event, doesn't change anything. Any idea?
|
|
|
|
|
Logged
|
|
|
|
aflorko
Community Member

Posts: 50
|
 |
« Reply #5 on: April 05, 2009, 10:19:14 PM » |
|
Please, can you send your video card specs? You are completely right about houses in one place. I faced the same bug on my PC some days ago and it was connected to instancing. Sizes of the consts array in shaders were too big. Thank you, there is bug in configuration file - it references to missed files (actually files exists whith different extension). I'll update demo in a few days. There should be some interesting updates in it 
|
|
|
|
« Last Edit: April 05, 2009, 10:54:14 PM by aflorko »
|
Logged
|
|
|
|
|
Zaknafein
|
 |
« Reply #6 on: April 05, 2009, 10:59:40 PM » |
|
Ah! I have a GeForce 7600 Go video card, it supports Shader Model 3.0 fully.
|
|
|
|
|
Logged
|
|
|
|
aflorko
Community Member

Posts: 50
|
 |
« Reply #7 on: April 05, 2009, 11:20:40 PM » |
|
Ok, my advise is to play around magic array size [52] increasing it in house.fx float4x4 minimeshes[52] : MINIMESH_WORLD;
and magic array size 26 in tree.fx float4x4 minimeshes[26] : MINIMESH_WORLD; float4 minimeshes_color[26] : MINIMESH_COLOR;
I hope TV3D developers will tell how do determine correct array sizes. My video is low-end 2007 ATI HD 2400
|
|
|
|
|
Logged
|
|
|
|
|
Zaknafein
|
 |
« Reply #8 on: April 06, 2009, 12:30:53 AM » |
|
Well this is confusing.  I started by playing with the number (like put it to 16 everywhere, since this is the vs_1_1 profile value), made no difference. Then I debugged a bit and found that you set the internal shader version to 1.1 when you initialize the engine... and then test against that value to know which technique you're going to use. This makes it fall back to the vs_1_0/ps_1_0 shaders all the time! So I tried removing that forced shader profile, and now it just won't start. And the debug file now says... 4-06-2009 01:26:12 | SHADER MANAGER : Shader technique 'Single3' couldn't be validated 04-06-2009 01:26:12 | SHADER MANAGER : Shader technique 'Single2' couldn't be validated 04-06-2009 01:26:12 | SHADER MANAGER : Shader technique 'Single1' couldn't be validated 04-06-2009 01:26:12 | SHADER MANAGER : Shader technique 'Multiple3' couldn't be validated 04-06-2009 01:26:12 | SHADER MANAGER : Shader technique 'Multiple2' couldn't be validated 04-06-2009 01:26:12 | SHADER MANAGER : Shader technique 'Multiple1' couldn't be validated 04-06-2009 01:26:12 | SHADER MANAGER : Shader 'tree' successfully created. 04-06-2009 01:26:12 | SHADER MANAGER : Shader technique 'Single3' couldn't be validated 04-06-2009 01:26:12 | SHADER MANAGER : Shader technique 'Single2' couldn't be validated 04-06-2009 01:26:12 | SHADER MANAGER : Shader technique 'Single1' couldn't be validated 04-06-2009 01:26:12 | SHADER MANAGER : Shader technique 'Multiple3' couldn't be validated 04-06-2009 01:26:12 | SHADER MANAGER : Shader technique 'Multiple2' couldn't be validated 04-06-2009 01:26:12 | SHADER MANAGER : Shader technique 'Multiple1' couldn't be validated 04-06-2009 01:26:12 | SHADER MANAGER : Shader 'road' successfully created. 04-06-2009 01:26:12 | SHADER MANAGER : Shader technique 'Single3' couldn't be validated 04-06-2009 01:26:12 | SHADER MANAGER : Shader technique 'Single2' couldn't be validated 04-06-2009 01:26:12 | SHADER MANAGER : Shader technique 'Single1' couldn't be validated 04-06-2009 01:26:12 | SHADER MANAGER : Shader technique 'Multiple3' couldn't be validated 04-06-2009 01:26:12 | SHADER MANAGER : Shader technique 'Multiple2' couldn't be validated 04-06-2009 01:26:12 | SHADER MANAGER : Shader technique 'Multiple1' couldn't be validated 04-06-2009 01:26:12 | SHADER MANAGER : Shader 'house' successfully created. 04-06-2009 01:26:13 | SHADER MANAGER : Shader technique 'Single3' couldn't be validated 04-06-2009 01:26:13 | SHADER MANAGER : Shader technique 'Single2' couldn't be validated 04-06-2009 01:26:13 | SHADER MANAGER : Shader technique 'Single1' couldn't be validated 04-06-2009 01:26:13 | SHADER MANAGER : Shader technique 'Multiple3' couldn't be validated 04-06-2009 01:26:13 | SHADER MANAGER : Shader technique 'Multiple2' couldn't be validated 04-06-2009 01:26:13 | SHADER MANAGER : Shader technique 'Multiple1' couldn't be validated Wtf...  One thing : I don't think using vs_1_0/ps_1_0 is a good idea, a lot of things don't work in these profiles... vs_1_1 and ps_1_4 are the usual baseline. Changing this didn't fix anything though. And setting the technique by name every frame doesn't sound very efficient. Not sure what's the cost of this, but it should be a one-time thing. Update...Putting 52 for all minimesh array sizes prevents it from crashing, but I have the same problem of all the trees and buildings being at the same place, and the debug log still says every technique can't be validated. All the shaders compile in my external shader compiling tool, so it's not a syntax problem. They probably run out of constants or something...
|
|
|
|
« Last Edit: April 06, 2009, 12:40:05 AM by Zaknafein »
|
Logged
|
|
|
|
aflorko
Community Member

Posts: 50
|
 |
« Reply #9 on: April 06, 2009, 12:40:59 AM » |
|
Thank you for effort, please, share your test investigation results & i'll take it into account.
|
|
|
|
|
Logged
|
|
|
|
Raul
Customers
Community Member
    
Posts: 550
I like games.
|
 |
« Reply #10 on: April 06, 2009, 12:29:41 PM » |
|
You are trying to download: demo.zip Sorry this download link doesn't exists  Edit: now is working. superb demo. i will learn a lot. thanks.
|
|
|
|
« Last Edit: April 06, 2009, 01:00:55 PM by Raul »
|
Logged
|
|
|
|
aflorko
Community Member

Posts: 50
|
 |
« Reply #11 on: April 11, 2009, 09:24:08 AM » |
|
I added simple shadows
|
|
|
|
|
Logged
|
|
|
|
|
TecnoBacon
|
 |
« Reply #12 on: April 11, 2009, 09:33:13 AM » |
|
worst download site ever, those four character codes are impossible to read
|
|
|
|
|
Logged
|
|
|
|
|
|
aflorko
Community Member

Posts: 50
|
 |
« Reply #14 on: April 11, 2009, 02:47:14 PM » |
|
|
|
|
|
|
Logged
|
|
|
|
|
|
|
SylvainTV
|
 |
« Reply #16 on: April 12, 2009, 03:42:20 PM » |
|
Very cool ! Keep up the good work !
|
|
|
|
|
Logged
|
|
|
|
|
Zaknafein
|
 |
« Reply #17 on: April 14, 2009, 05:05:54 PM » |
|
OK, found the problem for all shaders that couldn't be validated... It was because I set the DirectX DLLs to "Debug" in my control panel while debugging my own game. This makes the compiler much more sensitive to warnings and probably scared TV3D.  Now they load fine, but all I get is a black screen in the latest version. The debug file is spotless, no problem there. I have a GeForce 7600 and Mietze's PSSM sample works.
|
|
|
|
|
Logged
|
|
|
|
aflorko
Community Member

Posts: 50
|
 |
« Reply #18 on: April 15, 2009, 12:04:23 AM » |
|
I have found somewhere in forum something about new compilation features in TV3D 6.5 that makes compilation not stable and the way to use previous compilation engine but lost now.
Thank you for bug report I'll debug my app as soon as will be able to reproduce bug on some workstation around me.
|
|
|
|
|
Logged
|
|
|
|
Shohagh
Community Member

Posts: 2
|
 |
« Reply #19 on: August 06, 2009, 03:45:03 AM » |
|
Hi, i'm shohagh and try to run summer evening city all version but none of them are not running some error occure probably "#include resource memory reference" now how can i run this source code in my computer. please help me.
|
|
|
|
|
Logged
|
|
|
|
|