Transitioning from VRay to LuxCoreRender

Discussion related to the LuxCore functionality, implementations and API.
happyboy
Posts: 63
Joined: Sat Jun 22, 2019 5:39 am

Transitioning from VRay to LuxCoreRender

Post by happyboy »

Dear all,

I'm a new user here. Currently we're evaluating LuxCoreRender and trying to transition from VRay. I'm a programmer and has already written a few maxscript to help our artists. Recently I've written some python codes to automatically create LuxCore materials in Blender (with the help of BlendLuxCore), and also writing .scn files from scratch. After that, I'm concentrating on spoting the differences between VRay and LuxCoreRender and try to find ways to transition.

There are many differences but the most obvious (and influencial) is lighting, so I'll start by asking about lighting.

Part I. For light objects, we're frequently using the following properties (in maxscript) for artist control/performance optimization, that I haven't found in luxcore (yet):

- light.affect_diffuse
- light.affect_specular
- light.affect_reflections
- light.includeList
- light.excludeList

Note that in VRay we're mostly using single-sided rectangle lights and spotlights with IES profile, so we're only interested in setting those properies in these light types.

There are also two rarely used properties:
- light.noDecay
- light.cast_shadows

But they're only used in special cases and are less important.

Part II. We use VRayMtlWrapper to wrap most materials.
- If the base material is a VRayLightMtl, sometimes we use mat.generateGI = false
- For transparent curtains ("sheer fabric"), we use mat.receiveGIMult = 2.0 for artist control

I wonder whether we can do similar things in luxcore, especially the "generateGI" switch. We'd like to keep only a small number of gi-generating lights to reduce both noise and render time (correct me if I'm wrong), and small lights are just for artist controls.

Part III. Using invisible lights.

Currently we're working on interior scenes only.

Ideally, we should place light sources based on real objects (e.g. make an existing object emissive), but sometimes there aren't enough such objects (sometimes no window) and we can't modify the scene.

Thus, we have to add artificial invisible lights. Currently we're placing single-sided rectangle lights facing down, but there are issues:
- The rectangle light mesh is invisible (camerainvisible=1), but it still casts shadows.
- Sometimes there are difficult to find a big open space to place such lights. It's a lot easier if we have VRay's "excludeList" feature to exclude nearby objects to avoid over-exposure.
- In the worst case (no window, no other light source), the ceiling is illuminated purely by indirect lighting, that makes the ceiling much more noisy than the floor with luxcore, but with VRay we can get very clean ceilings with similar render time.

I wonder there are better ways to do this, maybe with the help of some luxcore's unique features?

PS: If some of the functionalities are not available now, but can be implemented, we'll consider donating.
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: Transitioning from VRay to LuxCoreRender

Post by Dade »

happyboy wrote: Sat Jun 22, 2019 5:52 am Part I.
[...]
Part II.
[...]

I wonder whether we can do similar things in luxcore, especially the "generateGI" switch.
As general rule, none of the settings you have mentioned in your part #1/#2 exist in LuxCore. This is somewhat a "cultural heritage" of the old LuxRender: we try to aim for a physical correct rendering without "fake stuff". LuxCore has changed a bit the situation but the same general concept is still in place: we try to accelerate the general correct solution with GPUs, cache, etc. instead of having several settings to include/exclude/fake the correct solution.

In case, you have not yet used one of the latest v2.2beta: check the PhotonGI indirect cache new feature, it can easily accelerate interior renderings by an order of magnitude.
happyboy wrote: Sat Jun 22, 2019 5:52 am Part III.
[...]
I wonder there are better ways to do this, maybe with the help of some luxcore's unique features?
LuxCore has two material settings: one to make an object invisible to camera and another to make an object invisible to lights. For instance, you can use the first flag place a light mesh in front of the camera without obstructing the view. The second flag can be used, for instance, to hide a light source inside an object or over a roof, etc. The should be what you are looking for.

But again, in general, with LuxCore, you are supposed to model a scene like a real world environment and is than a LuxCore problem to render it.
happyboy wrote: Sat Jun 22, 2019 5:52 am PS: If some of the functionalities are not available now, but can be implemented, we'll consider donating.
We have in place a tool at https://www.bountysource.com/teams/luxcorerender/issues to place "Bounties" on the request of specific new features. Anyway, giving the small number of people currently working on core features, it is probably better to check here if it is worth creating a bounty or not.
I can tell you if something is in the scope of our project, if it is complex or easy to add and if may gain an high or low priority in the very long TODO list we have.
Support LuxCoreRender project with salts and bounties
User avatar
Sharlybg
Donor
Donor
Posts: 3101
Joined: Mon Dec 04, 2017 10:11 pm
Location: Ivory Coast

