<p>Unfortunately, I don't know how 3ds max handles its Z-buffer or its near and far planes so I can't give a definite answer. There are many ways the software could handle this.</p>

<p>However, you are on the right track. Z-fighting occurs when there is not enough numerical precision to distinguish two "objects" from the scene rendered at the same pixel. In such cases, the two pixels "fight" one another over which one is closest to the camera and flickering occurs.</p>

<p>These factors influence how a scene is susceptible to Z-fighting:</p>

<ul>
<li>Number of bits used by the depth buffer (typically 24 or 32).</li>
<li>Whether the depth buffer uses float values or integers.</li>
<li>Whether the Z value <code>0</code> is used for the near or far plane (inverted depth buffer).</li>
<li>How close objects are to each other.</li>
<li>The size of the range between the near and far planes.</li>
</ul>

<p>Of these, you really only have control over the near and far planes from what you say.  It looks like your model is too big for the default way 3ds max handles this so I suggest making the near plane value bigger. An increase of the near plane from <code>0.1</code> to <code>1.0</code> (<code>*10</code>) will give the same precision increase as dividing the far plane by 10.</p>

<p>For your other question, you usually get less Z-fighting when an object is closer because there is more precision in the depth buffer closer to the near plane.</p>

<p>Also, for your other question: <a href="https://computergraphics.stackexchange.com/questions/8017/why-do-gpus-divide-clip-space-z-by-w-for-position?rq=1">Why do GPUs divide clip space Z by W, for position?</a></p>

<p>A nice Z precision visualizer: <a href="http://dev.theomader.com/depth-precision/" rel="nofollow noreferrer">http://dev.theomader.com/depth-precision/</a></p>

CC BY-SA 4.0
2018-12-18T16:32:13.363Z
2018-12-18T16:32:13.363Z
bernie
<p>FYI, the first answer is very close to explaining the causes of Z-fighting, or Z-flashing. It is about decimal places and it does relate to distance, or the simulation of distance.</p>
<p>To understand what causes the flashing, you want to consider the distances as a ratio. There is the distance between the two planes and then the distance between the two planes and the viewer, or the POV, point of view. If the two competing faces are extremely close together and the POV is extremely far from them, it will be as if the two surfaces are overlapping. If changes in distance are so subtle, that the decimals defining those changes are too small to register in the buffer, then it can be as if one face moves in front of the other, after another slight movement, the calculation changes, and the faces revert.</p>
<p>When you scale the model, that ratio changes significantly. Moving the competing faces further apart, will also affect the ratio. Understanding what causes the flashing will allow artists to devise solutions. For example, an object that will always be viewed from a distance, can probably be created such that the faces that might conflict, are spaced farther apart, than would be optimal for close inspection viewing.</p>

CC BY-SA 4.0
2023-05-20T08:05:39.627Z
2023-05-20T08:05:39.627Z
Rick Keller
<p>Right Click on the viewport PERSPECTIVE and enable viewport Clipping.
On the right of the screen, 2 yellow arrows will appear. Drag the bottom arrow up a little. Worked for me.</p>

CC BY-SA 4.0
2019-05-09T20:11:17.827Z
Nice attempt, but the question isn't about how to use 3ds Max, but rather **how** 3ds Max works and **why** this changes makes the z-fighting go away. Could you [edit] your answer to answer that question?
Dan Hulme
CC BY-SA 4.0
2019-05-01T11:13:53.913Z
2019-05-01T11:13:53.913Z
Konkelvonk
<p>I had a z-fighting/z-clipping issue with a scene containing some very large objects yesterday in 3ds max. It can be seen in the image below:
<a href="https://i.sstatic.net/byoar.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/byoar.png" alt="z-fighting issue"></a></p>

<p>For some reason downscaling the scene significantly (a factor of 100 approx) resolves the z-fighting issues... <strong>Please help me understand how reducing scene scale could resolve this issue and why this issue only occurs with very large scenes/objects.</strong></p>

<p>From what i understand z-fighting occurs in this case because the near and far planes are very far apart compared to the minimum and maximum distance of the rendered object(s) relative to the viewport. </p>

<p>Please correct me if I'm wrong, <strong>my basic understanding of the z-buffer is as follows:</strong></p>

<p><strong>1)</strong> The distance of each rendered pixel of the object(s) is compared to a standard value stored in the z-buffer. </p>

