algorithmic modeling for Rhino
I am in the process of developing a project in our architecture design studio and happened across this glitch in rhino that occurs when you overlay certain surfaces on top of another. I am trying to understand it better in terms of WHY this occurs and HOW one might have control over the effect. What''s interesting is that the resulting "texture" is legitimate and is even 3D Printable as viewed on the screen. Does anyone have any knowledge about this? Is there a possible algorithmic path to recreate this?
- All the best
Tags:
It's a result of the way OpenGL (and DirectX too) deal with depth while rendering geometry to the screen. Both systems use a depth-map or 'z-buffer' to keep track of how far away each pixel is from the camera. This is in parallel with the colour-map, which keeps track of what colour each pixel is.
For every new pixel that is drawn, the depth is calculated. If that depth is more than the already existing depth at that location, the pixel is assumed to be obscured and it is not drawn. If the depth is less, the new pixel is assumed to obscure whatever was there before it and it is drawn on top of the old pixel. Also at this point the z-buffer is updated to reflect the new depth at that pixel.
When you have two pieces of geometry that are basically at the same depth, one of them still has to 'win' when it comes to who's on top. Which one wins for any given pixel probably comes down to teeny tiny differences in the computed depth, and these differences are probably just due to floating point arithmetic inaccuracies. So you end up with a weird, unstable pattern of both geometries which is highly dependent on camera angle (different camera angles result in different inaccuracies).
There's little anyone can do about this. If you have two pieces of geometry in the same place, you probably should hide of them...
Welcome to
Grasshopper
© 2025 Created by Scott Davidson.
Powered by