New Raytracing Workbench: POV-Ray-Rendering

Info about new community or project announcements, implemented features, classes, modules or APIs. Might get technical!
PLEASE DO NOT POST HELP REQUESTS OR OTHER DISCUSSIONS HERE!
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
User avatar
bavariaSHAPE
Posts: 406
Joined: Tue Jun 10, 2014 8:31 am
Contact:

Re: New Raytracing Workbench for POV-Ray

Post by bavariaSHAPE »

Every action in the "Textures Tab" starts POV-Ray. There is also no preview displayed. Is there a setting to prevent this.

I use the WB without Enviroment. Sometimes the WB with Enviroment freezes or does not pass any data for POV-Ray (*.pov is empty).

OS: Windows 7 SP 1 (6.1) (without internet connection)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.22284 (Git)
Build type: Release
Branch: master
Hash: bf1e8e48389f5e9e25bd77b67fe98da4213e797c
Python version: 3.6.8
Qt version: 5.12.1
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: German/Germany (de_DE)
… for a happy FreeCAD-World … JM2C …
The_Raytracers
Posts: 46
Joined: Tue Jul 14, 2020 4:05 pm

Re: New Raytracing Workbench for POV-Ray

Post by The_Raytracers »

Kunda1 wrote: Sat Aug 29, 2020 3:21 am What's your account username ?
The username is "The Raytracers"; Yorik said, spaces and underscores are interchangable, but both doesn't work :/ Maybe you can delete the account and recreate it (with computers this often works :) ).

bavariaSHAPE wrote: Sat Aug 29, 2020 6:44 pm Every action in the "Textures Tab" starts POV-Ray. There is also no preview displayed. Is there a setting to prevent this.

I use the WB without Enviroment. Sometimes the WB with Enviroment freezes or does not pass any data for POV-Ray (*.pov is empty).

OS: Windows 7 SP 1 (6.1) (without internet connection)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.22284 (Git)
Build type: Release
Branch: master
Hash: bf1e8e48389f5e9e25bd77b67fe98da4213e797c
Python version: 3.6.8
Qt version: 5.12.1
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: German/Germany (de_DE)
Thanks a lot for your testing!
Is it a model that you could send me so that I can find the bug easier? You can disable the preview by checking the "Disable Live Preview" checkbox. Starts the whole POV-Ray program with the window, etc.? If yes, it is probably due to the slightly different Windows version of POV-Ray. I will setup a virtual machine with Windows tomorrow and test it.

paullee wrote: Fri Aug 28, 2020 7:55 pm Missed this previously ! Awesome WB !

Wonder also if integration with Blender can be done ?
Thanks for your feedback!
An integration of other renderers is technically possible, but a lot of work would be necessary. Our approach from the beginning was to support only one renderer and this one very good. So this would be a huge change, but not impossible. There would be a few big points that have to be done:
  • we have to create an exporter for the Blender renderer
  • some structures like the texture storing have to be changed to enable multiple renderers
First, we want to finish the environment tab and create a tutorial similar to this one to show the advantages of the workbench (editing files isn't necessary anymore, etc.): Tutorial_FreeCAD_POV_ray.
Then maybe we can think more detailed about an integration of more renderers (and I have to talk about that with my partner).

Greetings
The_Raytracers
User avatar
dcapeletti
Posts: 504
Joined: Wed Jul 23, 2014 2:27 pm

Re: New Raytracing Workbench for POV-Ray

Post by dcapeletti »

Hi, since FreeCAD objects support materials and textures through the Arch texture workbench, I would like to know if this workbench allows exporting such texture already configured in the object. See https://www.youtube.com/watch?v=njp61PWWotE

Thanks
Attachments
Material.png
Material.png (239.24 KiB) Viewed 6155 times
The_Raytracers
Posts: 46
Joined: Tue Jul 14, 2020 4:05 pm

Re: New Raytracing Workbench for POV-Ray

Post by The_Raytracers »

dcapeletti wrote: Fri Sep 04, 2020 10:15 pm Hi, since FreeCAD objects support materials and textures through the Arch texture workbench, I would like to know if this workbench allows exporting such texture already configured in the object. See https://www.youtube.com/watch?v=njp61PWWotE
Currently this is not supported, but the HDRI tab is nearly finished and I think, this is an important feature; I will add this soon :)

