shadows in the freecad viewport
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
Re: shadows in the freecad viewport
Thanks, that's tricky
I meant I want the shadow edge be more sharp / straight.
I try Spotlight which gives a more shape edge, but it is not natural as the cone of light is too narrow...
When set the Cut Off Angle from 45 deg to say 75 deg, the edge become blurred again
I meant I want the shadow edge be more sharp / straight.
I try Spotlight which gives a more shape edge, but it is not natural as the cone of light is too narrow...
When set the Cut Off Angle from 45 deg to say 75 deg, the edge become blurred again
-
- Veteran
- Posts: 2190
- Joined: Tue Jan 03, 2017 10:55 am
Re: shadows in the freecad viewport
Then, you need to turn off SpreadSize and SpreadSampleSize, set Precision to 1.0, and change Smooth Border. There is something not quite right with the smooth border at the moment. I'll fix it soon.
-
- Veteran
- Posts: 2190
- Joined: Tue Jan 03, 2017 10:55 am
Re: shadows in the freecad viewport
Image 0615 released. Here is shadow with SmoothBorder 2, followed by comparison without SmoothBorder
Re: shadows in the freecad viewport
Thanks
It helps in some way, with Smooth Border, the anti-aliasing -look edges becomes less sharp though.
For a shadow at a distance, the one cast on the ground, it look sharper. For the one on the building rooftop, the anti-aliasing steps are quite big that it needs a much higher Smooth Border figures to 'smooth' it out while it blur in another way.
See any other thing else I can help testing.
It helps in some way, with Smooth Border, the anti-aliasing -look edges becomes less sharp though.
For a shadow at a distance, the one cast on the ground, it look sharper. For the one on the building rooftop, the anti-aliasing steps are quite big that it needs a much higher Smooth Border figures to 'smooth' it out while it blur in another way.
See any other thing else I can help testing.
- OficineRobotica
- Posts: 433
- Joined: Thu Feb 21, 2019 8:17 am
- Contact:
Re: shadows in the freecad viewport
I love the ground back face culling. It completes the shadow on the transparent ground mode. Also the light manipulator is a more than welcomed addition. Thank you.
Given that you layed such a solid ground for the "shadow" display mode don't you think that this should evolve into it's own workbench where the user can add multiple lights, environment and ground textures etc . Something similar to the "texture addon" . Hopefully in the future we could add materials and textures to 3d objects not only to the ground. The workbench could be called "texturing and lighting" and in my opinion, taking this route would brake all the settings regarding texturing and lighting for a scene into more manageable and ordered chunks. Just a thought.
Also your branch touches so many aspects of the Freecad experience that reporting bugs or asking for features becomes difficult to do in a thread like this one because it may touch other aspects , not only the shadow mode. Similarly for the overlay mode thread. Could you please open a thread in the "developers corner" sub forum where we can discuss about your development branch and not flooding the individual features threads if that is necessary.
For now I continue to report some issues I have found here lol....
min. 00.12 -Minor issue, translucent bodies don’t cast any shadow.
min. 00.24 -Upon reopening a file, transparent bodies don’t display the transparency either in “as is” or “shadow” display mode restoring it only after tweaking the transparency value.
min. 01.00 -This is my biggest issue so far as the F16 project has become a test bed for me using your branch. The visibility issue displayed here has brought me to a halt because I can't map LCS's to features of the underlying bodies.
Adding a asm4 “model” will change the behavior of the edit mode visibility setting for the underlying bodies. At times it is enough to press the space bar to re enable the visibility of the previous feature but in the case of LCS’s it is imposible to re enable the visibility.
This renders impossible to map or alter the mapping of sketches, datum or LCS’s etc. because the underlying feature is not visible and nothing can be selected. Unfortunately , this behavior is present only in your branch and not in FC trunk .
min. 02.07 -Again, transparent objects wont display correctly when reopening a file.
min. 02.13 -Feature request. Can we please have the “shadow” display mode respect the individual bodies shading mode selected in the body properties. In this particular example I would like the canopy to display withbought the flat lines but the rest of the model with. This is possible in the “as is” display mode.
min. 02.39 -The overlay display for the combo view enables all panels. After disabling them one by one toggling the overlay re enables all of them forcing the user to go and disable them one by one. The overlay display should remember the settings of the displayed panels.
Thank you for preparing FC for the next big release
Check out my Youtube channel at: https://www.youtube.com/@OficineRobotica
-
- Veteran
- Posts: 2190
- Joined: Tue Jan 03, 2017 10:55 am
Re: shadows in the freecad viewport
That is certainly on my todo list. In fact, I was quite drawn to rendering and stuff after having so much fun playing around with shadows. I feel that Coin3D, despite being 'outdated', still has its potential.OficineRobotica wrote: ↑Sun Jun 21, 2020 9:27 pm Given that you layed such a solid ground for the "shadow" display mode don't you think that this should evolve into it's own workbench where the user can add multiple lights, environment and ground textures etc . Something similar to the "texture addon" . Hopefully in the future we could add materials and textures to 3d objects not only to the ground. The workbench could be called "texturing and lighting" and in my opinion, taking this route would brake all the settings regarding texturing and lighting for a scene into more manageable and ordered chunks. Just a thought.
I alway try to keep this thread about 'Shadows' only. And yes, other features should have their own thread. Feel free to open new thread if you see fit.Also your branch touches so many aspects of the Freecad experience that reporting bugs or asking for features becomes difficult to do in a thread like this one because it may touch other aspects , not only the shadow mode. Similarly for the overlay mode thread. Could you please open a thread in the "developers corner" sub forum where we can discuss about your development branch and not flooding the individual features threads if that is necessary.
I have fixed most of the issues you mentioned pretty quickly, but got stuck with the transparent object shadow casting. It is really a feature request, as Coin3D explicitly turned off shadow for transparent objects. After some struggling, I finally got it working. Now looking back, it is actually not that difficult, once I get used to all those OpenGL and shader stuff. I think I've gained enough experience to try some other advanced effects, maybe ambient occlusion as you mentioned.
New image not ready yet. stay tuned.
- OficineRobotica
- Posts: 433
- Joined: Thu Feb 21, 2019 8:17 am
- Contact:
Re: shadows in the freecad viewport
I'm reading on the various threads where i have stalked you.....and all I can say is THANK YOU.
And I will thank you in every individual thread
Check out my Youtube channel at: https://www.youtube.com/@OficineRobotica
Re: shadows in the freecad viewport
This semitransparent shadows are amazing!!
If you get ambient occlusion working it would be really game changing.
As OficineRobotica, I’m throwing you an idea: what about scriptable materials? I’m not talking about Blender’s node system (that would be awesome but a huge work) but something easy to setup that would work... maybe importing the shaders from another software...
Again, thanks for your great visual work, I’m sure it will help FreeCAD reach new levels and toons of new users.
Cheers
If you get ambient occlusion working it would be really game changing.
As OficineRobotica, I’m throwing you an idea: what about scriptable materials? I’m not talking about Blender’s node system (that would be awesome but a huge work) but something easy to setup that would work... maybe importing the shaders from another software...
Again, thanks for your great visual work, I’m sure it will help FreeCAD reach new levels and toons of new users.
Cheers
Dark and Light stylesheets v2.0 to theme your FreeCAD UI, more information here
Re: shadows in the freecad viewport
+1OficineRobotica wrote: ↑Sun Jun 28, 2020 10:08 amI'm reading on the various threads where i have stalked you.....and all I can say is THANK YOU.
And I will thank you in every individual thread
Dark and Light stylesheets v2.0 to theme your FreeCAD UI, more information here
-
- Veteran
- Posts: 2190
- Joined: Tue Jan 03, 2017 10:55 am
Re: shadows in the freecad viewport
New image released.
Transparent shadow is controlled by a new document parameter 'Transparent shadow'. It is by default off because it takes a bit more overhead when enabled. You can find the same parameter in draw style preference setting. The picture I posted previously had some issue with color blending. The shadowed part should never be brighter than the non-shadowed part. The transparent shadow will gradually lose its color and fade to dark grey when decreasing the transparency of the casting object.
Another new parameter to control the display mode while in shadow draw style. Again, you can preset it in preference dialog.
Transparent shadow is controlled by a new document parameter 'Transparent shadow'. It is by default off because it takes a bit more overhead when enabled. You can find the same parameter in draw style preference setting. The picture I posted previously had some issue with color blending. The shadowed part should never be brighter than the non-shadowed part. The transparent shadow will gradually lose its color and fade to dark grey when decreasing the transparency of the casting object.
Another new parameter to control the display mode while in shadow draw style. Again, you can preset it in preference dialog.