Rhino 7 Cycles raytrace of camera lens heavily pixelated

One for @nathanletwory

Rendering the view through a lens assembly I get a sort of pixelated view of the glass:

Running up to 3000 samples doesn’t improve it. Any suggestions, or is this a bug?

Lens Assy.3dm (1.9 MB)

N.B. The lenses are placeholders at the moment - their faces are spherical approximations - but I don’t think that is relevant to the pixelation.

(Rhino 7.3.21012.11001, 12/01/2021)


This looks like coincident surfaces.You should scale down the lenses (or up the housing) the tiniest bit. Also move lenses tiniest bit apart if they have coincident surfaces.

With the diameter of the lenses scaled to 0.999 and moved some of the lenses by 0.001 I get this:


Thanks @nathanletwory. Fortunately historic lens designers introduced air gaps to improve optical performance so I can justify the change :wink:

Will coincident surfaces be handled in the future?

No, it is up to the creator to ensure (visible) surfaces do not end up in the same location. From two surfaces the render engine will not be able to know which one to sample. This causes ‘z-fighting’.

Here a smaller, green box inside a white, bigger box, with one side in the same location. Sometimes the white box wins, sometimes the green box: