Little Addon for optical lenses etc.
Re: Little Addon for optical lenses etc.
uuh sweet, I must have overlooked that
Re: Little Addon for optical lenses etc.
I think using words "floating point" and "precision" in one sentence should be strictly forbidden. Also, with 64 bit we won't even need the point to float.
CPU Bidir + Metropolis | Core i5-4570
Re: Little Addon for optical lenses etc.
I did a quick test, and enabled the option for both custom split normals as well as autosmooth on a regular mesh. It is controlled by a second switch. The autosmooth version is enabled by default because v2.3 is the latest stable release.
I've also tested the difference on the rendering result. Using custom split normals does change the result a bit for the better. However, no change to the shift-issue. See the following comparsion with a single lens at the origin. First old mesh with autosmooth, second with split normals.
Then I also tested the influence of absolute size. Indeed, it seems that the "realistic" scaling leads to additional errors. A lens works better if it is a few m large. I find this strange, float should provide enough orders of magnitude to acommodate for everything, and it says everywhere I read that Blender internally uses float, just the display is rounded to 5 digits. Any ideas?
BYOB, where did you actually get the info that cutsom splits have higher precision that regular normals? I found no docs that specify this.
I've also tested the difference on the rendering result. Using custom split normals does change the result a bit for the better. However, no change to the shift-issue. See the following comparsion with a single lens at the origin. First old mesh with autosmooth, second with split normals.
Then I also tested the influence of absolute size. Indeed, it seems that the "realistic" scaling leads to additional errors. A lens works better if it is a few m large. I find this strange, float should provide enough orders of magnitude to acommodate for everything, and it says everywhere I read that Blender internally uses float, just the display is rounded to 5 digits. Any ideas?
BYOB, where did you actually get the info that cutsom splits have higher precision that regular normals? I found no docs that specify this.
Re: Little Addon for optical lenses etc.
When I implemented the custom normal support, I wasn't satisfied with a Python solution (because slow), so I dug around in the Blender source code until I could extract a raw pointer to the custom normals array. And that is a float array.
You can see here that the regular normals are shorts (2-byte integer): https://github.com/LuxCoreRender/LuxCor ... ypes.h#L64
And here the custom normals are extracted (4-byte float): https://github.com/LuxCoreRender/LuxCor ... r.cpp#L679
You can see here that the regular normals are shorts (2-byte integer): https://github.com/LuxCoreRender/LuxCor ... ypes.h#L64
And here the custom normals are extracted (4-byte float): https://github.com/LuxCoreRender/LuxCor ... r.cpp#L679
Re: Little Addon for optical lenses etc.
Blender precision is just horrible.
Here i only have small cut-off of earth real size, but i need real origin for procedural shader.
Here i only have small cut-off of earth real size, but i need real origin for procedural shader.
Re: Little Addon for optical lenses etc.
We can put that on the pro-list for a "Lux Studio"
Re: Little Addon for optical lenses etc.
Since last posted here, I made some updates, especially a new inclusion of a cube-corner retroreflector array, and recorded a little introduction-video:
https://www.youtube.com/watch?v=D8rQBVI4lIg
As I mentiopn in there, I next plan to do a video of a real lens system. If I play it right, I can maybe turn it into a good demo of LuxCore's glass capabilities as well.
https://www.youtube.com/watch?v=D8rQBVI4lIg
As I mentiopn in there, I next plan to do a video of a real lens system. If I play it right, I can maybe turn it into a good demo of LuxCore's glass capabilities as well.