Hi Henner, Happy to see someone using and adding features to 3D Viewer! I didn't get a chance to test the patch yet but I was thinking adding another options to implement some kind of spiral rendering from the center :) (as usually the board is centered)
Mario Luzeiro ________________________________________ From: Kicad-developers <kicad-developers-bounces+mrluzeiro=ua...@lists.launchpad.net> on behalf of Henner Zeller <h.zel...@acm.org> Sent: 01 May 2019 07:29 To: KiCad Developers Subject: [Kicad-developers] PATCH: Raytracing - a more pleasing way sequencing blocks to render ? Hi, I often use the excellent raytracing mode to get a nice 3D view of the board. The rendering of the individual blocks is done in a Morton sequence, possibly to minimize cache-miss penalties. Since this render sequence starts in one corner, it usually takes a while until the "meat" of the render hits the interesting parts in the middle of the board. So I implemented an alternative sequence: from the center out, in a growing circle. To ease the time long renders take, it is actually two complementing checkerboard patterns in consecutive passes (hard to explain, you have to patch and look for yourself). I find this much more pleasing to watch and also it helps to early see for the user if they want to adjust the view as the important parts are rendered first. Of course, this will be slightly slower (possibly due to cache issues), but in measurements on my machine this is typically in the imperceptible noise (9.0 seconds vs. 9.1 seconds for instance). Given that there might be a performance penalty I prepared two patches: one that just does the rendering from the center, and one which provides a setting in the menu-bar to give full choice. (it might be good for comparison the two types of renderings, but given the complexity and the added end-user confusion and the essentially imperceptible performance penalty, I'd tend towards just using the simple implementation without menu-bar settings). Anyway, attached you find two patches: raytrace-from-center-always.patch just does as described above, without setting. The raytrace-from-center-with-menubar-setting.patch goes all the way of having a menu-bar choice and storing the setting in a configuration (more complex, less preferred). These patches are against the 5.1 branch, but it also applies cleanly to master. Cheers, Henner. _______________________________________________ Mailing list: https://launchpad.net/~kicad-developers Post to : kicad-developers@lists.launchpad.net Unsubscribe : https://launchpad.net/~kicad-developers More help : https://help.launchpad.net/ListHelp