Re: Transitioning from VRay to LuxCoreRender

Post by Sharlybg »

For my personal experience anything that work in reality will work in Luxcore with great speed with no need to fake.

Even closed space with small window are the easier to work with :
Just use direct cache + indirect PGI and luxcore do the magic for you. ( note that direct cache is under construction and work only with CPU)

But even with single map for Direct light and PGI for indirect light is far enough. You still have OIDN for the remaining noise.

Another thing is to use Clamping wisely. I ve a workflow that work pretty well with light and speed.

Camera = linear 1 auto off
Every light efficacy / 1
Clamping = 5 to 30

Work with such low value tend to make you avoid light/noise issue.
Support LuxCoreRender project with salts and bounties

Portfolio : https://www.behance.net/DRAVIA
User avatar
B.Y.O.B.
Developer
Developer
Posts: 4146
Joined: Mon Dec 04, 2017 10:08 pm
Location: Germany
Contact:

Re: Transitioning from VRay to LuxCoreRender

Post by B.Y.O.B. »

My opinion on this matter is:
I acknowledge that the described shortcuts can be necessary in corner cases (which might happen very often depending on the kind of scenes you render), and I would find it very good if they were available in LuxCore.

However, before implementing such a feature, we have to ask ourselves what kind of problems the shortcut is going to solve, i.e. what is the real problem motivating its usage, and we have to check if we can also solve this problem in another way which might require less explicit user interaction and can happen in a more physically correct way.

For example, when modelling a candle in a glass, you might want to make the glass invisible to the candlelight and use an IES profile for the candlelight. The underlying reason is that otherwise, all light contribution from the candlelight will be caustics, which are harder to render than direct light in most engines.
Suppose we would implement a new rendering algorithm in LuxCore where this kind of light contribution is free of cost, it would be far better (from a user perspective) than using manual hacks.

So, yes, implement hacks, but don't lose sight of the underlying problems and try to aim for the real solution whenever possible.
But since I am not a core developer in this area, it is Dade's decision to make.
User avatar
lacilaci
Donor
Donor
Posts: 1969
Joined: Fri May 04, 2018 5:16 am

Re: Transitioning from VRay to LuxCoreRender

Post by lacilaci »

There are requests for these type of features on github. If there is a smart way to do these things, so be it.

some of these are good performance tricks(glass or curtain not casting shadows) others can provide good in-camera composition options (invisible lights, exclusive linked lights)

Imho, crippling stuff like shadow terminator should take precedence, but since 2.3 should be about shading, it can be pretty important to implement these deep in the core. Make luxcore pathOCL flexible.

It's good to see people from vray wanting to migrate to luxcore, I was personally asked by few users from other renderers about luxcore (octane, corona..)

There seems to be a lot of interest, but also very high demands, since these are often people who would like to take the renderer straight to a complex production. The lack of flexibility in shading (among other problems) is a big issue.

Right now I'm working on a project where I can get by without these, but it would surely be much more easier for me just to disable shadow casting for glass, or make light only affect a specific light...
happyboy
Posts: 63
Joined: Sat Jun 22, 2019 5:39 am

Re: Transitioning from VRay to LuxCoreRender

Post by happyboy »

Thank you all! I didn't expect to receive so many helpful replies!

@Dade
Thanks for your info! I'm not surprised by the "general rule" and actually I'm prepared to "try to be more physically applausible" as part of the transition. One more question: what about "artificial helpers" which do not fake things, but rather to help LuxCore to do better. One example I have in mind is "Portal", but from other threads in the forum (I don't understand much of it so I could be wrong) it's not needed anymore because LuxCore can automatically calculate some kind of visibility map. Anyway, there should be other things that can help LuxCore without faking things. Are they in the scope of LuxCore?

BTW: I'm using 2.2beta-2, but I'm not sure if PGI is working as intended. It seems to be on automatically, and I didn't touch it in Blender. I'll learn more of it by reading related posts in this forum.

@Sharlybg
Thanks for sharing your experience! I'm not aware that "direct cache is under construction and work only with CPU". I'm always using OpenCL so this is automatically switched off? I don't quite understand what you mean exactly "with single map for Direct light and PGI for indirect light is far enough". I'm still very new. I'm aware of your tutorials/demos, but I'd like to learn more basic things before following tutorials in action.

Also, I totally forgot the clamping thing. From last year's "Advances in Real-time rendering" SIGGRAPH course (I'm from real-time rendering, BTW), I learnt that clamping is quite useful but haven't used it in action.

Also, is "every light efficacy 1" important? Currently I'm disabling the efficacy/power feature (as instructed by BlendLuxCore) and only used "gain", will it hurt?

@B.Y.O.B.

