Open ysard opened 4 days ago
Hello,
Thank you very much for your report! The LD_LIBRARY_PATH trick is mentioned in the FAQ in the README. However, your wrapper suggestion is more complete, so I've updated the README: https://github.com/FreeCAD/FreeCAD-render?tab=readme-ov-file#faq This is my own wording, but it could undoubtedly be improved: please feel free to propose PR - it's just markdown!
For the crash, I must think a bit...
(continued) I've removed a piece of code (status display) that I'm not sure about. However, I don't have an AppImage installed: could you please test it yourself? Thank you!
Edit: the code is fixed in the master, you just have to update the workbench with the addon manager.
Oh, I'm so sorry, I was so focused on the installation tutorial that I didn't think to go back to the readme...
Ok fantastic, the addon launches correctly in both FreeCad and its fork.
After that I had the following error in the console (when rendering the project with luxcore):
22:51:39 GLFW Error: 65544
22:51:39 Description: Linux: Failed to initialize inotify: Too many open files
Fixed according to this post: https://stackoverflow.com/questions/32281277/too-many-open-files-failed-to-initialize-inotify-the-user-limit-on-the-total
# 128 to 256:
echo 256 | sudo tee /proc/sys/fs/inotify/max_user_instances
Now it's my CUDA installation that's incorrect, but that's no longer a matter for your addon :p
Thanks!
Oh, I'm so sorry, I was so focused on the installation tutorial that I didn't think to go back to the readme...
Don't apologize, it means that it lacks a mention of it in the install tuto: would you mind adding that mention where you consider it should appear (with a PR)?
I've added 2 links to the relevant sections.
I also have a few other remarks from use, I can open other issues but for the moment I'm centralizing them here.
Settings:
[x] Rendering width/height options are not systematically updated in the Project.cfg file. For example, if I specify 1920 and 1080, I get in this file:
film.width = 800
film.height = 600
Sometimes the right values are inserted, but I haven't found a reproducible way. I assume you are better able to correct this problem.
Camera:
[x] The camera position in the GUI doesn't seem to be updated when changing the attributes FarDistance/NearDistance attributes.
The attributes are also not updated when you use FreeCAD's “Right-click / Transform” function to move the camera object.
[x] Also, once a camera has been placed, the GUI view (angle, zoom, etc.) continues to influence the final scene. the final scene, whereas I thought the Camera was a fixed point in space independent of the GUI.
[x] The link in the Camera doc is dead:
https://developer.openinventor.com/UserGuides/Oiv9/Inventor_Mentor/Cameras_and_Lights/Cameras.html
Luxcore (again):
[x] Compilation time; Kernels are apparently compiled in 2 stages (Base + Film modules), the first takes ~3min, the second takes ~55min in my case.
My graphics card is old (670MX) but it's worth noting that it's “normal” that on older configurations an hour-long compilation is possible at first launch.
[ ] Rendering options; According to the doc:
If you use LuxCore with OpenCL Render Engines, ie PATHOCL, RTPATHOCL or TILEPATHOCL, LuxCore will have to compile the associated GPU kernels.
In fact, if the GPU is detected as CUDA-compatible, there are 3 devices used for rendering: OpenCL GPU, OpenCL CPU, CUDA GPU (in that order, this is important for later).
Compilation will take place for CUDA cores even if PATHCPU
is active.
However, if the CUDA installation is not functional (GPU driver not synchronized with the expected Cuda Toolkit version), then the process will fail with the following error:
nvrtc: error: invalid value for --gpu-architecture (-arch)`
On my system, NVIDIA support ended in 2020. I have almost no chance of getting my CUDA cores to work on my recent distribution (thanks).
So I have to select the devices involved in the calculation by adding configuration lines to the Project.cfg file using the wrapper we've talked above:
cat >> "$2" << EOL
# default
opencl.gpu.use = 1
# default
opencl.cpu.use = 1
# disable CUDA cores (GPU_OCL, CPU_OCL, GPU_CUDA)
opencl.devices.select = 110
# disable Nvidia OptiX denoiser
cuda.optix.devices.select = 000
film.opencl.enable = 1
# Use the first device (GPU_OCL)
film.opencl.device = 0
EOL
Documentation of this settings: https://wiki.luxcorerender.org/LuxCore_SDL_Reference_Manual_v2.6
Color export of faces
[ ] If you take an object on which faces have been colored (right-click on the Body / Define colors, then select a color and the faces concerned), the colors are not retained in the final export.
Ex:
EDIT: add color problem
Many questions! I'll answer some of them now and the rest later...
The camera position in the GUI doesn't seem to be updated when changing the attributes FarDistance/NearDistance attributes.
The attributes are also not updated when you use FreeCAD's “Right-click / Transform” function to move the camera object.
Why should the camera position be updated? Near and Far Distances are just related to clipping, not to position...
Also, once a camera has been placed, the GUI view (angle, zoom, etc.) continues to influence the final scene. the final scene, whereas I thought the Camera was a fixed point in space independent of the GUI.
Did you add a View of your camera to your rendering project? Otherwise, the camera won't have any effect on your rendering...
So I have to select the devices involved in the calculation by adding configuration lines to the Project.cfg file using the wrapper we've talked above:
Very smart, I think your approach deserves to be shared, if you want to add something to doc again...
Color export of faces
I'll try to have a look, but color management in FreeCAD is a mess (many different color settings, transparency not standard etc.), so it may not be fully successful.
Hi, thanks for your answers.
For the width/height options, I missed the attributes of the Project object. I thought it was only in the Render settings. Thus an already created object is not updated.
Do you think I should remove those options from settings, and leave only the parameters in the Project object?
Do you think I should remove those options from settings, and leave only the parameters in the Project object?
No I don't think so, modifying properties is the way FreeCAD works. I suppose that It's a beginner problem here.
BTW, I managed to get CUDA working on my platform. LuxCore 2.6 embeds versions 11.x of the libnvrtc libnvrtc-builtins libraries. Their changelog for version 2.4 shows CUDA 10.2 compatibility, but subsequent changelogs have not mentioned the switch to version 11.x, while NVIDIA has removed support for Kepler architectures (Compute Compatibility 3.0) for the versions 11.x. Binaries remain compatible, but the compiler refuses to accept the architecture. This is a compiler flag that has simply been removed, making my machine artificially less “efficient” than it was 4 years ago...
I will write some lines about it.
Hi, I've noticed that rendering engines may require different libraries from those embedded in the AppImage (libatk-bridge-2.0.so.0 for LuxCore, for example). In this case, the LD_LIBRARY_PATH variable must be specified at runtime. A wrapper such as this one works very well, and all you need to do is specify its path instead of that of the luxcoreui binary:
It's a problem that can be very confusing for new users, yet it's easily corrected. I think a note on this should be included in the documentation. It's a subject already covered (but discovered after quite some time) here: #159
Also, RealThunder crashes with a segfault shortly after workbench selection (even without any project opened).
Tested with the “20241003” version
Here's the log (although not very informative?):