Page MenuHome

Texture paint - sample color picker is highly unreliable when "clip end" distances are large enough
Closed, ResolvedPublic

Description

System Information
Operating system: Windows-10-10.0.17763-SP0 64 Bits
Graphics card: GeForce GTX 1050 Ti/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 441.66

Blender Version
Broken: version: 2.82 (sub 4), branch: master, commit date: 2019-12-10 23:56, hash: rB63d521432e93
Worked: (optional)

Short description of error
I'm not sure if this is a bug or a system limitation, but after couple of hours prodding I can conclude this:
-If clip end is 100m-1000m and camera lens is <100mm , Texture paint sample color is accuare and reliable
-If clip end is 1000m-6000m and camera lens is 35-200mm, when you zoom in and start sampling color, there's a small chance of wrong color picking (sampling merged colors instead of original texture source)
-if clip end is >10000m and there's any kind of zoom in, the color picking becomes 50/50 chance to actually sample the texture source, basically impossible to pick the right color

This can be a pretty big issue for someone who works on big scenes and paints textures (like roughness maps/normal maps) in blender, You naturally tend to zoom in a lot to have a better stroke/precision, but zooming in viewport causes a huge decreasce in sampling accuracy. I found out the cause and managed to metigate it by decreascing Clip End distance of some cameras. And in the example below, 1000m is not even that much for a clip end distance.

Here's a clip demonstrating what I mean:

In the source file I demonstrated the minumum clip end + viewport zoom necessary to casue this instability, the main culprid of this is the Clip End + Viewport zoom in values. If Clip End is anything like 10000m then it becomes practically unusable to sample colors

Also this effect is a lot more proiminent on the edges of the mesh

Exact steps for others to reproduce the error
[Please describe the exact steps needed to reproduce the issue]
-Open the blend file
-Enable the Render view
-make sure the cyan texture is selected in shader editor (bad big.png)
-Enter the camera view
-go to 3D view and enter the Texture Paint mode
-Press S to sample the colors (less reliable on edges of mesh
-Zoom in and notice that sampling becomes even less accurate

Event Timeline

Germano Cavalcante (mano-wii) lowered the priority of this task from 90 to 50.EditedDec 16 2019, 12:46 PM

Dev note:
I suspect this is a raycast inaccuracy due to the distance from ray_start.
If so, a solution would be to move ray_start to the point where it hits bound_box.

After investigating, I realized that it has nothing to do with raycast, but with select_engine.