Thanks for your suggestion. I totally agree with "However, before implementing such a feature, we have to ask ourselves what kind of problems the shortcut is going to solve". It looks like this forum is a perfect place to ask questions. Everytime I found a new issue, I'll try to make a simple test scene and post here. I have some background knowledge of a renderer (PBRT 3rd edition is on my office desk), but I have almost no "real-world" experience. Maybe some of my issues are well-known problems and may even have widely accepted solution/workarounds.

@lacilaci

Happy to hear your words! I don't know what's shadow terminator, and I don't think I understand what you mean by "it can be pretty important to implement these deep in the core", could you elaborate it a bit?

I'm not an advanced VRay user, but I'm open-minded. Several aspects of LuxCore made me very much interested, so I'd like to at least try (hard) to migrate. I know it might not be easy, so I'm ready to learn and adapt.
User avatar
B.Y.O.B.
Developer
Developer
Posts: 4146
Joined: Mon Dec 04, 2017 10:08 pm
Location: Germany
Contact:

Re: Transitioning from VRay to LuxCoreRender

Post by B.Y.O.B. »

happyboy wrote: Sun Jun 23, 2019 9:51 am I'm not aware that "direct cache is under construction and work only with CPU"
I think Sharlybg was talking about the new visibility map cache (automatic portals).
The other caches (DLSC and PhotonGI) all work with OpenCL engines.
happyboy wrote: Sun Jun 23, 2019 9:51 am Also, is "every light efficacy 1" important? Currently I'm disabling the efficacy/power feature (as instructed by BlendLuxCore) and only used "gain", will it hurt?
No, this is just a matter of taste.
Power, efficacy and gain are more or less just three multipliers for the brightness.
happyboy
Posts: 63
Joined: Sat Jun 22, 2019 5:39 am

Re: Transitioning from VRay to LuxCoreRender

Post by happyboy »

Thanks B.Y.O.B.!

Now another question. In VRay it looks like every one is using "Bucket Mode" which sounds like identical to LuxCore's TILEPATH, but it looks like people here prefer non-tiled rendering (i.e. VRay's progressive mode?). For example, in the post "Hybrid Back/Forward path tracing (aka BiDir without MIS)", Dade said "TILEPATH ignores the parameter because tile rendering can not work with light paths, for obvious reasons", so if I use TILEPATH, this feature will be silently disabled?

When using VRay, one of the reasons to use bucket mode is to reduce memory consumption. In its CUDA-based GPU renderer, it's easy to get memory exceeded problem with rendering large pictures like 4000x2000 or even 6000x3000. I think this might be a bug (because with 3dmax's VRay plugin I will not get OOM, but with vray.exe I surely will), but with bucket mode I never run into memory issues.

So my question is: in LuxCore, is it recommended to always use non-tiled (PATHCPU or PATHOCL)? Any situation that we MIGHT need tiled?
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: Transitioning from VRay to LuxCoreRender

Post by Dade »

happyboy wrote: Mon Jun 24, 2019 6:12 am So my question is: in LuxCore, is it recommended to always use non-tiled (PATHCPU or PATHOCL)?
Yes, progressive rendering is mandatory for some feature (Metropolis sampler, Bidirectional path tracing, etc.) and offers better adaptive rendering, etc.
happyboy wrote: Mon Jun 24, 2019 6:12 am Any situation that we MIGHT need tiled?
If, and only if, you run out of memory because of the image resolution to render. It is really the only single case where tile rendering is better than progressive rendering.
Support LuxCoreRender project with salts and bounties
happyboy
Posts: 63
Joined: Sat Jun 22, 2019 5:39 am

Re: Transitioning from VRay to LuxCoreRender

Post by happyboy »

Dade wrote: Mon Jun 24, 2019 7:49 am Yes, progressive rendering is mandatory for some feature (Metropolis sampler, Bidirectional path tracing, etc.) and offers better adaptive rendering, etc.
...
If, and only if, you run out of memory because of the image resolution to render. It is really the only single case where tile rendering is better than progressive rendering.
Thanks! Next question, about materials. I admit that our materials in VRay are rather messy. In many cases we'll using parameters copied from Internet or trial-and-error without knowing exactly each one means. In VRay most of our materials are VRayMtl, but in LuxCore we have separate kinds. So far, we can migrate many of our materials with LuxCore material types matte, metal2, glossy2 and glass and mirror rather succesfully, but currently for two specific materials we haven't found good ways(I tried glossy2 and tuned IOR for reflection strength but it doesn't work intuitively):
- marbles
- glazed tiles
Actually they look quite similar so I think a single material setup might do for both.

My question is: is there a some kind of "material library" in additional to the presets available in BlendLuxCore? Or, if not, anyone can give me some suggestion how to setup good marble/glazed tile material?
Post Reply