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
I also would like to see any kind of shadows, as @saso says it's not necessary that they are real light projections. Actually, Inventor and Solidworks use fake shadows...
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
easy to do are projections of the objects to other faces and create fake shadows (like Facebinder objects or Shape2dView) this way:
http://freecadbuch.de/doku.php?id=blog: ... te_flaeche
can this be a way?
http://freecadbuch.de/doku.php?id=blog: ... te_flaeche
can this be a way?
Re: Solar diagrams
I would say it's a nice start, yes, it could work.microelly2 wrote:easy to do are projections of the objects to other faces and create fake shadows (like Facebinder objects or Shape2dView) this way:
http://freecadbuch.de/doku.php?id=blog: ... te_flaeche
can this be a way?
Is it possible to make the light source (yellow point of your experiment) "cast" shadows to all object in the scene? or maybe just a selection (maybe as a parameter list of the yellow point)?
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
May be, I will test it.pablogil wrote:I would say it's a nice start, yes, it could work.microelly2 wrote:easy to do are projections of the objects to other faces and create fake shadows (like Facebinder objects or Shape2dView) this way:
http://freecadbuch.de/doku.php?id=blog: ... te_flaeche
can this be a way?
Is it possible to make the light source (yellow point of your experiment) "cast" shadows to all object in the scene? or maybe just a selection (maybe as a parameter list of the yellow point)?
Re: Solar diagrams
Greatmicroelly2 wrote: May be, I will test 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
for planar faces it will work
- Attachments
-
- bp_244.png (16.37 KiB) Viewed 2857 times
Re: Solar diagrams
Very cool!microelly2 wrote:for planar faces it will work
I was thinking about the "fast or fake" shadows inside FreeCAD:
- wouldn't it be faster and easier to cast a shadow based on a direction (directional light) instead of a point (point light)? I have read they are normally less CPU consuming than point light "algorithms"
- would it be possible to have the shadows casted on an invisible floor placed on XZ (or configurable) plane?
- is it possible to apply kind of a FX to blur the casted shadow object?
- and/or set transparency to 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
I use plane.Shape.makePerspectiveProjection and can replace it by the parallelProjection methodpablogil wrote:Very cool!microelly2 wrote:for planar faces it will work
I was thinking about the "fast or fake" shadows inside FreeCAD:
- wouldn't it be faster and easier to cast a shadow based on a direction (directional light) instead of a point (point light)? I have read they are normally less CPU consuming than point light "algorithms"
the shadows are face objects and can be placed anywher[*]would it be possible to have the shadows casted on an invisible floor placed on XZ (or configurable) plane?
will be configuable,[*]is it possible to apply kind of a FX to blur the casted shadow object?
[*]and/or set transparency to it?[/list]
Thanks
the problems I see are nonplanar faces and shadows over edges.
these will need extra programming and cpu time to calculate
Re: Solar diagrams
it is not hard to fake shadows, but it can become very slow for huge documents... I would still like to be able to do it the Coin way, because modern GPUs can compute shadows very fast.
But fake shadows like microellys can be a good alternative. Especially that what takes a lot of time is unioning all the projected faces, but if you paint them all in a same color and set them in Shaded display mode, maybe there is no need to union them...
Also, then these shadows might be placed on a TechDraw doc! How cool would that be!
But fake shadows like microellys can be a good alternative. Especially that what takes a lot of time is unioning all the projected faces, but if you paint them all in a same color and set them in Shaded display mode, maybe there is no need to union them...
Also, then these shadows might be placed on a TechDraw doc! How cool would that be!
- microelly2
- Veteran
- Posts: 4688
- Joined: Tue Nov 12, 2013 4:06 pm
- Contact:
Re: Solar diagrams
These are the profiler data for my test
most time is needed for Part.show the projected wire,
I need this for Draft update
Can I update a shape on the direct way? Maybe I modify the Draft.update method
the big recompute at the end is needed
and the cleanup remove objects can be eleminated when I can update
But the quality is okay:
shadows on a transparent background
]
most time is needed for Part.show the projected wire,
I need this for Draft update
Can I update a shape on the direct way? Maybe I modify the Draft.update method
the big recompute at the end is needed
and the cleanup remove objects can be eleminated when I can update
ncalls tottime percall cumtime percallfilename:lineno(function)
1 0.041 0.041 6.563 6.563<input>:1(runall)
95 0.000 0.000 0.162 0.002<input>:10(delo)
1 0.000 0.000 6.563 6.563<string>:1(<module>)
8 0.000 0.000 0.000 0.000Draft.py:169(getType)
104 0.011 0.000 0.248 0.002Draft.py:2832(upgrade)
8 0.002 0.000 0.009 0.001Draft.py:2899(closeWire)
94 0.058 0.001 0.130 0.001Draft.py:3002(makeFaces)
2 0.000 0.000 0.002 0.001Draft.py:3020(makeWires)
511 0.003 0.000 0.003 0.000DraftGeomUtils.py:188(geomType)
104 0.000 0.000 0.001 0.000DraftTools.py:77(translate)
104 0.000 0.000 0.003 0.000DraftTools.py:81(msg)
2 0.000 0.000 0.000 0.000{FreeCAD.activeDocument}
104 0.003 0.000 0.003 0.000{__FreeCADConsole__.PrintMessage}
10 0.000 0.000 0.000 0.000{built-in method __sortEdges__}
94 3.099 0.033 3.099 0.033{built-in method show}
623 0.000 0.000 0.000 0.000{isinstance}
443 0.000 0.000 0.000 0.000{len}
106 0.081 0.001 0.081 0.001{method 'addObject' of 'App.Document' objects}
1150 0.000 0.000 0.000 0.000{method 'append' of 'list' objects}
1 0.000 0.000 0.000 0.000{method 'disable' of '_lsprof.Profiler' objects}
104 0.000 0.000 0.000 0.000{method 'encode' of 'unicode' objects}
314 0.000 0.000 0.000 0.000{method 'extend' of 'list' objects}
1020 0.000 0.000 0.000 0.000{method 'hashCode' of 'Part.Shape' objects}
189 0.001 0.000 0.001 0.000{method 'hide' of 'Gui.ViewProvider' objects}
114 0.001 0.000 0.001 0.000{method 'isClosed' of 'Part.Shape' objects}
214 0.000 0.000 0.000 0.000{method 'isDerivedFrom' of 'Base.BaseClass' objects}
376 0.770 0.002 0.770 0.002{method 'makePerspectiveProjection' of 'Part.Shape' objects}
1 2.223 2.223 2.223 2.223{method 'recompute' of 'App.Document' objects}
199 0.250 0.001 0.250 0.001{method 'removeObject' of 'App.Document' objects}
1 0.016 0.016 0.016 0.016{method 'removeSplitter' of 'Part.Shape' objects}
104 0.000 0.000 0.000 0.000{method 'startswith' of 'str' objects}
8 0.000 0.000 0.000 0.000{method 'toShape' of 'Part.GeomCurve' objects}
1 0.000 0.000 0.000 0.000{range}
104 0.001 0.000 0.001 0.000{translate}
But the quality is okay:
shadows on a transparent background
]