<p><strong>2)</strong> if the depth of the current pixel is smaller than the currently stored value for this pixel location in this image...the value for this pixel in the z-buffer is overwritten with the new and lower value.</p>

<p><strong>3)</strong> before the z-depth value is stored in the z-buffer it is divided by a certain value (floating point type value), not sure why the number is devided. perhaps to reduce memory usage by storing smaller values...</p>

<p>I managed to fix the z-fighting in the viewports by increasing the near plane (in viewport settings) from 0.1 ish to a larger value. </p>

<p>Please take a look at the image below:
<a href="https://i.sstatic.net/bqUux.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/bqUux.png" alt="enter image description here"></a>
The red planes are the camera's near and far planes. The green planes I have drawn myself and they indicate the minimum distance of the object relative to the camera and the maximum distance of the object relative to the camera. When scaling the scene by a factor x <strong>the ratio between the variables A,B,C,D</strong> (please see the dimensions drawn in the image) <strong>should stay approximately the same</strong> (as in the ratios A/B , A/C, A/D, B/A etc. should be approximately equal before and after the scaling process takes place).
Therefore the max and min depth relative to the near and far viewport planes should be approximately equal. And as a result the depth precision of the object should not change when scaling (I think). 
My understanding is clearly incorrect since the z-fighting disappears when downscaling. <strong>Why is it that scaling has any effect on the z-fighting?</strong> Does 3ds max automatically adjust the far and near plane distances relative to the viewport when scaling the object/scene?</p>

<p>I've read about something called depth precision (<a href="https://developer.nvidia.com/content/depth-precision-visualized" rel="nofollow noreferrer">https://developer.nvidia.com/content/depth-precision-visualized</a>). Assuming this  (objects(their pixels) that are closer to the camera being stored more accurately in the z-buffer) is true in 3ds max it makes sense that when zooming in really close to the object in the viewport...the z-fighting disappears. however, when I zoom out quite a lot in the viewport, the z-fighting also isn't visible anymore even though it should in my mind get worse since the precision of the depth info stored in the z-buffer is lower for objects further away from the camera. Am I missing something ?
<a href="https://i.sstatic.net/4hCPb.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/4hCPb.png" alt="enter image description here"></a></p>

<p>PS: the viewport clipping distances are set to the default in the image below and the first image of this post.</p>

<p>If I have been unclear or incomplete about anything please let me know and I will try my best to explain/elaborate. Any help will be greatly appreciated. Thank you very much!</p>

<3d><projections><shading><depth-map><z-buffer>
3ds max: Z-fighting when working with Large Objects
Maarten -Monica for president
# 3ds max: Z-fighting when working with Large Objects

(Asked by: username_0 on 2018-12-15)

I had a z-fighting/z-clipping issue with a scene containing some very large objects yesterday in 3ds max. It can be seen in the image below:
[![z-fighting issue](https://i.sstatic.net/byoar.png)](https://i.sstatic.net/byoar.png)

For some reason downscaling the scene significantly (a factor of 100 approx) resolves the z-fighting issues... **Please help me understand how reducing scene scale could resolve this issue and why this issue only occurs with very large scenes/objects.**

From what i understand z-fighting occurs in this case because the near and far planes are very far apart compared to the minimum and maximum distance of the rendered object(s) relative to the viewport.

Please correct me if I'm wrong, **my basic understanding of the z-buffer is as follows:**

**1)** The distance of each rendered pixel of the object(s) is compared to a standard value stored in the z-buffer.

**2)** if the depth of the current pixel is smaller than the currently stored value for this pixel location in this image...the value for this pixel in the z-buffer is overwritten with the new and lower value.

**3)** before the z-depth value is stored in the z-buffer it is divided by a certain value (floating point type value), not sure why the number is devided. perhaps to reduce memory usage by storing smaller values...

I managed to fix the z-fighting in the viewports by increasing the near plane (in viewport settings) from 0.1 ish to a larger value.

