Graphics distortion problem
Blitz3D Forums/Blitz3D Programming/Graphics distortion problem
| ||
Hi mates, i am currently experiencing some sort of strange looking graphics distortion problems with my FPS. i have a flat ground and placed a house on it. when i am running through it, i get sometimes graphical errors (see attached pictures). this error is on my geforce4 card, on intel 915gms and also on ati x800xl. therefore i don't think its a driver issue. anyone having same problems? or even better a solution for this? ![]() ![]() |
| ||
Looks like z-fighting between your building and the ground plane. Set the entityorder on the ground plane to 1 or more so that it's drawn first and this should resolve. Stevie |
| ||
Yep, looks like z-fighting to me. |
| ||
Z-fighting indeed, you might also want to reconsider your Camerarange setup. Andy |
| ||
Or you could lift the building a bit -> no z-fighting. |
| ||
i did an entityorder on the groundmesh, but it didn't help. now its fixed, cause i recursively entityordered my groundmesh (i loaded it with loadanimmesh). too bad that entityorder does not affect all children of a mesh. you have to do this manually... |
| ||
It's the same with entityalpha too :o) |
| ||
in fact with all entity commands that affect meshes. there's an example in the archives on how to do this recursively and also to take care to apply it only on MESH type children. Personally I always got a compilation of recursively working Command equivalents for LoadAnimMesh floating around. |
| ||
Honestly, for this situation I would just lower the ground plane slightly, like -.01 movement on Y. Tada, problem solved. |
| ||
andy, you were right! neither lowering the ground plane, nor adjusting entityorder did fix it 100%. it looked better, but was still distorted. Camerarange setup did the trick. i used CameraRange camera,.0001,300 - do not do this. now is use CameraRange camera,.03,300 and voila, clipping errors are gone! |
| ||
Nice building. How long have you been working on this? |
| ||
Using small values for the near range is very problematic and should be avoided. Bookmark this for more info: http://www.sjbaker.org/steve/omniv/love_your_z_buffer.html |
| ||
I like as long as you keep the ratio of 1:10000 everythings cool. But, since your on that verge ;o) Beakers dead right. Raising the floor above the ground will work. Just keep moving it up, till the problem goes away. If if looks stupid outside, put a block base on the factory. |
| ||
you basically 2 options. 1) Adjust your camerarange Generally you should keep the near# value as high as possible and the far# value as close as possible while still keeping near# closer than far#. 2) Use dualrendering. Using dual rendering you keep the first render from 500 to 10000 units away and the second from 1 to 500. This gives you a defacto larger Z-buffer at the expense of rendering everything twice. Andy |
| ||
@Mr. Picklesworth: a friend of mine did this. don't know how long exactly he has been working on this, but i think one week @8hours per day in total. and it's still not ready ;) as our upcoming FPS gets better, the building needs to be adjusted for better gameplay.. its more a try and error phase at the moment ;) |
| ||
. |
| ||
It's a helluva nice building. Is it Giles lightmapped? |
| ||
t3K|Mac Try to keep your camera range to the same ratio as 1-1000. 1-1000, .1-100, .05-50,.025-25,.03-30. This will ensure compatibility with other cards. Although it looks good on your computer, on older cards it will distort still. Onboard SIS cards seem to have a really low bit Z buffer that makes them fight really shortly after the 1-1000 range. Personally I've used 1-5000, or 1-10,000 okay, just have to remember this wont look the same on all computers. Just a FYI |
| ||
yes, lightmapping was done with giles. cam range ratio as 1-1000 is a slight problem. i have the weapon very close to the camera in order to avoid clipping when my character leans and rotates. maybe i have to double render the scene for perfect z-buffer appearance. but i'll keep that in mind. btw. blitzbasicforum is a very nice place to stay ;) - i love the community here... |
| ||
I know the problem, thats why you reduce the NEAR value, but when you do that you need to reduce the FAR value by the same factor. Keep playing with it. You should try to get your "near" value as high as possible though. |
| ||
Can't you simply set the EntityOrder of the weapon so that it's rendered last? I'm a bit rusty but I think doing so will remove the weapon from z-buffering completely. [edit] scratch that. I had a brainfart. :P |
| ||
brainfart? wow!! :P WHat you CAN do however is asd you suggested- a Two pass render. 1) Render the main scenery without the main weapon. this can use camerarange 1,1000 2) Render the main weapon (Use cameracls mode to disable clearing of the colour buffer but enable clearing of z buffer- for this render only!), this can use camerarange .03,30 or whatever :) This method leaves the main weapon visible and it wont vanish into the walls. It also enables you to use a higher camerarange for the scenery. AND it makes sure the game looks best on even older systems, although two renders might slow down on old systems. |
| ||
@big10p: if i entityorder my weapon it looks correct. but if i shoot a bullet, the bullet starts its flightpath in the wall, cause in 3d world the weapon clips into the wall but it doesnt look like. hope you understand what i am trying to say ;-) |