[Renderer Workbench] Lighting

Here's the place for discussion related to coding in FreeCAD, C++ or Python. Design, interfaces and structures.
jmaustpc
Posts: 9854
Joined: Tue Jul 26, 2011 6:28 am
Location: Australia

Re: [Renderer Workbench] Lighting

Postby jmaustpc » Thu Jul 23, 2020 3:26 am

Your first post, welcome to FreeCAD. :)

Please always post your version data in the manner explained in the Forum Rules link above the Help forum.

Is the object a solid?
Did you modelled in FreeCAD?

If the original is a mesh like STL then you will never get nice curves, they will always be polygonal.

If it is a solid made by someone else, perhaps a STEP file, it is possible that some one else imported a Mesh and then converted it to a solid, which would still leave all the polygonal curve approximations.

Jim
howetuft
Posts: 25
Joined: Tue Sep 10, 2019 8:16 pm

Re: [Renderer Workbench] Lighting

Postby howetuft » Thu Jul 23, 2020 8:41 am

@electroguy
Thank you very much for using Render Workbench and publishing your feedback!
A few answers to your remarks/questions:
  • Deviation: the Deviation parameter is not yet taken into account in Render, whereas it was in old Raytracing, as you noticed. It is a feature we definitely need to implement in Render, I thank you to emphasize it. By the way, the behavior you described for Raytracing is consistent: the lower the Deviation, the smoother the rendering, but the larger the file. The reason is, Deviation parameter controls the number of meshes for a curved surface.
  • Textures: no, Arch Textures WB's textures are not taken into account, despite an attempt last year. However, in the same vein, I am currently working on materials rendering, so we should be able to render glass, metals, paints etc. in a near future (but not leopard skin...).
  • Lights: Arch Textures WB's point lights should work in Render, but I definitely recommend to use Render lighting features, which are now more extensive: point lights, area lights, sun & sky lighting, image based lighting...
Would it be possible for you to attach your FreeCAD file? I'm always seeking for test files... Thanks!
Electroguy
Posts: 2
Joined: Thu Jul 23, 2020 12:49 am

Re: [Renderer Workbench] Lighting

Postby Electroguy » Thu Jul 23, 2020 6:17 pm

Thank You for the advices.

The version I used was downloaded yesterday, now it showes:
OS: Windows 10 (10.0)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.22111 (Git)
Build type: Release
Branch: master
Hash: cb2099aa6bb287a8d7843eb70684cce79bdef26b
Python version: 3.6.8
Qt version: 5.12.1
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/United States (en_US)

My test file is created by me in Part Design Workbench from a two sketches.
I noted couple of changes in behavior since I tested this first time.
For example I had to put the command line setting in quotation marks for example, and now its not needed so there have been changes in the code.

I get a couple of errors in the report view:
12:51:07 Thread size out of range (It's not.)
12:51:23 This function will be deprecated. Please use 'get_group_contents'.
12:51:23 D:/Program Files/LuxCoreRender/v2.4/luxcoreui.exe -o "C:\Users\Bo_Lo\AppData\Local\Temp\LuxcoreProjectzajtjmi3.cfg" -f "C:\Users\Bo_Lo\AppData\Local\Temp\LuxcoreProject3cehc32t.scn"

I'm not sure if I got this before.

Side effects:
When light is enabled (by pressing space at PointLight for example) the measurement values in an open sketch disappear (or become so small/unreadable).

Sketch OK.png
Sketch OK
Sketch OK.png (41.11 KiB) Viewed 202 times
Sketch dimensions unreadable.png
Unreadable dimensions when light enabled
Sketch dimensions unreadable.png (51.75 KiB) Viewed 202 times
Attachments
TUT05A [Gauge].007.FCStd
FreeCAD Testfile: Gauge
(314.82 KiB) Downloaded 6 times
HoWil
Posts: 1177
Joined: Sun Jun 14, 2015 7:31 pm
Location: Austria

Re: [Renderer Workbench] Lighting

Postby HoWil » Sat Aug 01, 2020 6:04 am

howetuft wrote:
Mon Dec 30, 2019 7:39 pm
ball.png
Dear howetuft,
Nice work.
Can you please also post your model with the sphere so others can run comparing renderings?
Maybe some sort of standard models would be good for the future.
BR
howetuft
Posts: 25
Joined: Tue Sep 10, 2019 8:16 pm

Re: [Renderer Workbench] Lighting

Postby howetuft » Sun Aug 02, 2020 7:39 am

Hello HoWil,
You'll find here enclosed my simple test scene (which I rebuilt it from several files).
A few remarks:
- You may have a "AssertionError: Cannot render project: Template not found" if you try to render as is. The reason is projects templates properties link to local files (ie, in this project, to my own local templates files). You must reset these properties to your own local templates files.
- Povray rendering, and maybe Luxcore one, may probably appear a bit burnt. Indeed, there is an issue/challenge/nightmare with balancing lights powers between renderers. In my opinion, it calls for a notion of 'gain' parameter for each renderer (and maybe for each kind of light).
I should work on that in the future...

To be complete, here are the results I personally get from the renderers:


Appleseed:
Appleseed.png
Appleseed.png (394.45 KiB) Viewed 104 times

Cycles:
Cycles.png
Cycles.png (75.15 KiB) Viewed 104 times

Luxcore:
Luxcore.png
Luxcore.png (42.12 KiB) Viewed 104 times

Povray:
Povray.png
Povray.png (14.1 KiB) Viewed 104 times
Attachments
Render_SimpleScene.FCStd
Simple scene model
(31.26 KiB) Downloaded 2 times
howetuft
Posts: 25
Joined: Tue Sep 10, 2019 8:16 pm

Re: [Renderer Workbench] Lighting

Postby howetuft » Sun Aug 02, 2020 7:49 am

As an addition, and just for eyes-candy at now, here is the same scene rendered with the materials features I'm currently working on (here, I applied a red glass material):
Appleseed_glass.png
Appleseed_glass.png (400.16 KiB) Viewed 102 times
Cycles.png
Cycles.png (124.13 KiB) Viewed 102 times
Luxcore.png
Luxcore.png (76.44 KiB) Viewed 102 times
Povray.png
Povray.png (35.49 KiB) Viewed 102 times