Before I explain the feature I'm looking for, I want to state that I am using OpenSCAD "to the limit" when it comes to generating computer animations of mechanical devices & assembly videos. OpenSCAD is very suitable for generating animations in many cases, because if you stay in that application you can handle dynamically generated parts without trying to "re-animate" them in a tool such as Blender. Springs that compress and decompress are a simple example of this.
That being said, OpenSCAD has been extremely powerful for me in many cases, and I've avoided moving to a tool such as Blender altogether.
However there is one simple case, where I actually want LESS features than what OpenSCAD already has. This is related to the lighting model. I'm actually generating my computer animation frames, one by one, from the command line, by varying 't' and by varying the gimbal camera position in an intelligent manner, using cosine interpolations between various camera stopping points, etc.
The need I have of OpenSCAD is to generate 2D cutaways and graphs. I have already done this with great success:
https://odysee.com/@Neri_Engineering/profiles
https://odysee.com/@Neri_Engineering/gimbal-cv-ver1-360-orange-green-calc-40-incident
However for generation of such animations, which OpenSCAD is great at, and by using the "ortho" projection of course, it would be nice to have a lighting model which shines equally on every surface, at 100%, regardless of normal angle of surface with respect to light source(s). If you can imagine how horrendous this would look in the 3D view for example, you may have a toothed gear of one color where you can't make out the teeth at all, and you only see the silhouette of the entire gear in one solid color, in contrast to the background. Yes, it would look ugly. Yes, I understand why such an "ambient light" feature hasn't been implemented into OpenSCAD. I have no doubts about that. But, if you realize for a moment that the ambient light model is a simplification of the current lighting model, and that it would fill a certain need of generating 2D images, then you see that it would actually serve a great purpose. Especially considering that OpenSCAD is already so powerful at generating graphs & 2D images.
In the example of the graph video above, the graph line is being drawn by spheres. Many of them. Yes, I could use cubes instead so that the color across the width of the line is more constant. But that is besides the point. The color on the visible face of the cube would still be affected by the angle that it makes with the light source(s). In these sorts of cases it makes more sense to have a 100% ambient light source, that lights up every surface to exactly that color which it's assigned to.
In the 2D cross sectional diagrams (video above as well) the same problem - the color of the cross section is affected slightly by the angle of the surface in 3D. A simpler strategy would be to employ a 100% ambient lighting model.
Furthermore a 100% ambient lighting model would not be difficult to implement. In fact it would likely be nothing more than taking away the feature of having the more intricate lighting model. I don't know how you would expose such a strange feature in the UI, though. Maybe it could be an Easter egg feature, or a hidden feature available only from command line.
I am seeking to do this. I can find the area of code myself, and make the modifications necessary. But I don't know where to start looking. I am not looking for a workaround, e.g. by rotating the entire piece, along with the camera, to be aligned with the light source. In this case, I've decided, no workaround. Only implementation of the feature proposed.
I was wondering if anyone has run across this problem before and/or where I would begin messing with the code, or maybe even it's a library that's outside of OpenSCAD. Also I'm a bit hesitant to set up the build environment for OpenSCAD, as it was installed in binary form via package system on Ubuntu 22.
Respectfully,
Nerius
Sent with Proton Mail secure email.
Before I explain the feature I'm looking for, I want to state that I am using OpenSCAD "to the limit" when it comes to generating computer animations of mechanical devices & assembly videos. OpenSCAD is very suitable for generating animations in many cases, because if you stay in that application you can handle dynamically generated parts without trying to "re-animate" them in a tool such as Blender. Springs that compress and decompress are a simple example of this.
That being said, OpenSCAD has been extremely powerful for me in many cases, and I've avoided moving to a tool such as Blender altogether.
However there is one simple case, where I actually want _LESS_ features than what OpenSCAD already has. This is related to the lighting model. I'm actually generating my computer animation frames, one by one, from the command line, by varying 't' and by varying the gimbal camera position in an intelligent manner, using cosine interpolations between various camera stopping points, etc.
The need I have of OpenSCAD is to generate 2D cutaways and graphs. I have already done this with great success:
https://odysee.com/@Neri_Engineering/profiles
https://odysee.com/@Neri_Engineering/gimbal-cv-ver1-360-orange-green-calc-40-incident
However for generation of such animations, which OpenSCAD is great at, and by using the "ortho" projection of course, it would be nice to have a lighting model which shines equally on every surface, at 100%, regardless of normal angle of surface with respect to light source(s). If you can imagine how horrendous this would look in the 3D view for example, you may have a toothed gear of one color where you can't make out the teeth at all, and you only see the silhouette of the entire gear in one solid color, in contrast to the background. Yes, it would look ugly. Yes, I understand why such an "ambient light" feature hasn't been implemented into OpenSCAD. I have no doubts about that. But, if you realize for a moment that the ambient light model is a simplification of the current lighting model, and that it would fill a certain need of generating 2D images, then you see that it would actually serve a great purpose. Especially considering that OpenSCAD is already so powerful at generating graphs & 2D images.
In the example of the graph video above, the graph line is being drawn by spheres. Many of them. Yes, I could use cubes instead so that the color across the width of the line is more constant. But that is besides the point. The color on the visible face of the cube would still be affected by the angle that it makes with the light source(s). In these sorts of cases it makes more sense to have a 100% ambient light source, that lights up every surface to exactly that color which it's assigned to.
In the 2D cross sectional diagrams (video above as well) the same problem - the color of the cross section is affected slightly by the angle of the surface in 3D. A simpler strategy would be to employ a 100% ambient lighting model.
Furthermore a 100% ambient lighting model would not be difficult to implement. In fact it would likely be nothing more than taking away the feature of having the more intricate lighting model. I don't know how you would expose such a strange feature in the UI, though. Maybe it could be an Easter egg feature, or a hidden feature available only from command line.
I am seeking to do this. I can find the area of code myself, and make the modifications necessary. But I don't know where to start looking. I am not looking for a workaround, e.g. by rotating the entire piece, along with the camera, to be aligned with the light source. In this case, I've decided, no workaround. Only implementation of the feature proposed.
I was wondering if anyone has run across this problem before and/or where I would begin messing with the code, or maybe even it's a library that's outside of OpenSCAD. Also I'm a bit hesitant to set up the build environment for OpenSCAD, as it was installed in binary form via package system on Ubuntu 22.
Respectfully,
Nerius
Sent with [Proton Mail](https://proton.me/) secure email.