Optics in FreeCAD

Show off your FreeCAD projects here!
denisb
Posts: 5
Joined: Wed Mar 15, 2017 1:08 pm

Re: Optics in FreeCAD

Postby denisb » Fri Mar 17, 2017 7:59 am

DeepSOIC wrote:Got an image of some stuff through the lens!
lens-scene 2 render.png
On AMD Radeon 7700 and with regular mouse, CADRays is behaving much much better, and makes a nice rendering faster.


Thank you so much for testing the app. It is great to see the first real user!

Regarding your rendering, it seems that the number of bounces (3 by default) is insufficient for complete processing of all inter-reflections in the lens. Please try to increase it at least to 8-10 (on render settings tab).
chrisb
Posts: 1859
Joined: Tue Mar 17, 2015 9:14 am

Re: Optics in FreeCAD

Postby chrisb » Fri Mar 17, 2017 8:02 am

Very impressive! although I wouldn't hire you yet to make my next pair of glasses, Mr. David Hamilton! :)
Last edited by chrisb on Fri Mar 17, 2017 1:46 pm, edited 1 time in total.
DeepSOIC
Posts: 4681
Joined: Fri Aug 29, 2014 12:45 am
Location: Saint-Petersburg, Russia

Re: Optics in FreeCAD

Postby DeepSOIC » Fri Mar 17, 2017 11:06 am

denisb wrote:Regarding your rendering, it seems that the number of bounces (3 by default) is insufficient for complete processing of all inter-reflections in the lens. Please try to increase it at least to 8-10 (on render settings tab).
Yep. With 3 bounces, I saw no image on screen at all. The last image was rendered with 5 bounces.

When setting up lens material, I wanted to give it a bit of glassy look, which isn't easy in this dark-room lighting conditions. I played with scatter color, but I didn't notice any effect at all. Maybe my number of bounces was too low?.. I also played with "thickness" "density" (tooltip says it's lambert-beer absorption coefficient). First, absorption should have its color customizable. Second, it doesn't appear to do anything at all. It doesn't say, what unit it is in... I tried bumping it up to 10000, and observed no image intensity drop...

The look of the lens was made by adding some emissivity to glass material.
realthunder
Posts: 151
Joined: Tue Jan 03, 2017 10:55 am

Re: Optics in FreeCAD

Postby realthunder » Sat Mar 18, 2017 8:03 am

DeepSOIC wrote:Got an image of some stuff through the lens!
On AMD Radeon 7700 and with regular mouse, CADRays is behaving much much better, and makes a nice rendering faster.

:o That's very impressive! I actually saw this post long time ago, and was hoping at that time I may some day venture into optics. Unfortunately, that day hasn't come yet.

I am curious of your profession. I had thought maybe you are an electronics guy or something because of your username I guess.
HoWil
Posts: 445
Joined: Sun Jun 14, 2015 7:31 pm
Location: Austria

Re: Optics in FreeCAD

Postby HoWil » Mon Apr 03, 2017 11:11 am

Hi,

Very very interesting :!:

That looks nice but for doing simulations for optics it would be necessary to also see the light paths. Is this possible with CADRays :?:

Maybe it is possible to at least insert 2D simulation results of the ray-paths of e.g. x-z into the 3D FC- model (http://sterncat.github.io/files/Double_Gauss.html).

Maybe this could be combined with https://github.com/mess42/pyrate ?!

Here are some libraries supporting Python and optics-raytracing which I looked up some time ago:
http://opticspy.org/
https://github.com/ramezquitao/pyoptools
some older stuff
http://twiki.ph.rhul.ac.uk/twiki/bin/vi ... thonOptics
https://sourceforge.net/projects/openraytrace/

A 3D ray optics simulation would be for sure extremely appreciated. Until now I know only two free/open-source, simple to use 2D packages: https://ricktu288.github.io/ray-optics/ and https://arachnoid.com/OpticalRayTracer/

You can find a nice overview of how commercial tools look like over here... http://chenglongresearch.weebly.com/blo ... g-software

BR,
HoWil
joha2
Posts: 69
Joined: Tue Oct 11, 2016 9:48 pm

Re: Optics in FreeCAD

Postby joha2 » Mon Apr 03, 2017 12:50 pm

HoWil thank you very very much for this overview of open source ray tracers!!!
I think I will also have a look at them to test our code and cross compare.

Best wishes
Johannes
ickby
Posts: 2460
Joined: Wed Oct 05, 2011 7:36 am

Re: Optics in FreeCAD

Postby ickby » Mon Apr 03, 2017 12:57 pm

HoWil wrote:A 3D ray optics simulation would be for sure extremely appreciated. Until now I know only two free/open-source, simple to use 2D packages
You could also look at BRL-CAD. It is fully based on raytracing (that is their primary evaluation method) and does it extremely fast for all kind of exact geometry (primitives and nurbs). The command line itnerface is complicated and unusual, but you can do crazy analytics wth it (at least that is what I read :) )