[?] z-fighting?

Making or wanting help making your own asset? Check in here
Post Reply
splatters
Posts: 529
Joined: 2010-01-19 08:02

[?] z-fighting?

Post 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?
Image
Rhino
Retired PR Developer
Posts: 47909
Joined: 2005-12-13 20:00

Re: Questions on z-fighting

Post 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.
Image
splatters
Posts: 529
Joined: 2010-01-19 08:02

Re: Questions on z-fighting

Post 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.
Rhino
Retired PR Developer
Posts: 47909
Joined: 2005-12-13 20:00

Re: Questions on z-fighting

Post 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.
Image
splatters
Posts: 529
Joined: 2010-01-19 08:02

Re: Questions on z-fighting

Post 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?
Rhino
Retired PR Developer
Posts: 47909
Joined: 2005-12-13 20:00

Re: Questions on z-fighting

Post 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.
Image
DankE_SPB
Retired PR Developer
Posts: 3678
Joined: 2008-09-30 22:29

Re: Questions on z-fighting

Post 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.
Image
[R-DEV]Z-trooper: you damn russian bear spy ;P - WWJND?
Rhino
Retired PR Developer
Posts: 47909
Joined: 2005-12-13 20:00

Re: Questions on z-fighting

Post 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:
Image

Then you are going to get a bit of zfighting on the end bits:
Image
Image
Image

Only if the model is like this, all welded up will you not get any zfighting:
Image
Image
Image
splatters
Posts: 529
Joined: 2010-01-19 08:02

Re: Questions on z-fighting

Post 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?
Rhino
Retired PR Developer
Posts: 47909
Joined: 2005-12-13 20:00

Re: Questions on z-fighting

Post 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.

Image
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.
Image
Post Reply

Return to “PR:BF2 Community Modding”