Have you found a way around the limitations of floating point error for movement of lens stacks and rendering of very long focal length systems? Seems keeping them static at (0,0,0) is the best/only way to dodge those issues
Can't report on findings yet. More tests are planned for Video number 3. A first one I tried already was surprisingly stable, compared to what I remember from my tests with LuxCore a long while ago. However, I'm curious how this may vary for different lens designs. Ultimately, I don't thinkone can do much more, unless you rewrite Blender and any Renderengine to work entierly in 64bit float. Ray portals sound like a good solution for many applications.
@ thats what I was thiniking with the bit depth, my workaround was to 'RayPortal' the rays back to a static cam at the origin. But Camera Motion blur becomes dead. Hoping to get you in contact with someones alternative method thats releasing soon. Its very well built. I'll hit u up on instagram
Ah I see, valid point about motion blur. Would be interesting to get in contact about alternative methods. I also have some Idea how something like this can be done efficiently, but again that requires implementation in the render engine. Instagram won't be a good channel for me, though. You can find contact information on the github page.
I did have Pentaprisms in mind before. According to my local repo I last worked on it 3 years ago 😅 It was not on my priority list, but if there is some interest, I will bump that.
@howtoprint6002 I was trying to make a ww2 optical rangefinder, it requires pentaprisms so they'd be helpful! But I'm probably a minority, I 3d model random things for fun.
There is another option for you: You can find prisms at those off-the-shelf manufacturers I mentioned in the video. Similar to the zmx-files for optics, they offer CAD-files for most parts. Typical formats like STEP can't be opened directly by Blender, but there are freeware options like FreeCAD to convert them to STL.
Thank you for Opticore! I have a question! If we use opticore to make virtual cameras in blender, does the size of the lenses affect the result? Also when using the camera as the reception plan of the reflected image, when we scale the camera to a certain size, it seems that its settings go crazy and difficut to set.. do you have any idea on how to do? Thank you again
Thank you for the feedback! I plan to publish the next tutorials in about a week, which will cover the principle setup in Cycles and LuxCoreRender. I hope those will cover your second question. Regarding the size of lenses, they have to be to scale with the scene you are setting up. If the lenses including detector/camera setup are scaled by some factor, you effectively scaled the focal length, but not the field of view and f-number. The result would be that the depth of focus is wrong. Note that currently OptiCore assumes units of millimeters, while Blender natively uses meters, so you might need to scale by a factor of 1000 - depending on how you modeled your scene.
The zmx-import handles cemented lenses just fine. Some lens groups in the examples I show are cemented. You can find example files at Thorlabs or Edmund optics.
@@howtoprint6002 I was testing with Thorlabs lenses actually - the lens gets imported as single body despite showing correctly in zemax, hence my question.
@@howtoprint6002 Using Thorlabs AC254-030-A to replicate my problem in new project, getting the same result. Single lens body gets imported, no materials assigned. Yet opening it in zemax shows the expected structure. Is this intentional approximation or bug?
@@Konecny_M I just downloaded and tested that Thorlabs file. It works exactly as expected for me, including sequential raytrace. OptiCore creates a single body for cemented lenses, the middle surface is inside, you should see it in wireframe view. I do not currently have any access to Zemax to cross check how it is displayed there. It is consistent with WinLens, also for the raytrace when matching the stop size. If you still feel something is wrong, it would be helpful to have some pictures, you could open an isue on Github for example. About the materials, it only loads the refractive index for the internal "Add ray fan" feature. Materials for Cycles etc. are not created automatically.
Awesome addon and tutorial!
Incredible work
Have you found a way around the limitations of floating point error for movement of lens stacks and rendering of very long focal length systems? Seems keeping them static at (0,0,0) is the best/only way to dodge those issues
Can't report on findings yet. More tests are planned for Video number 3.
A first one I tried already was surprisingly stable, compared to what I remember from my tests with LuxCore a long while ago. However, I'm curious how this may vary for different lens designs.
Ultimately, I don't thinkone can do much more, unless you rewrite Blender and any Renderengine to work entierly in 64bit float. Ray portals sound like a good solution for many applications.
@ thats what I was thiniking with the bit depth, my workaround was to 'RayPortal' the rays back to a static cam at the origin. But Camera Motion blur becomes dead.
Hoping to get you in contact with someones alternative method thats releasing soon. Its very well built. I'll hit u up on instagram
Ah I see, valid point about motion blur.
Would be interesting to get in contact about alternative methods. I also have some Idea how something like this can be done efficiently, but again that requires implementation in the render engine.
Instagram won't be a good channel for me, though. You can find contact information on the github page.
Do you have plans to implement Pentaprisms, or other optical prisms?
I actually tried beamsplitter with variable ratios but did not manage to get good results yet.
I did have Pentaprisms in mind before. According to my local repo I last worked on it 3 years ago 😅
It was not on my priority list, but if there is some interest, I will bump that.
@howtoprint6002 I was trying to make a ww2 optical rangefinder, it requires pentaprisms so they'd be helpful! But I'm probably a minority, I 3d model random things for fun.
There is another option for you: You can find prisms at those off-the-shelf manufacturers I mentioned in the video. Similar to the zmx-files for optics, they offer CAD-files for most parts. Typical formats like STEP can't be opened directly by Blender, but there are freeware options like FreeCAD to convert them to STL.
@@ravenpotter5131 I did try pentaprism, worked on first try. If you want the PLY file just drop me a message.
Thank you for Opticore! I have a question! If we use opticore to make virtual cameras in blender, does the size of the lenses affect the result? Also when using the camera as the reception plan of the reflected image, when we scale the camera to a certain size, it seems that its settings go crazy and difficut to set.. do you have any idea on how to do?
Thank you again
Thank you for the feedback! I plan to publish the next tutorials in about a week, which will cover the principle setup in Cycles and LuxCoreRender. I hope those will cover your second question. Regarding the size of lenses, they have to be to scale with the scene you are setting up. If the lenses including detector/camera setup are scaled by some factor, you effectively scaled the focal length, but not the field of view and f-number. The result would be that the depth of focus is wrong. Note that currently OptiCore assumes units of millimeters, while Blender natively uses meters, so you might need to scale by a factor of 1000 - depending on how you modeled your scene.
@@howtoprint6002 Can't wait!!!
Is there any way for importing cemented doublets?
The zmx-import handles cemented lenses just fine. Some lens groups in the examples I show are cemented.
You can find example files at Thorlabs or Edmund optics.
@@howtoprint6002 I was testing with Thorlabs lenses actually - the lens gets imported as single body despite showing correctly in zemax, hence my question.
@@howtoprint6002 Using Thorlabs AC254-030-A to replicate my problem in new project, getting the same result. Single lens body gets imported, no materials assigned. Yet opening it in zemax shows the expected structure. Is this intentional approximation or bug?
@@Konecny_M I just downloaded and tested that Thorlabs file. It works exactly as expected for me, including sequential raytrace. OptiCore creates a single body for cemented lenses, the middle surface is inside, you should see it in wireframe view. I do not currently have any access to Zemax to cross check how it is displayed there. It is consistent with WinLens, also for the raytrace when matching the stop size. If you still feel something is wrong, it would be helpful to have some pictures, you could open an isue on Github for example. About the materials, it only loads the refractive index for the internal "Add ray fan" feature. Materials for Cycles etc. are not created automatically.
By the way, it's nice to get feedback on this project from a user with a background in optics! Keep it coming ;)