Page 1 of 1
[?] z-fighting?
Posted: 2011-02-03 14:36
by splatters
I can ask only on theoretical level since I can't test anything in-game at the moment and these are just crude examples.
Will z-fighting occur between two parts of same
element in any circumstances?
If I weld a support handle -that would actually be connected to the main body in both of its ends- from only one end to the main element in order to save triangles but still making it the same element (#2) in stead of welding both ends to the main body (#1) will there be z-fighting or other problems?
Re: Questions on z-fighting
Posted: 2011-02-03 15:04
by Rhino
I'm sorry I can't understand what your trying to do...
If you can model it then take a pic it would be better.
Re: Questions on z-fighting
Posted: 2011-02-03 15:21
by splatters
I'm trying to ask whether z-fighting occurs within one element in addition to within separate elements and/or objects and whether welding a "complex" element only from one of its two or more points where it connects to the main element will cause any problems or z-fighting.
I don't see how a model will help such a theoretical and game engine specific question but I'll put some model pics up later.
Re: Questions on z-fighting
Posted: 2011-02-03 15:28
by Rhino
that question really very much depends on the model itself and in what context its in. In some cases, yes its fine, in many other cases, no its not but as a general rule separate elements really should be welded together to not only ensure there is no z-fighting, but also to save on UV space etc.
Re: Questions on z-fighting
Posted: 2011-02-03 16:02
by splatters
So no matter how complex of an element or how close parallel surfaces are there is no z-fighting as long as it's all same element?
Re: Questions on z-fighting
Posted: 2011-02-03 16:08
by Rhino
no you can still have z-fighting in some cases when the model is part of the same element and all welded up, like I said, it really depends on the model itself.
Its not something I can explain to you in words and your just going to have to show me your model and I can tell you if it will or will not zfight, and if it will how to make it stop zfighting.
Re: Questions on z-fighting
Posted: 2011-02-03 16:11
by DankE_SPB
If i understood your pics right(i.e. door with a handle) then all the variants will be the same from z-fighting perspective.
Re: Questions on z-fighting
Posted: 2011-02-03 16:20
by Rhino
[R-DEV]DankE_SPB wrote:If i understood your pics right(i.e. door with a handle) then all the variants will be the same from z-fighting perspective.
not exactly, if the model is like this:
Then you are going to get a bit of zfighting on the end bits:
Only if the model is like this, all welded up will you not get any zfighting:

Re: Questions on z-fighting
Posted: 2011-02-03 16:45
by splatters
Since you did the model before I did (thanks for that), can you do that test with only one of the ends of the handle welded? That's one of the points I was asking about.
Also, do these rules apply 100% in the BF2 engine?
Re: Questions on z-fighting
Posted: 2011-02-03 17:01
by Rhino
splatters wrote:Since you did the model before I did (thanks for that), can you do that test with only one of the ends of the handle welded? That's one of the points I was asking about.
If only welded on one side, that would mean only one side (without the welds) would zfight. both sides need to be welded for it to have no zfighting there.
As for testing, its perfectly fine like that, unless you get really far away or the engine has really bad zfighting (like in this case since I've scaled up the model to be super huge then gone really far away) where then zfighting happens though the handle itself, above the points its welded.
splatters wrote:Also, do these rules apply 100% in the BF2 engine?
Yes, although how much it zfights may very between engines and how close/far away the camera is.