Solar diagrams
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
Re: Solar diagrams
Now that i guess is a proper CAD shadow. As it likely can be dimensioned or sent to CNC machine.
Re: Solar diagrams
Looking really good!microelly2 wrote:shadows on a transparent background
Just one question: are you using 2 lights sources? I see that you have 2 shadows overlapping each other and the common part is darker... this is nice if you have 2 light sources but "unrealistic" if you just have one light source.
When will be able to play with it?
Dark and Light stylesheets v2.0 to theme your FreeCAD UI, more information here
- microelly2
- Veteran
- Posts: 4688
- Joined: Tue Nov 12, 2013 4:06 pm
- Contact:
Re: Solar diagrams
The background body is a transparent L-profile. I calculate the shadow on each face, so you see for any part two shadows.pablogil wrote:Looking really good!microelly2 wrote:shadows on a transparent background
Just one question: are you using 2 lights sources? I see that you have 2 shadows overlapping each other and the common part is darker... this is nice if you have 2 light sources but "unrealistic" if you just have one light source.
When will be able to play with it?
Having two shadow faces I can calculate the shadow room inside the background body as a loft (of the both shadow faces) or helos like in Blender:
Here my example with first helos (The light source is the red sphere)
I have tested the case of makeParallelProjection/sun light and it will work too.
And of course we can use multiple lights to get penumbra and core shadows effects for indoor lightning
At the moment its to much hard coded in my script for publishing, I hope to get a testcase this weekend.
- microelly2
- Veteran
- Posts: 4688
- Joined: Tue Nov 12, 2013 4:06 pm
- Contact:
- microelly2
- Veteran
- Posts: 4688
- Joined: Tue Nov 12, 2013 4:06 pm
- Contact:
Re: Solar diagrams
The script and the model I used in the video is now here:
http://freecadbuch.de/doku.php?id=blog: ... bbildungen
For creating the shadow space I still look for a way to connect the corresponding edges for two projections.
At the moment it is hard coded for this case of the windows
The methods still not work for curves but only for planar faces and straight edges.
http://freecadbuch.de/doku.php?id=blog: ... bbildungen
For creating the shadow space I still look for a way to connect the corresponding edges for two projections.
At the moment it is hard coded for this case of the windows
The methods still not work for curves but only for planar faces and straight edges.
Re: Solar diagrams
Excellent microelly!
I also made some progresses... These two attached files can be inserted into a FreeCAD document and they work (the spotlight only works with the nvidia chip for me, not with the intel. Something to do with the 3D driver probably). The good thing is that you can have shadows without modifying the FreeCAD 3D view at all, because I tried encapsulating the whole contents of the 3D view into a SoShadowGroup, but it gives a lot of artifacts everywhere, specially in the sketcher.
I also made some progresses... These two attached files can be inserted into a FreeCAD document and they work (the spotlight only works with the nvidia chip for me, not with the intel. Something to do with the 3D driver probably). The good thing is that you can have shadows without modifying the FreeCAD 3D view at all, because I tried encapsulating the whole contents of the 3D view into a SoShadowGroup, but it gives a lot of artifacts everywhere, specially in the sketcher.
- Attachments
-
- dirlight.iv
- (897 Bytes) Downloaded 131 times
-
- spotlight.iv
- (1.32 KiB) Downloaded 115 times
Re: Solar diagrams
Really cool tests and progress. FYI they work perfectly on macOSmicroelly2 wrote:The script and the model I used in the video is now here:
http://freecadbuch.de/doku.php?id=blog: ... bbildungen
For creating the shadow space I still look for a way to connect the corresponding edges for two projections.
At the moment it is hard coded for this case of the windows
The methods still not work for curves but only for planar faces and straight edges.
Also very nice improvements, the spotlight test works perfectly on my Macbook Pro but the dirlight has no effect on my system...yorik wrote:I also made some progresses... These two attached files can be inserted into a FreeCAD document and they work (the spotlight only works with the nvidia chip for me, not with the intel. Something to do with the 3D driver probably). The good thing is that you can have shadows without modifying the FreeCAD 3D view at all, because I tried encapsulating the whole contents of the 3D view into a SoShadowGroup, but it gives a lot of artifacts everywhere, specially in the sketcher.
Any of them are able to cast shadows to actual FreeCAD geometry but I guess you already know it...
Dark and Light stylesheets v2.0 to theme your FreeCAD UI, more information here
- microelly2
- Veteran
- Posts: 4688
- Joined: Tue Nov 12, 2013 4:06 pm
- Contact:
Re: Solar diagrams
Great Yorik,
So we have a fast way to render and a way to get models for technical drawings.
today I have tested to make the perspective projection of a 3D nurbs and its iso grid to the plane
all derived models are vector graphics data (bsplines)
https://www.youtube.com/watch?v=dub8nHiOlfk
it's still not a porsche (but for me the proof that it will be possible with FreeCAD not so far )
So we have a fast way to render and a way to get models for technical drawings.
today I have tested to make the perspective projection of a 3D nurbs and its iso grid to the plane
all derived models are vector graphics data (bsplines)
https://www.youtube.com/watch?v=dub8nHiOlfk
it's still not a porsche (but for me the proof that it will be possible with FreeCAD not so far )
- Attachments
-
- bp_256.png (71.69 KiB) Viewed 3241 times
- microelly2
- Veteran
- Posts: 4688
- Joined: Tue Nov 12, 2013 4:06 pm
- Contact:
Re: Solar diagrams
For me dirlight works, and for the spotlight I call santa claus to get another hardware.pablogil wrote: Also very nice improvements, the spotlight test works perfectly on my Macbook Pro but the dirlight has no effect on my system...
Any of them are able to cast shadows to actual FreeCAD geometry but I guess you already know it...
Re: Solar diagrams
Very nice progress on both approaches microelly and yorik! For some fake shadows to make the drawings just a bit more interesting to look at microellys method however does seem to require some effort, both to code it and then also for the user, but the method should be great and very useful for many different types of projection calculations...
About yoriks examples, I have tested them on a few computers, all of them were quite basic and older computers and all the examples worked on all of them. This machines were all Windows systems, one of them had Intel graphic and other were Nvidia. I will hopefully be able to test it on some more machines in the next days
I am adding an image of all the three tests, so that we have a clear reference what we should see. First one is yoriks model house with shadows, this one was actually quite confusing for me at first because in the beginning all I saw was just the rectangle that represents the ground, it did look like some light is shining on it and it took me quite a long time before I realized that to see the model of the house I first have to activate the Mesh Design WB and only then import this test file. The other two examples worked normally from the start, as can be seen on the image, one has small red cubes with shadow and the last one is actually an animation where the objects are moving and casting shadows...
So if anyone else will test this, it might be good to report some graphic card model and drivers version for those cases that are not working.
Hopefully it will be possible to get this working, I see it as an option to temporary turn on shadows (can be fake shadows without the proper sun position), of course if it can be later also used for real shadow/sun studies it would be great. Also I guess it might be possible to use it in TechDraw, if not directly then maybe as saved raster images
About yoriks examples, I have tested them on a few computers, all of them were quite basic and older computers and all the examples worked on all of them. This machines were all Windows systems, one of them had Intel graphic and other were Nvidia. I will hopefully be able to test it on some more machines in the next days
I am adding an image of all the three tests, so that we have a clear reference what we should see. First one is yoriks model house with shadows, this one was actually quite confusing for me at first because in the beginning all I saw was just the rectangle that represents the ground, it did look like some light is shining on it and it took me quite a long time before I realized that to see the model of the house I first have to activate the Mesh Design WB and only then import this test file. The other two examples worked normally from the start, as can be seen on the image, one has small red cubes with shadow and the last one is actually an animation where the objects are moving and casting shadows...
So if anyone else will test this, it might be good to report some graphic card model and drivers version for those cases that are not working.
Hopefully it will be possible to get this working, I see it as an option to temporary turn on shadows (can be fake shadows without the proper sun position), of course if it can be later also used for real shadow/sun studies it would be great. Also I guess it might be possible to use it in TechDraw, if not directly then maybe as saved raster images