Photo-realistic rendering of FreeCAD models with CADRays

Have some feature requests, feedback, cool stuff to share, or want to know where FreeCAD is going? This is the place.
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
User avatar
PrzemoF
Posts: 3008
Joined: Fri Jul 25, 2014 4:52 pm
Contact:

Re: Photo-realistic rendering of FreeCAD models with CADRays

Postby PrzemoF » Fri Aug 02, 2019 3:02 pm

OK, thanks! I couldn't figure out why it doesn't see OCE on my laptop.. (I have 0 windows knowledge compilation)
triplus
Posts: 9464
Joined: Mon Dec 12, 2011 4:45 pm

Re: Photo-realistic rendering of FreeCAD models with CADRays

Postby triplus » Mon Aug 12, 2019 1:21 pm

This indeed is an interesting development. I tried compiling on Linux and after sorting out a few complaints more and more of them emerged. Basically related to CMake not finding things. Therefore i am guessing things will hopefully improve on Linux in the future. If and when they do i guess we can evaluate if default Raytracing workbench should support CADRays in some way. If it makes sense to pack CADRays in binaries for all supported platforms. This would bring us closer to the goal of having a good rendering capabilities in FreeCAD by default. And for them to be available to non tech-savvy people. Currently this task is still reserved for POV-Ray and tech-savvy people using solutions such as Blender. Render workbench, being external, likely isn't as used and explored as it could be if it would be available by default.
User avatar
tanderson69
Posts: 1536
Joined: Thu Feb 18, 2010 1:07 am

Re: Photo-realistic rendering of FreeCAD models with CADRays

Postby tanderson69 » Tue Sep 03, 2019 10:29 pm

I have it compiled and running on debian. I find the GUI a little confusing. :D
cadrays01.png
cadrays01.png (250.03 KiB) Viewed 688 times
triplus
Posts: 9464
Joined: Mon Dec 12, 2011 4:45 pm

Re: Photo-realistic rendering of FreeCAD models with CADRays

Postby triplus » Tue Sep 03, 2019 10:31 pm

Likely GPU drivers related?
jmaustpc
Posts: 9701
Joined: Tue Jul 26, 2011 6:28 am
Location: Australia

Re: Photo-realistic rendering of FreeCAD models with CADRays

Postby jmaustpc » Wed Sep 04, 2019 8:51 am

tanderson69 wrote:
Tue Sep 03, 2019 10:29 pm
I have it compiled and running on debian. I find the GUI a little confusing. :D
Hi Thomas, how did you do it? If you can tell me how, I'll have a go on Kubuntu 18.04 64bit later tonight....yeah its evening here now. Do you have to compile occ as well?
Jim
User avatar
tanderson69
Posts: 1536
Joined: Thu Feb 18, 2010 1:07 am

Re: Photo-realistic rendering of FreeCAD models with CADRays

Postby tanderson69 » Wed Sep 04, 2019 11:59 am

jmaustpc wrote:
Wed Sep 04, 2019 8:51 am
Hi Thomas, how did you do it? If you can tell me how, I'll have a go on Kubuntu 18.04 64bit later tonight....yeah its evening here now. Do you have to compile occ as well?
Jim
I did it by swearing and hacking away on the cmake files. Yes I did compile and install occ as well. Here is a link to a repo with my changes. Use the 'tabuild' branch.
https://gitlab.com/blobfish/cadrays
jjooo
Posts: 1
Joined: Thu Sep 05, 2019 3:37 am

Re: Photo-realistic rendering of FreeCAD models with CADRays

Postby jjooo » Thu Sep 05, 2019 3:49 am

Hi all,
one question:
Did anyone find out how to save the picture without this ugly brownish background? Just a transparent PNG?

Thanks a lot in advance!
User avatar
Aleks
Posts: 67
Joined: Sun Mar 08, 2020 5:27 pm
Location: Sankt Augustin, Germany
Contact:

Re: Photo-realistic rendering of FreeCAD models with CADRays

Postby Aleks » Tue May 12, 2020 3:40 pm

Does somebody know how to increase the resolution of shapes in CADRays? My renders have sharp edges. The geometry was created in FreeCAD. I am able to smoothen those lines in FreeCAD by chaning the "Deviation" parameter in the view-tab but I do not know how to do this in CADRays.
Attachments
cadrays-test-60min.png
Render sample with hard edges.
cadrays-test-60min.png (292.33 KiB) Viewed 112 times
Last edited by Aleks on Tue May 12, 2020 4:00 pm, edited 1 time in total.
RatonLaveur
Posts: 739
Joined: Wed Mar 27, 2019 10:45 am

Re: Photo-realistic rendering of FreeCAD models with CADRays

Postby RatonLaveur » Tue May 12, 2020 3:57 pm

It is possible that the transfer from FC to CADRays performs a meshing of its own with its own set of parameters, this is similar to code used in 3D surface milling in the Path WB. In that case the shape parameters used for FC are "useless".

One way to test that is to export your FC model as .stl with different levels of accuracy and check if CADRays reflects (hahaha) that.
User avatar
Aleks
Posts: 67
Joined: Sun Mar 08, 2020 5:27 pm
Location: Sankt Augustin, Germany
Contact:

Re: Photo-realistic rendering of FreeCAD models with CADRays

Postby Aleks » Tue May 12, 2020 4:28 pm

RatonLaveur wrote:
Tue May 12, 2020 3:57 pm
It is possible that the transfer from FC to CADRays performs a meshing of its own with its own set of parameters, this is similar to code used in 3D surface milling in the Path WB. In that case the shape parameters used for FC are "useless".

One way to test that is to export your FC model as .stl with different levels of accuracy and check if CADRays reflects (hahaha) that.
Using stl does not work here. Even when setting the deviation to 0,01 mm you can clearly see triangles.