4
$\begingroup$

I'm fairly new to Lux and I'm wondering if there is an input for its Mix Material similar to Cycles' Fresnel and Layerweight nodes (i.e. the output is specifically dependant on the angle of the surface to the camera and a value like IOR/Blend to modify the sensitivity to a change in angle.)

As an example of what I mean, how would I render a material like this (Cycles generated) in Lux:

example

I already have a Mix material and the Diffuse material (both the red and white are diffuse materials), but I'm still missing the proper input for the Mix factor.

$\endgroup$
  • $\begingroup$ As far as I know. No. Fresnel is built in in shaders in Lux. You have Fresnel node, but these are only presets for Metal material. $\endgroup$ – cgslav Mar 22 at 22:46
  • 1
    $\begingroup$ Are you referring to LuxRender or LuxCoreRender $\endgroup$ – Dr. Farquaad Mar 23 at 13:47
  • $\begingroup$ @Dr.Farquaad LuxCore. So far as I can tell, LuxRender is kind of dead--the .net site is down and most of the developers' support is for LuxCore. $\endgroup$ – thepufferfish Mar 24 at 5:54
  • $\begingroup$ Indeed, very true. But that's a good thing, and luxcore is awesome!!! $\endgroup$ – Dr. Farquaad Mar 25 at 11:07
3
$\begingroup$

Short answer: No.

The problem is that such a texture is only possible in a unidirectional pathtracer, but LuxCore also supports bidirectional pathtracing. I have recently investigated this and implemented the basic math operation behind Cycles' layer weight node in LuxCore, but it leads to wrong results when using the lighttracing or bidirectional engines in LuxCore (you can read more and see pictures here).

It would not be hard to implement for the pathtracing engines, but it would make materials inconsistent when switching between engines. Imagine importing some assets for your scene, rendering with bidir and seeing a lot of artifacts. So I chose not to implement it - others might have different opinions.

$\endgroup$
  • $\begingroup$ This may not be the right place to answer this.. but I'm stumped. I don't understand why a ray propagated from a light-source can't be biased by a function of viewing angle (the angle between an outgoing light-ray and surface normal) in the same way as it is for a ray propagated from the camera... $\endgroup$ – Robin Betts Mar 24 at 22:52
  • $\begingroup$ You can do that, but the result won't look the same as in the case of a camera ray. See the second image in the linked post. It's rendered with LuxCore's light tracer engine which shoots rays from light sources. $\endgroup$ – B.Y.O.B. Mar 24 at 22:59
  • $\begingroup$ I just thought.. in the case of a camera-propagated ray, (from pixel) it would be N dot Incident (incoming) where in the case of a light-propagated ray (to pixel) it would be N dot Spawned (outgoing), not the same for both .. but I'm probably out of my depth.. $\endgroup$ – Robin Betts Mar 25 at 1:44
  • $\begingroup$ Unfortunately, in LuxCore's current texture interface there is no information about the outgoing ray. You could ask Dade in our forums if it would be possible to have this information available, or if there are some fundamental obstacles for it: forums.luxcorerender.org $\endgroup$ – B.Y.O.B. Mar 25 at 12:07
  • $\begingroup$ Thanks. I can understand why that's a sensible economy in a unidirectional pathtracer. I feel I'd have to learn a lot more before raising a valid request.. I will check out the forums to see how far I get. $\endgroup$ – Robin Betts Mar 25 at 12:59

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.