How to vary line weights by distance? (in 3D)

I have this linework perspective drawing, the objects further away look “darker” than the ones closer

Is there any way to display the image so the print widths of objects further away become thinner/lighter to compensate?

(I know that its an perspective thing and that the linewidths are the same, but the proximity of the lines makes it look darker and thicker)

Here is a manual example of what i am trying to achieve, where objects further away start to thin

I think this would be useful for architectural diagrams with exaggerated depths, and trying to keep detail throughout the whole image.

If anyone has any ideas please let me know :))

I like this idea… and I wish I had a good solution/workaround for how to achieve it. But sadly I DO NOT. And to make matters slightly worse I can’t just leave things at that and end my comments here.

Overall Atmospheric Perspective feels like a styles & rendering task to me. But then… being a CAD based program… there are background forces in place that always seem to elevate the line work to a prominent level in the overall display hierarchy.

Your topic here reminds me of a file format called EPix / EPX.

I believe that EPix operated in the Raster Image realm, But it wasn’t merely a normal raster image. Each pixel carried three important pieces of information:

  • RGB – Ordinary Pixel Color
  • Depth – Distance from the camera/eye to the visible surface represented by that pixel.
  • Material – an identifier assigning which model material should be associated to the pixel.

The second bullet point here amounts to a Z-buffer/depth map embedded along side the image. And the corresponding host program would use it to determine which pixels recede back 5 feet, versus 100 feet – relative to the image plane – that all this gets drawn out on. This pixel information was also used for masking, placing entourage, scaling things according to perspective, and other effects.


What’s interesting here is that Rhino has a command called… ShowZBuffer… which I suspect is concerned with very similar things in its own way. And I think this is pretty exciting because somewhere in the overall mix of things are the levers for adjusting such things, and already set into place. How to expose it all is the key.

To be clear here I’m not saying that Rhino supports EPix, or that it should. But I do think it would be nice to barrow on the idea of depth of field ranges… and having a mapping system where lines can be colored based on where they sit in the overall picture field relative to the camera location.

Mapping out a gradient across a range of Objects in perspective space would be fantastic to do. And I hope that its possible and can happen.

Here’s a simple take, where you can control the crv colours based on the X coordinate.


Crv colour gradient.gh (20.4 KB)

Yess i agree
I also think rhino could also do with LOD changes in the standard viewports (unless im mistaken and it already does) to speed up navigation of heavy files, kinda like nanite geometry in unreal.

I imagine this would be pretty hard to implement but it would be cool to see more camera distance based customisation

This is a cool starting point

I used your script and made a brep gradient, with objects close displayed as blue and objects further away look red

Brep Gradient.gh (1.9 MB)

Crv colour gradient.gh (20.4 KB)

If anyone could help turn this colour gradient in to a line thickness gradient that would be awesome

The human eye interprets exactly the other way around: colder tones appear farther than warmer tones.

See also Rhino 7 Grainy and low quality rendering - #18 by Gijs

This is pretty cool, i never knew rhino rendered had a depth map feature