[Renderer Workbench] Lighting

Here's the place for discussion related to coding in FreeCAD, C++ or Python. Design, interfaces and structures.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
jmaustpc
Veteran
Posts: 11207
Joined: Tue Jul 26, 2011 6:28 am
Location: Australia

Re: [Renderer Workbench] Lighting

Post by jmaustpc »

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: 313
Joined: Tue Sep 10, 2019 8:16 pm

Re: [Renderer Workbench] Lighting

Post by howetuft »

@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

Post by Electroguy »

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
Sketch OK
Sketch OK.png (41.11 KiB) Viewed 1937 times
Unreadable dimensions when light enabled
Unreadable dimensions when light enabled
Sketch dimensions unreadable.png (51.75 KiB) Viewed 1937 times
Attachments
TUT05A [Gauge].007.FCStd
FreeCAD Testfile: Gauge
(314.82 KiB) Downloaded 51 times
HoWil
Veteran
Posts: 1279
Joined: Sun Jun 14, 2015 7:31 pm
Location: Austria

Re: [Renderer Workbench] Lighting

Post by HoWil »

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: 313
Joined: Tue Sep 10, 2019 8:16 pm

Re: [Renderer Workbench] Lighting

Post by howetuft »

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 1839 times

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

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

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

Re: [Renderer Workbench] Lighting

Post by howetuft »

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 1837 times
Cycles.png
Cycles.png (124.13 KiB) Viewed 1837 times
Luxcore.png
Luxcore.png (76.44 KiB) Viewed 1837 times
Povray.png
Povray.png (35.49 KiB) Viewed 1837 times
User avatar
MisterMaker
Posts: 744
Joined: Mon Sep 21, 2020 7:41 am
Contact:

Re: [Renderer Workbench] Lighting

Post by MisterMaker »

These renders look amazing, I know it is an old topic. but I am trying to figure out myself how to set this up. Wiki pages are all very outdated.
Is there a way to get a screenshot of the render workbench settings to get these kind of renders?
howetuft
Posts: 313
Joined: Tue Sep 10, 2019 8:16 pm

Re: [Renderer Workbench] Lighting

Post by howetuft »

Hello @MisterMaker,

Thank you for your interest in Render Workbench!

You may find some more useful information in the documentation of the Render Workbench, in its Github repo (https://github.com/FreeCAD/FreeCAD-render).
Wiki pages refer to old Raytracing workbench, so it may not be suitable for Render...

Once you have gone through all steps described in Render Workbench's README (installation, usage), let me know if you have any questions left!
User avatar
MisterMaker
Posts: 744
Joined: Mon Sep 21, 2020 7:41 am
Contact:

Re: [Renderer Workbench] Lighting

Post by MisterMaker »

@howtuft
I think I spend like half a day already in figuring this out, but I failed in building cycles. I asked for help in the blender forums:
https://devtalk.blender.org/t/building- ... me/17861/3
But the reply was basically do a lot of extra stuff that is not described in the manual, and I have never done before, I tried it but got more errors.

My settings are as followed:
Image
It would also help a lot if the image in the wiki would have the correct settings and not blank! wiki page

I won't mind writing a how to guide if I finally find out how to. :D
Attachments
2021-03-13 11_37_18-Preferences.png
2021-03-13 11_37_18-Preferences.png (61.6 KiB) Viewed 1442 times
drmacro
Veteran
Posts: 8979
Joined: Sun Mar 02, 2014 4:35 pm

Re: [Renderer Workbench] Lighting

Post by drmacro »

Interesting...

I just attempted to build Cycles with the "documentation" provided by the Cycles renderer web page...

Complete fail.

So the FC Render WB may be great, nice icons...but, for mere mortals, it's just easier to export to Blender. :(
Star Trek II: The Wrath of Khan: Spock: "...His pattern indicates two-dimensional thinking."
Post Reply