There has been some discussion on Discord about other exporters for LuxCoreRender, so I thought maybe in the future I'll also give it a try. I'm a total beginner in this coding stuff and get chill for just looking at all that text, so I thought maybe this could help me better understand some things.
Mainly what I am interested in is the logic of exporter. My idea, maybe it already works this way, is that my compositing software will send 3d scene and material info(as text os something) to LuxCore, which is running on the background and the Lux sends the rendered image back to compositing software. If it already works in similar fashion I guess I'll go dive into blender's plugin to see the logic behind this. Would my method need some kind of GUI'less/commandline version of LuxCore?
I'm not currently working on this yet, but maybe the upcomig month I'll start looking more into it. All thoughts are welcome
LuxCore plugin logic
Re: LuxCore plugin logic
look at the Freecad exporter that is about the easiest to follow, unfortunately it doesn't seem to do textures (but I maybe missing something) it does color materials which is a start.
The first thing would be getting it exporting to Luxcore rather than Luxrender, then maybe cfg and scn's rather than lxs
This is what I intend to do
The first thing would be getting it exporting to Luxcore rather than Luxrender, then maybe cfg and scn's rather than lxs
This is what I intend to do
Re: LuxCore plugin logic
Do you mean like a daemon process that's always running? That's possible, but not how the current plugins work.Egert_Kanep wrote: ↑Thu Apr 04, 2019 9:03 pm Mainly what I am interested in is the logic of exporter. My idea, maybe it already works this way, is that my compositing software will send 3d scene and material info(as text os something) to LuxCore, which is running on the background and the Lux sends the rendered image back to compositing software.
The Blender addon uses pyluxcore, which is a Python interface for LuxCore.
It works like this:
I create a new LuxCore scene with
Code: Select all
luxcore_scene = pyluxcore.Scene()
Then I can for example convert a mesh:
Code: Select all
faces = mesh.tessfaces[0].as_pointer()
luxcore_scene.DefineBlenderMesh(name, len(mesh.tessfaces), faces ...)
So a lot of it is happening on demand, there's no LuxCore process running all the time.
When the rendering is started, LuxCore creates the required threads from C++, so you don't care about that from the Python side. The rendering runs asynchronically, meaning your Python interpreter continues executing your code while LuxCore renders. Usually you create a loop for this where every x milliseconds you update the statistics, check if the user wants to end the render, check if any halt conditions are met - and of course you can retrieve the rendered output through a Python API function.
Does this description help? If you have further questions, ask away
Re: LuxCore plugin logic
this was a big help for me which B.Y.O.B. linked
viewtopic.php?f=4&t=371&p=4098&hilit=Co ... tput#p4099
viewtopic.php?f=4&t=371&p=4098&hilit=Co ... tput#p4099