-
Notifications
You must be signed in to change notification settings - Fork 12
Need help to extend the lens modeling features #15
-
Dear developers,
I need to simulate 3D objects image on the 2D detector through the specific lens system.
Now I can add maximum "three" aspherical coefficient for polynominal terms using the OptiCore.
My requests are following:
- Any way to add "nine" aspherical coefficient for polynominal terms?
- How to edit the lens surface parameters after creating the lens? I can't find the "Lens" button.
- Is it possible to add dispersion (dependence of refractive index on wavelength)?
Thank you in advance.
Beta Was this translation helpful? Give feedback.
All reactions
Replies: 1 comment 2 replies
-
Hi,
The short answers to your questions are:
- I can add this in the next week or so. The mathematics is already in the code, I just need to find a GUI layout that is not too complex.
- This is not currently possible, unfortunately, since it is not in line with Blenders main functionality and purpose. There is an idea how to program it, but I will likely not implement it in the near future.
- This can not be done by OptiCore, which is an addon only for generating the geometry. Dispersion (and any other material property) is handled by the render engine, such as Cycles or LuxCoreRender.
An additional note I would like to make is that you should be very careful about the results when using 9 aspheric coefficients. Because Blender's geometry handling, as well as all the render engines I am aware of, are limited to 32 bit float precision, you may not get the desired accuracy - depending on what your application is.
You will have to judge yourself whether a comparison with a dedicated optical design software is needed in your application.
Beta Was this translation helpful? Give feedback.
All reactions
-
Thank you so much for your help and additional notice!
I will look forward to updating the 9 aspherical coefficients.
Beta Was this translation helpful? Give feedback.
All reactions
-
I have added a configuration option in the code.
For display in the GUI, the existing Vector could simply be made longer.
What does not seem possible is to make this dynamic. You will have to manually modify line 122 in lens.py:
Change
ASPDEG = 3
to
ASPDEG = 9
Beta Was this translation helpful? Give feedback.