1
$\begingroup$

I recently asked a question regarding Lux's ability to output values based off of the angle of a surface relative to the viewer and I thinking, if worse comes to worse, I can just script my own node. Bit of a problem though, I can't find a script node available. Personally, I'm actually quite surprised, Lux's developers seem to be on the ball for most stuff; you would think they would include one so the user isn't particularly limited.

Even if there is no way of directly scripting in Blender for Lux, I'd still be incredibly happy if I can open up my favourite plain text editor, write up a file in that and put it into a specific folder or something and have it work (all of this is assuming there's actually proper documentation to coding for Lux).

$\endgroup$
2
$\begingroup$

LuxCore's shader code is written in C++ and OpenCL. To write new textures or materials, you have to clone the codebase, write your code in C++ (and optionally OpenCL) and compile the binaries with your changes.

Some information on this process:

Unfortunately we don't have detailed in-depth documentation on the development process yet. But you are welcome to ask any question in our forums or discord.

$\endgroup$
  • $\begingroup$ It's a shame that there's not a more direct way of making nodes, without having to recompile the whole thing repeatedly--like a LuxCore specific shader language. Maybe in a future version, it'll happen. $\endgroup$ – thepufferfish Mar 24 at 22:09
  • $\begingroup$ Maybe, but it's a lot of work to create a custom language. It's also difficult to make it run on both CPU and GPU. I find OSL in Cycles not very attractive because it's restricted to CPU. $\endgroup$ – B.Y.O.B. Mar 24 at 22:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.