bavariaSHAPE wrote: Sat Aug 29, 2020 6:44 pm Every action in the "Textures Tab" starts POV-Ray. There is also no preview displayed. Is there a setting to prevent this.

I use the WB without Enviroment. Sometimes the WB with Enviroment freezes or does not pass any data for POV-Ray (*.pov is empty).
Unfortunately FreeCAD doesn't work in my VM :/
But POV-Ray works and I think, now I know where the error is with the preview. The Windows version of POV-Ray doesn't support the option (or I didn't find it) to suppress the window opening. What do you think about changing the texture choice from only the name to a prerendered (not rendered live) image of the texture?
I think, there occours a python error if the pov file is empty. Could you send the error message, so we can see, where the error is?

Thanks a lot to all for your testing and feedback!
User avatar
bavariaSHAPE
Posts: 406
Joined: Tue Jun 10, 2014 8:31 am
Contact:

Re: New Raytracing Workbench for POV-Ray

Post by bavariaSHAPE »

The_Raytracers wrote: Sun Sep 06, 2020 3:22 pm
...
bavariaSHAPE wrote: Sat Aug 29, 2020 6:44 pm Every action in the "Textures Tab" starts POV-Ray. There is also no preview displayed. Is there a setting to prevent this.

I use the WB without Enviroment. Sometimes the WB with Enviroment freezes or does not pass any data for POV-Ray (*.pov is empty).
Unfortunately FreeCAD doesn't work in my VM :/
But POV-Ray works and I think, now I know where the error is with the preview. The Windows version of POV-Ray doesn't support the option (or I didn't find it) to suppress the window opening. What do you think about changing the texture choice from only the name to a prerendered (not rendered live) image of the texture?
I think, there occours a python error if the pov file is empty. Could you send the error message, so we can see, where the error is?

Thanks a lot to all for your testing and feedback!
The order after pressing the button "Open settings dialog and start export" is always numbered as shown in the screenshot. Rendering without and with texture worked only once. I try to find a pattern of the problem.

Povray-Start.jpg
Povray-Start.jpg (74.07 KiB) Viewed 5947 times
… for a happy FreeCAD-World … JM2C …
User avatar
dcapeletti
Posts: 504
Joined: Wed Jul 23, 2014 2:27 pm

Re: New Raytracing Workbench for POV-Ray

Post by dcapeletti »

Currently this is not supported, but the HDRI tab is nearly finished and I think, this is an important feature; I will add this soon :)
Please let us know when you publish it.
On the other hand it would be interesting if in the future you support the material and multi-material properties of FreeCAD since this would facilitate a single configuration without having to do it twice. Greetings
The_Raytracers
Posts: 46
Joined: Tue Jul 14, 2020 4:05 pm

Re: New Raytracing Workbench for POV-Ray

Post by The_Raytracers »

bavariaSHAPE wrote: Mon Sep 07, 2020 1:40 pm ...
With the numbers you mean the order of opening right?
I not really understand the warning window with /EDIT and /RENDER because by default, they aren't passed to POV-Ray. Can you send your POV-Ray-Workbench-Settings, maybe there is the problem.
User avatar
bavariaSHAPE
Posts: 406
Joined: Tue Jun 10, 2014 8:31 am
Contact:

Re: New Raytracing Workbench for POV-Ray

Post by bavariaSHAPE »

The_Raytracers wrote: Thu Sep 24, 2020 5:36 pm
bavariaSHAPE wrote: Mon Sep 07, 2020 1:40 pm ...
With the numbers you mean the order of opening right?
I not really understand the warning window with /EDIT and /RENDER because by default, they aren't passed to POV-Ray. Can you send your POV-Ray-Workbench-Settings, maybe there is the problem.
Is that what you mean? Yes, thats the number of the order of opening.

pov-ray-wb-settings.jpg
pov-ray-wb-settings.jpg (19.57 KiB) Viewed 5657 times

In the meantime I have a newer version of FreeCAD 0.19 and it is a bit more stable. The message "/EDIT and /RENDER" no longer appears.

