Corona Renderer Forum

General Category => I need help => Topic started by: mraw on 2016-01-24, 17:03:29

Title: Light material in Ray-Switch
Post by: mraw on 2016-01-24, 17:03:29
I have a Light Material plugged in the GI-slot. A black material is in the direct visible-slot.
However the LightMaterial is directly visible. Only when I uncheck 'Emit Light' the black material is visible.
Is this a bug or is my understanding of the rayswitch limited?
thanks.
Title: Re: Light material in Ray-Switch
Post by: romullus on 2016-01-24, 19:08:10
There's been similar report recently: https://corona-renderer.com/forum/index.php/topic,10853.0.html
Lets wait for devs answer. I'll move topic to bug reporting board, if there will be no response.
Title: Re: Light material in Ray-Switch
Post by: mraw on 2016-01-25, 10:40:35
Ok. Many thanks, Romullus.
Title: Re: Light material in Ray-Switch
Post by: Juraj on 2016-01-25, 12:49:15
This is nothing recent, it worked like that when I used it year ago.

I absolutely do not get the idea behind Rayswitch, works polar to how it's implemented in Vray. Instead of using override for what I need I have to separate it into all slots.

The Lightmaterial use inside was so painful I never used it again.
Title: Re: Light material in Ray-Switch
Post by: mraw on 2016-01-25, 13:47:40
It is working with a standard material with self illumination turned on. But this gives me pretty noisy renders.
So I went for the Light Material in the GI-Slot.
When I uncheck the 'Emit Light' checkbox: What I get is equivalent to SelfIllumination?

Title: Re: Light material in Ray-Switch
Post by: maru on 2016-01-25, 17:47:56
I will try to get back with some explanations tomorrow, but now I can only post this for info about differences between self illumination and light mtl:
https://coronarenderer.freshdesk.com/support/solutions/articles/5000515603
Title: Re: Light material in Ray-Switch
Post by: mraw on 2016-01-25, 17:57:46
Thanks. I know this link and the selfIllum. is by far not the brightest or main light in the scene.
But I bumped the value up, just to see a little bit of spill light in the nearer environment.
Title: Re: Light material in Ray-Switch
Post by: mraw on 2016-01-27, 09:56:41
Sorry for bumping this thread up. But I really have to know if this behaviour of Light material in GI-slot is faulty.
And if yes: How can it be fixed? Is there a workaround?
Title: Re: Light material in Ray-Switch
Post by: maru on 2016-01-27, 11:47:09
Just to make sure I understand everything - the idea is to make a light using light mtl that will glow (illuminate scene), but will appear as, for example, black sphere?

I didn't find a good way to do it. It looks like what we see directly is actually the GI component of the light material.

A silly workaround is to disable light's "visible directly" option (in reflections/refractions too if needed), duplicated it, assign black material to the duplicate, and exclude the duplicate from light's influence.
Title: Re: Light material in Ray-Switch
Post by: mraw on 2016-01-27, 16:30:31
An interesting approach, thanks. But to be honest I can't reproduce it. Silly me.
Let me describe your suggestion with my own words.
- you disable 'visible directly' in the properties of the light material.
- clone the object and assign black shader
- exclude the clone from the light.

correct? thanks
Title: Re: Light material in Ray-Switch
Post by: maru on 2016-01-27, 17:03:12
Yes, that it exactly what I did. Does it produce a different result for you?
Title: Re: Light material in Ray-Switch
Post by: mraw on 2016-01-27, 17:52:48
Yes, because the cloned teapot occupies exactly the same space?
it seems to confuse Max what's behind and what to show/render.

Title: Re: Light material in Ray-Switch
Post by: maru on 2016-01-27, 18:03:40
I don't get it. Your glowing teapot is still visible despite the fact that you unchecked "visible directly". Are you sure that you have right materials applied?
Title: Re: Light material in Ray-Switch
Post by: romullus on 2016-01-28, 10:54:40
That's hardly a workaround if it's requires to fiddle with geometry. And it's very impractical. maru, can you tell us if such Rayswitch behaviour is by design, some limitation or simply a bug?
Title: Re: Light material in Ray-Switch
Post by: mraw on 2016-01-28, 11:37:00
I don't think this workaround is something I want to do in production. But it is a good approach finding out
what's going on.
I'm still not able to reproduce it- maybe some misconception on my side?
Without trying to reproduce the 'exclude-copy'-thing:
capture1. Shouldn't there be a black teapot in the viewport?
capture2. You could see 'vis.dir.' checkbox disabled.  The preview render of the material works, but
not in the viewport and not in the render.
Title: Re: Light material in Ray-Switch
Post by: maru on 2016-01-28, 12:21:03
Here is the scene + example. I made two "black" materials. One will occlude the light, and the other one uses rayswitch to let it glow.
I know that this is not a real solution, but it's the only one I could think of...
Title: Re: Light material in Ray-Switch
Post by: mraw on 2016-01-28, 12:43:00
thanks a lot. Yes, that's working fine.
Can we conclude that GI-slot in combination with light-material behaves oddly?
I would love to hear what Ondra might have to say about this.
Title: Re: Light material in Ray-Switch
Post by: maru on 2016-01-28, 13:03:49
Behavior of rayswitch+light seems counter-intuitive, but let's wait for Ondrej's explanation. I already notified him.
Title: Re: Light material in Ray-Switch
Post by: Ondra on 2016-02-03, 19:03:01
this is limitation of the fake system, light emitters cannot be ray-switched. When you disable emission, you turn the light into self-illumination, which is computed differently and can be ray-switched