← Back to team overview

kicad-developers team mailing list archive

Re: 3D-Viewer Raytraced render

 

2015-10-28 10:29 GMT+01:00 Mário Luzeiro <mrluzeiro@xxxxx>:
>
>>> - I have in mind to try to make it as fast / interactive as possible, so it will need some specific implementation.. some hacks .. that will target this specific propose.
>
>> I understand. Speed is definitely an issue with big boards. But I am
>> no export in ray tracing characteristics, but what is the scalability
>> of your implementation in reagard to board complexity (lots of holes
>> and lots of other objects) and seperately about the screensize?
>
> Actually, as I experienced, the size of the boards will not make a big impact in the loading/rendering. From the 'size' it means 'how much items/objects it will load/render'.
> ( Btw, anyone have a real real big board project for kicad? something like the complexity of a PC motherboard? )
>
> Regarding the scalability, raytracing algos are very good to handle scalability. The limit of objects, are the u32 size and your RAM.
> I am using some 'state-of-art' algos for ray traversal  (frustum packets over a bounding volume hierarchy). (BVH is based on the PBRT 3 book [1], and traversal is based on [2])
> I means that it can adapt very well to any number of objects or configurations without suffering much penalty.
>
> Loading the board is also very fast, creating the BVH will take some 200ms on complex boards.
> The thing that will take more time is still some tessellation need for the polygon filled planes, but I have in mind some optimizations.
> It means at the moment that loading a board like 'video' (from kicad's demo boards) or 'hackRF' takes about 3 seconds + render.
> I plan to try to cache somehow the tesselation, so this time can be much more reduced.
>
> Resolution is at moment set to the windows size, but for export rendering to image file, we can add a dialog to choose different  resolutions.
> Of-course, more resolution means it will be more slow.
>
> At this moment on my machine, rendering for quality takes about 1..2.3seconds (depend of the view) with all eye-candy features set. If some of that features are not used (eg: post shaders effects, refractions or shadows), the render can take less than 1s
>
> Cheers,
> Mario
>
>
> [1] https://github.com/mmp/pbrt-v3/
>
> [2] Wald, S. Boulos, and P. Shirley. Ray Tracing Deformable Scenes using Dynamic Bounding Volume Hierarchies. ACM TOG , 26(1), 2007
> http://www.cs.cmu.edu/afs/cs/academic/class/15869-f11/www/readings/wald07_packetbvh.pdf
> implementation of the algo based in the description from:
> https://cseweb.ucsd.edu/~ravir/whitted.pdf
>

Ok, I see. Thank you for the information.


Follow ups

References