Show Posts
|
|
Pages: [1] 2
|
|
1
|
Crystal Space Development / General Crystal Space Discussion / Re: VFS SUCKS!!!
|
on: October 24, 2006, 05:18:05 pm
|
|
learned two new things about VFS today
one you can use the vfh[exe] program from cs to browes you VFS setup, copy it to your application directory and run it.
two when using // Load application-specific configuration file. if (!csInitializer::SetupConfigManager(r, "/this/vfs.cfg", GetApplicationName()) )
the file must be called "vfs.cfg" or any mount commands in the cfg file will not work !!!!
regards
|
|
|
|
|
3
|
Crystal Space Development / Support / Re: Strange Light behavior
|
on: September 30, 2006, 06:04:26 pm
|
I created a world.zip file for walktest. Get different problems but probably the same cause. I created a sphere and a plane at (0,0,0) and (0,100500,0) , the meshes at (0,0,0) work as expected, but the meshes at (0,100500,0) dont seem to be visiable or working with the collision detection. File can be DL from http://www.uploading.com/files/Z38R0FY5/world.zip.htmlthere are 2 camera positions, camera position works ok, camera2 and you are falling through darkness. If some else could try this out and see if it's a local problem or something more general I would be very happy  Regards
|
|
|
|
|
4
|
Crystal Space Development / Support / Re: Strange Light behavior
|
on: September 30, 2006, 12:47:54 pm
|
|
CS SVN REV: 25428 Renderloop ? Dont know, what exactly is the render loop?. Shaders? Dont think i am using any shaders.
Sorry I cant give much info as i have not really gotten that far into CS. It's a very basic setup, Basicly Load a bunch of pluging and a nearly empty world XML file. then it adds the meshes and the light. The meshes are there and are easly seen if they are less that 100500 from the light.
I will try recreate the behavior using a simple XML world file and walktest and post it somewhere.
regards
|
|
|
|
|
5
|
Crystal Space Development / Support / Strange Light behavior
|
on: September 29, 2006, 08:59:36 pm
|
|
Hi, I created a light using
csRef<iLight> light; iLightList* ll = room->GetLights ();
light = engine->CreateLight(0, csVector3( 0, 0, 0), 1000000, csColor(1, 1, 1)); ll->Add (light);
and created a bunch of sphere's using
csRef<iMeshWrapper> mesh (engine->CreateMeshWrapper (ballFact, "ball", room));
the sphere's are
createsphere( "100000" , radius, center, "grid.jpg" , csVector3 (100000,0,0) ); createsphere( "100250" , radius, center, "grid.jpg" , csVector3 (100250,0,0) ); createsphere( "100500" , radius, center, "grid.jpg" , csVector3 (100500,0,0) ); createsphere( "100700" , radius, center, "grid.jpg" , csVector3 (100700,0,0) ); createsphere( "101000" , radius, center, "grid.jpg" , csVector3 (101000,0,0) );
createsphere( "146000" , radius, center, "grid.jpg" , csVector3 (146000,0,0) );
The problem is that after the 100500 sphere the ligh only seems to work if camera can see the light. say i am at 109000,0,0 looking at a sphere it's totaly black, but if i move the camera to 101100, 500, 0 and look back to 0,0,0 I can see the sphere.
is this expected behavior?
CS Rev 25428
regards
|
|
|
|
|
6
|
Miscellaneous / Article/Tutorial Requests / Re: Confused
|
on: September 23, 2006, 09:43:10 pm
|
Well you need to give more information when you ask a question, saying it dont work is not the way to go. have you tried To compile Crystal Space, you'll have to perform the following steps. If anything doesn't work, see the Win32 FAQ, MSVC7 FAQ.
1. Load `CS\mk\msvc\wkstypical.sln'. 2. From the file menu select Build->Build Solution. Note: If you want to build a debuggable version of Crystal Space, you should select the Debug build mode; otherwise select the Release build mode. Do not use the special-purpose ExtensiveMemDebug build mode. 3. After a while the compilation should finish. The signal for a successful build will be come in the form of the something similar to the following:
Build: 1 succeeded, 0 failed, 0 skipped
and if so what went wrong. did you down load the CS code, and where did you install it? what version? can you find the file "wkstypical.sln"? if not does it exist? if so is you file open dialog giving you the option of opening a .sin file? ect... Give as much detail as you can and you will get more help. I dont use windows so I cannot really help you much. can only suggest you write a long post detailing everthing and at what point the instructions stop working took me about a day to get CS working, linux dependancy hell  , but it can be done in both linux and win, you just missing somthing simple. regards and good luck
|
|
|
|
|
8
|
Crystal Space Development / Support / Re: Confused, cant get a camera and mesh to rotate the same way?
|
on: September 07, 2006, 09:08:37 pm
|
|
well figured out my problem. The mesh I am tring to rotate the same as the camera is a child mesh. So if i set the child mesh with the rotation of the camera is does not take into account the rotation of the parent mesh.
So I am thinking the smart thing to do is rotate the mesh and make the camera match. Might still have the same problem. So a question, how do you sum 2 csMatrix3 rotation?
|
|
|
|
|
10
|
Associate Projects / CEL Discussion / CEL wheeltest bug. I think. ODE INTERNAL ERROR 2: Bad argument(s) in dxSphere()
|
on: September 02, 2006, 07:50:35 pm
|
|
Using very recent rev's of CS/CEL/ODE and started getting this error running wheeledtest.
ODE Rev 1052 CEL Rev 2203 CS rev 25263
This is new as wheeledtest used to work. Not sure where i should put this, here or at the ODE site
output is as follows
./wheeledtest
crystalspace.canvas.glx2d: Opening GLX2D Creating Context Video driver GL/X version (direct renderer) Visual ID: 0x00000021, 24bit TrueColor R8:G8:B8:A0, level 0, double buffered
crystalspace.canvas.openglcommon.driverdb: Applied: Broken ATI point sprites (NV)
crystalspace.canvas.openglcommon: OpenGL renderer: GeForce 6600 LE/AGP/SSE2 (vendor: NVIDIA Corporation) version 2.0.2 NVIDIA 87.62 Using windowed mode at resolution 640x480. Pixel format: Color: 24 Alpha: 0 Depth: 24 Stencil: 8 AccumColor: 48 AccumAlpha: 16 MultiSamples: 0 Multisample: disabled
ODE INTERNAL ERROR 2: Bad argument(s) in dxSphere() Aborted
Anyone else getting this?
|
|
|
|
|
11
|
Crystal Space Development / Support / Confused, cant get a camera and mesh to rotate the same way?
|
on: September 02, 2006, 03:53:06 am
|
Been trying to do this for a while now. I want to move the camera to the position of a mesh and then rotate the mesh the same as the camera. For some reason the mesh rotates in the opposite direction to the camera. This worked fine with a normal mesh, don't seem to work with a child mesh. Here is some code so you can see what i am trying void AppSol::ProcessFrame() { csVector3 start, end; iMovable* movable ; csReversibleTransform pot; csMatrix3 rot;
if (g3d->BeginDraw(engine->GetBeginDrawFlags() | CSDRAW_3DGRAPHICS)) { // First get elapsed time from the virtual clock. csTicks elapsed_time = vc->GetElapsedTicks (); // Now rotate the camera according to keyboard state float speed = (elapsed_time / 1000.0) * (0.06 * 20);
iCamera* c = view->GetCamera();
if (kbd->GetKeyState (CSKEY_SHIFT)) { // If the user is holding down shift, the arrow keys will cause // the camera to strafe up, down, left or right from it's // current position. if (kbd->GetKeyState (CSKEY_RIGHT)) c->Move (CS_VEC_RIGHT * 4 * speed); if (kbd->GetKeyState (CSKEY_LEFT)) c->Move (CS_VEC_LEFT * 4 * speed); if (kbd->GetKeyState (CSKEY_UP)) c->Move (CS_VEC_UP * 4 * speed); if (kbd->GetKeyState (CSKEY_DOWN)) c->Move (CS_VEC_DOWN * 4 * speed); } else {
if (kbd->GetKeyState (CSKEY_RIGHT)) c->GetTransform().RotateThis(CS_VEC_ROT_RIGHT, speed); if (kbd->GetKeyState (CSKEY_LEFT)) c->GetTransform().RotateThis(CS_VEC_ROT_LEFT, speed); if (kbd->GetKeyState (CSKEY_PGUP)) c->GetTransform().RotateThis(CS_VEC_TILT_UP, speed); if (kbd->GetKeyState (CSKEY_PGDN)) c->GetTransform().RotateThis(CS_VEC_TILT_DOWN, speed);
if (kbd->GetKeyState (CSKEY_UP)) c->Move (CS_VEC_FORWARD * 4 * speed); if (kbd->GetKeyState (CSKEY_DOWN)) c->Move (CS_VEC_BACKWARD * 4 * speed);
if (kbd->GetKeyState (CSKEY_F1)) { // set camera to position.001 // Set controll to turret PlayerMeshName = "trader"; PlayerCrewPos = "turret.001"; playermesh = engine->FindMeshObject ( "trader" , 0 ); aChildren = playermesh->QuerySceneNode()->GetChildrenArray (); playermesh = aChildren->Top()->QueryMesh(); movable = playermesh->GetMovable ();
// get mesh's transform and move camera pot = movable->GetFullTransform(); c->SetTransform (pot); } //end if select turret }// end if key press
// It's a turret position, only change the rotation // Position our playermesh the same as camera movable = playermesh->GetMovable (); end = movable->GetTransform().GetOrigin (); // want this mesh to say at it's current loc rot = c->GetTransform().GetT2O(); csOrthoTransform pot ( rot, end); movable->SetTransform (pot);
// update player mesh in egin world space movable->UpdateMove ();
// Tell 3D driver we're going to display 3D things. if (!g3d->BeginDraw (engine->GetBeginDrawFlags () | CSDRAW_3DGRAPHICS)) return;
// Tell the camera to render into the frame buffer. view->Draw (); } }
I took out some code to make it clearer what i am doing. Seems to me only explanation is that my mesh is upside down in relation to the camera. But I made the transforms the same? any suggestions as to what i am doing wrong? thx
|
|
|
|
|
12
|
Crystal Space Development / Support / Re: Shader not loading
|
on: September 01, 2006, 08:33:48 pm
|
|
basicly a black screen when i run
./walktest stenciltest
and in about ever other CS app i run it says
could not load plugin 'crystalspace.graphics3d.shader.glcg'
But other than that everything seem to be working.
|
|
|
|
|
13
|
Crystal Space Development / Support / Shader not loading
|
on: September 01, 2006, 04:39:37 pm
|
want to find out why my shader is not working output from walktest mec@mec-desktop:~/development/CS$ ./walktest stenciltest -verbose=-scf VFS_NOTIFY: loaded configuration file: /home/mec/development/CS/./vfs.cfg VFS_NOTIFY: merged configuration file: /home/mec/development/CS/vfs.cfg DEBUG: Sound System Software Renderer Initializing...
crystalspace.system: World saving enabled. Crystal Space version 0.99 r0 [Unix-x86-GCC] (Mon 7-Jul-2004). Created by Jorrit Tyberghein and others...
crystalspace.graphics3d.opengl: Texture LOD bias -0.3
crystalspace.canvas.glx2d: Opening GLX2D Creating Context Probing pixel format: Color: 32 Alpha: 8 Depth: 32 Stencil: 8 AccumColor: 0 AccumAlpha: 0 MultiSamples: 0 Probing pixel format: Color: 32 Alpha: 0 Depth: 32 Stencil: 8 AccumColor: 0 AccumAlpha: 0 MultiSamples: 0 Probing pixel format: Color: 32 Alpha: 0 Depth: 32 Stencil: 1 AccumColor: 0 AccumAlpha: 0 MultiSamples: 0 Probing pixel format: Color: 32 Alpha: 0 Depth: 24 Stencil: 1 AccumColor: 0 AccumAlpha: 0 MultiSamples: 0 Video driver GL/X version (direct renderer) Visual ID: 0x00000021, 24bit TrueColor R8:G8:B8:A0, level 0, double buffered
crystalspace.canvas.openglcommon.driverdb: Applied: Broken ATI point sprites (NV)
crystalspace.canvas.openglcommon: OpenGL renderer: GeForce 6600 LE/AGP/SSE2 (vendor: NVIDIA Corporation) version 2.0.2 NVIDIA 87.62 Using windowed mode at resolution 640x480. Pixel format: Color: 24 Alpha: 0 Depth: 24 Stencil: 8 AccumColor: 48 AccumAlpha: 16 MultiSamples: 0
crystalspace.canvas.opengl.extmgr: GL Extension 'GL_ARB_multitexture' found and used. GL Extension 'GL_ARB_texture_env_combine' found and used. GL Extension 'GL_ARB_multisample' found and used.
crystalspace.canvas.openglcommon: Multisample: disabled
crystalspace.canvas.opengl.extmgr: GL Extension 'GL_ARB_fragment_program' found and used.
crystalspace.canvas.openglcommon.fontcache: Text drawing method: Multitexturing
crystalspace.canvas.opengl.extmgr: GL Extension 'GL_version_1_2' found and used. GL Extension 'GL_ARB_texture_cube_map' found and used. GL Extension 'GL_EXT_texture3D' found and used. GL Extension 'GL_ARB_vertex_buffer_object' found and used. GL Extension 'GL_SGIS_generate_mipmap' found and used. GL Extension 'GL_EXT_texture_filter_anisotropic' found and used. GL Extension 'GL_EXT_texture_lod_bias' found and used. GL Extension 'GL_ARB_point_parameters' found and used. GL Extension 'GL_ARB_point_sprite' found, but not used. GL Extension 'GL_EXT_framebuffer_object' found, but not used. GL Extension 'GL_ARB_texture_rectangle' found and used. GL Extension 'GL_ARB_vertex_program' found and used. GL Extension 'GL_EXT_secondary_color' found and used. GL Extension 'GL_GREMEDY_string_marker' not found.
crystalspace.graphics3d.opengl: Maximum texture size is 4096x4096
crystalspace.graphics3d.opengl.vbo: Setting up VBO buffers, VB: 32 MB IB: 16 MB
crystalspace.graphics3d.opengl: Stencil clipping is used for objects >= 50 triangles. Clearing Z buffer when stencil clear is needed enabled
crystalspace.graphics3d.shadermgr: Loaded compiler plugin crystalspace.graphics3d.shadercompiler.xmlshader, compiler: XMLShader
crystalspace.canvas.opengl.extmgr: GL Extension 'GL_ARB_texture_compression' found and used. GL Extension 'GL_EXT_texture_compression_s3tc' found and used.
crystalspace.graphics3d.opengl: Render-to-texture backend: framebuffer Delayed buffer swapping: disabled AFP DrawPixmap() workaround: disabled
crystalspace.graphics3d.shadercompiler.xmlshader: Shader std_lighting_fixed: 8 variations, 9 ms Shader std_lighting: 48 variations, 105 ms Shader std_lighting_portal: unvarying, 1 ms
crystalspace.system: Loading map 'stenciltest'.
crystalspace.graphics3d.shadercompiler.xmlshader: Shader ambient: 7 variations, 5 ms Shader light: unvarying, 29 ms Shader light_bumpmap: unvarying, 57 ms
crystalspace.system: Precaching all things... Precaching finished... Total level load time: 0.783 seconds Computing OBBs ... --------------------------------------
crystalspace.canvas.opengl.extmgr: GL Extension 'GL_EXT_separate_specular_color' found and used. GL Extension 'GL_ARB_texture_env_dot3' found and used.
crystalspace.graphics3d.shader.fixed: Multitexture units: moderate 4
crystalspace.canvas.opengl.extmgr: GL Extension 'GL_version_1_3' found and used.
crystalspace.graphics3d.shadercompiler.xmlshader: Shader 'ambient'<1>: Technique with priority 50 succeeds! Shader shadowextrude: unvarying, 3 ms Shader 'shadowextrude'<0>: Technique with priority 100 succeeds! Shader 'light_bumpmap'<0>: Technique with priority 350 fails. Reason: fragment program failed to load. Shader 'light_bumpmap'<0>: Technique with priority 300 fails. Reason: destination alpha not supported by renderer. Shader 'light_bumpmap'<0>: Technique with priority 250 fails. Reason: destination alpha not supported by renderer. Shader 'light_bumpmap'<0>: Technique with priority 220 fails. Reason: destination alpha not supported by renderer. Shader 'light_bumpmap'<0>: Technique with priority 200 fails. Reason: destination alpha not supported by renderer. Shader 'light_bumpmap'<0>: Technique with priority 150 fails. Reason: destination alpha not supported by renderer. Shader 'light_bumpmap'<0>: Technique with priority 100 succeeds! Shader 'light'<0>: Technique with priority 200 fails. Reason: destination alpha not supported by renderer.
I got a GeForce 6600 LE running on ubuntu6.06 with Nvidia linux Drivers loaded. was wondering if it's the card, driver or OS set up causing the problem. just an anoyance at the moment but I will have to try fix it eventualy  regards
|
|
|
|
|
14
|
Crystal Space Development / General Crystal Space Discussion / Re: VFS SUCKS!!!
|
on: August 30, 2006, 03:18:02 pm
|
|
Just want to make this a more positave post.
My problem with VFS was it's like a black hole. In that stuff goes in but never comes out. As it's the first thing any beginner is going to have to deal with I found the doc's lacked some simple example code to help. Spend a long time looking at segment faults not knowing if the VFS had mounted my files or not. Alter a long time i looking I found a list function in viewtest. As soon as i could see directly what was in VFS things got so much easer.
// Print out dirs list printf ("Dirs\n"); csRef<iStringArray> dirs = VFS->GetMounts (); for (i=0; i < dirs->GetSize(); i++) printf ("%s \n", dirs->Get(i)); printf ("\n");
VFS->ChDir ("/solworld/factories"); // Print out dir-contents printf ("Files\n"); csRef<iStringArray> files = VFS->FindFiles ("*"); for (i=0; i < files->GetSize(); i++) printf ("%s \n", files->Get(i)); printf ("\n");
this little piece of code did more for me that all the doc's on the VFS system.
Regards, VFS works it just hard to tell when it's working and what is in it.
|
|
|
|
|
15
|
Crystal Space Development / Support / Rotate , convert transform matrix to radians?
|
on: August 24, 2006, 08:10:05 pm
|
|
I have been tying to work backwards from a mesh's Transform matrix to work out what the mesh's rotation is in radians. Not having much luck.
Here is a bit of code i was trying but it only worked for some angles and i not smart enough to workout what to do next
........... playermesh = engine->FindMeshObject ( "turret.001" , 0 ); movable = playermesh->GetMovable (); // Get mesh Position start = movable->GetTransform().GetOrigin (); // get mesh Rotation pot = movable->GetTransform();
rotX = getM3xAngle(pot); rotY = getM3YAngle(pot); ........
float AppSol::getM3xAngle ( csMatrix3 m3 ) { //Rotation along the X-axis is represented by: /// 1 0 0 \ //| 0 cos(a) -sin(a) | //\ 0 sin(a) cos(a) / return acos( m3.m22 ); } float AppSol::getM3yAngle ( csMatrix3 m3 ) { //Rotation along the Y-axis is represented by: /// cos(a) 0 -sin(a) \ //| 0 1 0 | //\ sin(a) 0 cos(a) / return acos( m3.m11 ); }
obviously, this does not work but my trig not that good and I cannot work out how to do this. any help welcome.
Regards
|
|
|
|
|
|