← Back to team overview

kicad-developers team mailing list archive

Re: Raytracer light diffuseness


Hi Alexis,
nice to see your interest on the render features!
I will left my feedback on the subject.

The result looks nice but on some parts looks round, as nature of the position of the lights.
Its an easy implementation, as you did, but I believe with the same computation effort ( but with more development efforts ) it could be implemented a raytraced ambient occlusion technique for a pleasant results. ( example of the technique in [1] )

Actually, you can try a quick dirty solution, by spanning multiple lights in a random hemisphere ( random directions ) instead of a circular path.

On relation to GUI, there was lot of room to add parametrizations.
I wasn't familiar with GUI creation on KiCad at time I worked on 3DViewer and I was not comfortable to add new options.
I found during this time that its sensible to have some of such options as some users will get confused and lost using it :)

Related with illumination, other advanced users requested for control the position of the lights and the ability to enable/disable it.
Some users want just one direction light.

Maybe someone with KiCad GUI development knowledge and sensibility for GUI creation would like to add new options to the render.

Mario Luzeiro

[1] http://www.fundza.com/rman_shaders/ray/ambient_occlusion/index.html
From: Kicad-developers <kicad-developers-bounces+mrluzeiro=ua.pt@xxxxxxxxxxxxxxxxxxx> on behalf of Alex Lockwood <alexlockwood@xxxxxxxxxxxx>
Sent: 27 December 2018 18:43
To: kicad-developers@xxxxxxxxxxxxxxxxxxx
Subject: [Kicad-developers] Raytracer light diffuseness

Some scenes (in particular, boards with a lot of tallish through-hole components) seem to suffer pretty badly from the low diffuseness of the light sources the raytracer uses:


Currently, this is directly coded, but it can be parameterized really easily. I've attached a patch to enable this and bump up the number of light sources from 8 to 64. The tradeoff here is that the render time scales roughly linearly, so obviously this can't just be increased all the time.

Here's an example with 64 sources, roughly the same scene. It looks significantly better to my eye:


I don't really have time to contribute a full patch, but I really would like to see this added as a runtime configurable option in the GUI. Is that something that somebody would be interested in doing?

(Resent as the first mail seems to have gotten lost, apologies if two come through)