The rendering process is as follows:

1) I start the "Open Settings Dialog..." window. POV-Ray is started at the same time.

2) I close POV-Ray and make my settings in the "Open Settings Dialog..." window. Every time I click on a parameter POV-Ray opens, because I close it again.

3) When I close POV-Ray the preview is updated in the "Open Settings Dialog..." window.

4) With "Start Rendering" the image is rendered with the settings made before.

5) If I start the process often, a second "Open Settings Dialog..." window including POV-Ray appears. When I close POV-Ray, the second "Open Settings Dialog..." window disappears as well. But in the first window I can change my settings. If I have changed the view before (zoom, pan) this phenomenon does not happen.

If I maintain the described procedure, I will achieve my desired results. The POV-Ray WB basically simplifies the process to get a rendered image. Also the assignment of materials to the surfaces of several components is fast and simple.

When I deactivate the option "Export FreeCAD Background" it turns black. Is there a way (except in the POV-Ray file) to generate for example a white background?

I would be happy to hear new features from you.
… for a happy FreeCAD-World … JM2C …
User avatar
Petert
Posts: 124
Joined: Tue Dec 01, 2015 9:27 pm

Re: New Raytracing Workbench for POV-Ray

Post by Petert »

I like it very much. Much better then the render addon.
Use it for quick renders while I am designing. I use CadRays for the final result.

https://old.opencascade.com/content/cadrays
I am a refugee from Fusion 360. Switched over to FreeCAD and am spreading the word. After years of very little progress I switched again to another solution. I wish you all the best!
The_Raytracers
Posts: 46
Joined: Tue Jul 14, 2020 4:05 pm

Re: New Raytracing Workbench for POV-Ray

Post by The_Raytracers »

Petert wrote: Sat Sep 26, 2020 9:00 pm I like it very much. Much better then the render addon.
Use it for quick renders while I am designing. I use CadRays for the final result.

https://old.opencascade.com/content/cadrays
Thanks for your positive feedback :)
bavariaSHAPE wrote: Fri Sep 25, 2020 9:40 am ...
In the meantime I have a newer version of FreeCAD 0.19 and it is a bit more stable. The message "/EDIT and /RENDER" no longer appears.

The rendering process is as follows:

1) I start the "Open Settings Dialog..." window. POV-Ray is started at the same time.

2) I close POV-Ray and make my settings in the "Open Settings Dialog..." window. Every time I click on a parameter POV-Ray opens, because I close it again.

3) When I close POV-Ray the preview is updated in the "Open Settings Dialog..." window.

4) With "Start Rendering" the image is rendered with the settings made before.

5) If I start the process often, a second "Open Settings Dialog..." window including POV-Ray appears. When I close POV-Ray, the second "Open Settings Dialog..." window disappears as well. But in the first window I can change my settings. If I have changed the view before (zoom, pan) this phenomenon does not happen.

If I maintain the described procedure, I will achieve my desired results. The POV-Ray WB basically simplifies the process to get a rendered image. Also the assignment of materials to the surfaces of several components is fast and simple.

When I deactivate the option "Export FreeCAD Background" it turns black. Is there a way (except in the POV-Ray file) to generate for example a white background?

I would be happy to hear new features from you.
Ah, good that it works better with a newer version. Your settings are right by the way. I think the problem is, that you opened multiple dialog windows, so I blocked that. The new code is on the repo. In addition, I merged the Environment Tab (still beta). Now you can change the background settings there. You can change the background by using a HDR environment or by changing the colors of the FreeCAD background in the settings. You're right, that this is not optimal :/ For more advanced settings you have to use the *_user.inc file.
If you want to create a transparent background, you have to disable the export of the background/environment in the Environment tab and add the

Code: Select all

+UA
option in the workbench settings (after +A +P).

Probably, the preview is annyoing for you, you can disable it by checking the "Disable Live Preview" checkbox, then POV-Ray shouldn't open anymore if you change something. I attached a screenshot. You have to do this also in the Environment tab if you change things there.

Greetings
The_Raytracers
Attachments
disableLivePreview.png
disableLivePreview.png (91.12 KiB) Viewed 5337 times
Post Reply