Joined: Apr 21, 2019
Post Count: 29
Status:
Offline
Re: YafaRay rendering plug-in
I tried it with my own file, not with the demo file. I now tried an aother position, which works fine. Than I go again back to my kitchen - other view than before - and SH3D crashes without any message. It just disappears from the desktop.
France
Joined: Nov 7, 2005
Post Count: 9431
Status:
Offline
Re: YafaRay rendering plug-in
Enkonyito, if you moved native methods to another class or package, you'll have to generate new .h and .cpp files and compile source code to update libyafarayjni.dll. Did you succeed to generate such a DLL?
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D creator
Joined: May 28, 2015
Post Count: 607
Status:
Offline
Re: YafaRay rendering plug-in
Enkonyito, if you moved native methods to another class or package, you'll have to generate new .h and .cpp files and compile source code to update libyafarayjni.dll. Did you succeed to generate such a DLL?
I had failed to generate the DLLs in a custom package (betaTestPlugin) when trying to follow this method:
// To generate JNI DLL for Windows, read "YafaRay Windows 10 MinGW 64bit building - Standalone.txt" in Core-3.3.0\building (no need to install Python and stop after installing LIBRARY DEPENDENCIES) // Run C:\mingw64\mingw64-shell.exe and use the following command (/C/Program Files/Java/jdk1.8.0_121 contains JDK) // plugin project folder> g++.exe -D_GLIBCXX_USE_CXX11_ABI=0 -I"/C:\Program Files\Java\jdk1.8.0_201\include" -I"/C/Program Files/Java/jdk1.8.0_201/include/win32" -Isrc/betaTestPlugin/include/yafaray -Isrc/betaTestPlugin/include/other -I/C/msys64/mingw64/include src/betaTestPlugin/YafarayRenderer.cpp -shared -o src/betaTestPlugin/lib/windows/x64/libyafarayjni.dll -Lsrc/betaTestPlugin/lib/windows/x64 -llibyafaray_v3_core
Joined: May 28, 2015
Post Count: 607
Status:
Offline
Re: YafaRay rendering plug-in
Some suggestions for the next version (1.0 Beta 4): - use a YafarayRenderer.properties file to modify rendering parameters such as for SunflowRender.properties - include an example xml scene using arealights or visible spherelights because their implementation is problematic - make tile borders visible to see the number of rendering threads
France
Joined: Nov 7, 2005
Post Count: 9431
Status:
Offline
Re: YafaRay rendering plug-in
Hi,
For various reasons, I wanted to be able to recompile YafaRay DLLs. I succeeded to achieve this task without big problems under Windows and Linux thanks to the instructions given in YafaRay source code, but I had much more difficulties to make it work under macOS! Finally, I was able to generate new DLLs based on a slightly modified version of the current source code (to fix an issue on normals management) and I'm happy to propose a version 1.0 Beta 4. This new version is much smaller (13 MB instead of 46 MB) and should work under more systems.
enkonyito, before I investigate your problem, could you try again with this new version fist?
Happy New Year 2020 to everyone
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D creator
These portions of code are implemented in the exportLightSource method of the YafarayRenderer class.
----------------------------------------
EnkoNyito
France
Joined: Nov 7, 2005
Post Count: 9431
Status:
Offline
Re: YafaRay rendering plug-in
Thank you all for your feedback
Tonight, the version 1.0 Beta 5 of the plug-in now shows borders around rendered tiles and brings a bug fix that could give weird results with lines (UbuntuBirdy, I hope it will resolve your issue). I also removed double faces to avoid bad results shown on the chairs in Cecilia's test file.
Enkonyito, I made some tests about area and mesh lights, and you can use some working code found in the comments of YafarayRenderer constructor. In the source code you posted, corner, point1 and point2 must be arrays of 3 floats not Point3f instances (by the way, from parameter isn't used). You should also take care of the orientation of the triangle built from corner, point1 and point2 (if ever it's wrongly oriented, just swap corner and point1).
About mesh lights, you have to provide the integer id of the mesh used as a light in a parameter named object. This id is returned by startTriMesh method so you'll have to store the ids of the meshes used as lights somewhere. Good luck!
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D creator