I am attempting to create a geometry in which I have a passive console which then has active display screens added to it. The console is its own geometry as are each of the screens.
Of course because the console geometry and the display screen geometry overlap you get the standard “fighting for dominance” between the two
The simple solution to this is of course to put the active display screen slightly in front of the console geometry. However this leads to several question marks, most importantly how far is far enough in front, in particular at extreme distance from the origin will it start being a problem again?
So, is there a neater solution to the problem of Overlaying one geometry with another, can which geometry is dominant be explicitly defined?
In short there is no answer to “how far is far enough in front” because it depends on the distance between the cam and the object.
Usually though, it’s important that there is no zfighting when you are close to objects, and less important when the object is far away. So The answer might be “far enough is far enough so you have no z-fighting at “reading” distance”.
Another solution (that would seems slightly overkill IMO) is to have a control on the object that increase the offset proportionally to the distance of the camera…
Interesting, I knew that the camera-object distanse was important but I assumed that the origin-object distance was equally important. If origin-object distance isn’t important (or is much much less important) then I think I’m worrying over nothing. The reason for my concern is because I am making an “infinite world” style game.