How is your near value?how can you see your ship if the near value is 1.0 or more,that is equal to 1km?
nothing is drawn with far value of 384000000.0?
so it may be a problem for me too.I explain:i set the far value to 10000000,that is 10000km,but i can see everything at every distance.
I think that this happens because the projection matrix is build using
matrix4::buildProjectionMatrixPerspectiveFovLH;
elements (2,2) and (2,3) are equal to zFar/(zFar-zNear) and zNear*zFar/(zNear-zFar);
the fact is that (zFar-zNear) subtracts a small value from a great value,so the precision here is a great problem:if (zFar/zNear)>about 10.000.000
the result of (zNear-zFar) operation is simply exactly -zFar.
I don't know exactly how the projection matrix works,anyway it seems that if the thing descripted above happens,the far plane of your camera's view frustum simply get destroyed,the plane becomes undefined.
to try this,try to set big far value(something like 100000000.0) and 1.0 for near value,then get your camera'view frustrum with irr::scene::ICameraSceneNode::getViewFrustrum,and finally check the far plane of your view frustrum.You should notice that is undefined.
I guess I can see everything because my far plane is destroyed;but maybe my hardware (or software?) do that,and on some other PC i wouldn't simply see nothing at all!
So if nothing is drawn with far value of 384.000.000,sorry,but i don't really know how you can resolve your problem.
Anyway I've read somewhere that far plane clipping can be disabled with opengl ,maybe with direct3d too,maybe it's possible to implement that in irrlicht.
I'm currently not using lights,only ambiental one,but i think that it's possible to set bigger radius without any problem.
What version of Irrlicht do you have?i cannot see the z-buffer parameter in createDevice.
In Irrlicht 0.6 the z-buffer is set to 24 bit if you use the stencil buffer,if not the z-buffer is set to 16bit,unless you modify the engine.
Try to search for D3DFMT_D24X8 in forum,and you'll find the post on how to do that.
On my system it forces the use of 32bit color depth,if not the device doesn't create.
I haven't a website on my project,because there isn't much to show:only stars,a self-made ship mesh with cockpit,and *REALLY* ugly and buggy runtime-generated planets without correct texture mapping.
Maybe I didn't explain well in this post,anyway ask me what you like.
setNearValue() to a value lesser than 1
My near value is 1, but spaceship is scaled very large, so that I can see it. I think it is several km long by now...
Of course I meant the stencilbuffer flag in createDevice(), my fault.
I really hope there is a solution to this z-buffer issue, because now thats the only thing that prevents a properly scaled earth-moon-spaceship relationship.
Anyway, thanks a lot for your help so far, movement is really smooth now, no matter how far I fly, just rotation is still choppy.
Btw, do you write your own animators and particle effects, because camera is always in (0,0,0) and everything else is moving acording to camera?
Of course I meant the stencilbuffer flag in createDevice(), my fault.
I really hope there is a solution to this z-buffer issue, because now thats the only thing that prevents a properly scaled earth-moon-spaceship relationship.
Anyway, thanks a lot for your help so far, movement is really smooth now, no matter how far I fly, just rotation is still choppy.
Btw, do you write your own animators and particle effects, because camera is always in (0,0,0) and everything else is moving acording to camera?
Your z-buffer will be 24 bit only if your video card supports the stencil buffer.
Mine,a geforce 4 mx 420,does not,so I had to modify the engine.
I had problems too with 16 bit zbuffer,but now everything seems to work.
Maybe the choppy rotations are a problem of the camera scene node,try to search the forum,I've seen something about how to make the camera rotate smoother.
I'm not using any animator or particle effect,anyway you're right,there are problems with them,only collision response animator should work(but I'm not sure).
By the way,how big do you see the Earth from Moon?I see it very small,smaller than expected,maybe I've done something wrong
Mine,a geforce 4 mx 420,does not,so I had to modify the engine.
I had problems too with 16 bit zbuffer,but now everything seems to work.
Maybe the choppy rotations are a problem of the camera scene node,try to search the forum,I've seen something about how to make the camera rotate smoother.
I'm not using any animator or particle effect,anyway you're right,there are problems with them,only collision response animator should work(but I'm not sure).
By the way,how big do you see the Earth from Moon?I see it very small,smaller than expected,maybe I've done something wrong