Please take a look at the image below:
[![enter image description here](https://i.sstatic.net/bqUux.png)](https://i.sstatic.net/bqUux.png)
The red planes are the camera's near and far planes. The green planes I have drawn myself and they indicate the minimum distance of the object relative to the camera and the maximum distance of the object relative to the camera. When scaling the scene by a factor x **the ratio between the variables A,B,C,D** (please see the dimensions drawn in the image) **should stay approximately the same** (as in the ratios A/B , A/C, A/D, B/A etc. should be approximately equal before and after the scaling process takes place).
Therefore the max and min depth relative to the near and far viewport planes should be approximately equal. And as a result the depth precision of the object should not change when scaling (I think).
My understanding is clearly incorrect since the z-fighting disappears when downscaling. **Why is it that scaling has any effect on the z-fighting?** Does 3ds max automatically adjust the far and near plane distances relative to the viewport when scaling the object/scene?

I've read about something called depth precision (<https://developer.nvidia.com/content/depth-precision-visualized>). Assuming this (objects(their pixels) that are closer to the camera being stored more accurately in the z-buffer) is true in 3ds max it makes sense that when zooming in really close to the object in the viewport...the z-fighting disappears. however, when I zoom out quite a lot in the viewport, the z-fighting also isn't visible anymore even though it should in my mind get worse since the precision of the depth info stored in the z-buffer is lower for objects further away from the camera. Am I missing something ?
[![enter image description here](https://i.sstatic.net/4hCPb.png)](https://i.sstatic.net/4hCPb.png)

PS: the viewport clipping distances are set to the default in the image below and the first image of this post.

If I have been unclear or incomplete about anything please let me know and I will try my best to explain/elaborate. Any help will be greatly appreciated. Thank you very much!

**Tags:** 3d, projections, shading, depth-map, z-buffer


---

## 3 answers

### Answer by username_1 on 2018-12-18. Score: 2 | Accepted answer

Unfortunately, I don't know how 3ds max handles its Z-buffer or its near and far planes so I can't give a definite answer. There are many ways the software could handle this.

However, you are on the right track. Z-fighting occurs when there is not enough numerical precision to distinguish two "objects" from the scene rendered at the same pixel. In such cases, the two pixels "fight" one another over which one is closest to the camera and flickering occurs.

These factors influence how a scene is susceptible to Z-fighting:

* Number of bits used by the depth buffer (typically 24 or 32).
* Whether the depth buffer uses float values or integers.
* Whether the Z value `0` is used for the near or far plane (inverted depth buffer).
* How close objects are to each other.
* The size of the range between the near and far planes.

Of these, you really only have control over the near and far planes from what you say. It looks like your model is too big for the default way 3ds max handles this so I suggest making the near plane value bigger. An increase of the near plane from `0.1` to `1.0` (`*10`) will give the same precision increase as dividing the far plane by 10.

For your other question, you usually get less Z-fighting when an object is closer because there is more precision in the depth buffer closer to the near plane.

Also, for your other question: [Why do GPUs divide clip space Z by W, for position?](https://computergraphics.stackexchange.com/questions/8017/why-do-gpus-divide-clip-space-z-by-w-for-position?rq=1)

A nice Z precision visualizer: <http://dev.theomader.com/depth-precision/>


---

### Answer by username_2 on 2023-05-20. Score: 1

FYI, the first answer is very close to explaining the causes of Z-fighting, or Z-flashing. It is about decimal places and it does relate to distance, or the simulation of distance.

To understand what causes the flashing, you want to consider the distances as a ratio. There is the distance between the two planes and then the distance between the two planes and the viewer, or the POV, point of view. If the two competing faces are extremely close together and the POV is extremely far from them, it will be as if the two surfaces are overlapping. If changes in distance are so subtle, that the decimals defining those changes are too small to register in the buffer, then it can be as if one face moves in front of the other, after another slight movement, the calculation changes, and the faces revert.

When you scale the model, that ratio changes significantly. Moving the competing faces further apart, will also affect the ratio. Understanding what causes the flashing will allow artists to devise solutions. For example, an object that will always be viewed from a distance, can probably be created such that the faces that might conflict, are spaced farther apart, than would be optimal for close inspection viewing.


---

### Answer by username_3 on 2019-05-01. Score: -2

Right Click on the viewport PERSPECTIVE and enable viewport Clipping.
On the right of the screen, 2 yellow arrows will appear. Drag the bottom arrow up a little. Worked for me.

> **Comments:**
> **username_4**: Nice attempt, but the question isn't about how to use 3ds Max, but rather **how** 3ds Max works and **why** this changes makes the z-fighting go away. Could you [edit] your answer to answer that question?  

---

