4
$\begingroup$

I have a sign with text here: enter image description here

But as I zoom out, the text blends in with the mesh behind it:

enter image description here

What can I do to avoid this issue and be able to see text at further distances?

Here is the project file.

$\endgroup$
4
  • $\begingroup$ How did you do the text? Make sure that the faces don't overlap, or simply use a texture instead of a text object? $\endgroup$
    – moonboots
    May 7 at 7:01
  • $\begingroup$ I did shift+A to get a text object. Wrote my custom text on it and placed it 0.002m infront of the sign. $\endgroup$
    – CodeZealot
    May 7 at 7:17
  • $\begingroup$ Could you please share your object? $\endgroup$
    – moonboots
    May 7 at 7:18
  • $\begingroup$ I've attached the project file to the post. $\endgroup$
    – CodeZealot
    May 7 at 8:12

2 Answers 2

3
$\begingroup$

It's clearly z-fighting. There is no single offset by which you can move the text to solve your issue, because z-fighting depends on relative similarity of coordinates in relation to the camera's coordinate space. Those coordinates are encoded using IEEE 754 float variables, which consist of 3 parts: sign bit, 8 exponent bits and 23 mantissa bits. Think of it as a scientific notation:

$$1.123456789×10^{5}$$

The left part is a mantissa, it has a constant precision in a sense, it means the number of significant digits of your number doesn't change.

  • For an exponent of $0$, this means your number is precise up to 9 decimal places: if the camera is less than 1 meter away, you only need to move the text 0.000000001 m or 1 nm from the signpost so they don't overlap.
  • For an exponent of $9$, your number is precise up to 0 decimal places: if the camera is 1'000'000'000 m or a million km away, you need the text to be moved 1 meter away from the signpost.

The above numbers would be true if the floats used really had the precision of 10 digits in the decimal system, but instead IEEE 754 float has a precision of 23 digits in the binary system, but also the exponent operates on a base of 2 instead of 10 (so it's $2^x$ instead of $10^x$), and most importantly, There's a bunch of calculations chained, and each under the precision limitations, so the error accumulates drastically and the only real lesson here is the further away you are from the world origin and the further away are the vertices from object origin, and the further away camera is from the object, and the bigger the clipping range of the camera, and the bigger the distance between vertices (shading a face is an interpolation of vertices), the bigger the errors…

I see 3 solutions:

  1. Use something like geometry nodes or drivers to move the text away from the signpost towards camera by some % distance between the camera and the signpost - this could cause side-effects like an increasing shadow of the text.
  2. Bake the text to texture and use a texture instead of geometry.
  3. Improve the topology, so the text doesn't overlap the signpost:
  • ⭾ Tab in edit mode move the text away from the signpost, then extrude it back:

  • add a boolean to the signpost to make space for the text:

  • ✲ CtrlA with mouse over the modifier to apply the boolean.

  • move the text back to match the surface of the signpost, e.g. by using face snapping:

$\endgroup$
0
$\begingroup$

This could be Z-fighting. Move the text object 0.001 unit away from the "background" mesh.

$\endgroup$
3
  • 1
    $\begingroup$ I have moved it 0.002m away from the sign. The text still merges with the mesh. $\endgroup$
    – CodeZealot
    May 7 at 8:39
  • $\begingroup$ Try to zoom out and then see if the RENDER is ok. If it is, skip it. $\endgroup$ May 7 at 8:45
  • $\begingroup$ @CodeZealot: you are right. I think it might be a floating point precision issue. Just put y value to -0.12 m or less, that worked for me. Or you could even extrude the text if you want to, which might even look cooler in near shots [1]: i.stack.imgur.com/qIAxp.jpg $\endgroup$
    – Chris
    May 7 at 9:33

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .