Chaos Corona Forum

Chaos Corona for 3ds Max => [Max] Bug Reporting => [Max] Resolved Bugs => Topic started by: hrisek on 2015-03-20, 12:20:48

Title: Object invisible in reflections
Post by: hrisek on 2015-03-20, 12:20:48
Bug in Corona 1.0 (not new bug fiex version). Path Tracing + HDCache is used. I wan to make my 3D Trees invisible for Camera but visible for reflections (trees should not cast shadows).
When i turn off "Receive Shadows", "Cast Shadows" and next i turn off "Visible in Camera" (object properteis) than my trees are invisible in reflections...when i turn on "Receive Shadows" and "Cast Shadows" than trees are visible in reflections...
What i'm doing wrong (or corona) ?
Title: Re: Object invisible in reflections
Post by: romullus on 2015-03-20, 12:47:07
No need to use object properties for that. Turn everything back on, create CoronaRayswitch material, plug your tree material to rayswitch's Reflect override slot and assign that new material to your trees. That's it.
Title: Re: Object invisible in reflections
Post by: hrisek on 2015-03-20, 12:55:27
but i have 5 leaves materials, 2 barks materials and 3 materials for branches...I have to create 10 new materials (rayswitch) ?
Title: Re: Object invisible in reflections
Post by: hrisek on 2015-03-20, 12:58:17
And now i see that Your solution is not working for me...how can i make my tree INVISIBLE for camera, without shadows and visible for reflections with your trick (rayswitch)? Rayswitch can only which material is for reflective, refraction , GI and for camera...there is no option to "turn off" materials for shadows or "turn off" materials for camera...
Title: Re: Object invisible in reflections
Post by: maru on 2015-03-20, 12:58:55
If you are using multi/sub object material, then no. We are talking about rayswitch material, not rayswitch map.
Maybe this will be helpful:
https://coronarenderer.freshdesk.com/support/solutions/articles/5000529341
Title: Re: Object invisible in reflections
Post by: maru on 2015-03-20, 13:02:36
Is this what you want to achieve?
Title: Re: Object invisible in reflections
Post by: hrisek on 2015-03-20, 13:05:26
Yes - this is what i want to make. Visible only in reflections without shadows....but sorry guys - i have 10 materials per tree and i have 6 species of trees....i have to change  60 materials???? it is joke? Why it's impossible to make it so easy like in Vray -  select all trees, turn off shadows casting, turn off visible for camera and voila...
Title: Re: Object invisible in reflections
Post by: maru on 2015-03-20, 13:16:02
Hmmm... I don't know how your scene is made but here is the first thing I can think of:
-for each of the tree models, attach all parts of it to make it a single model
-pick material from it, it should be multi/sub material automatically
-then use the multi/sub material with rayswitch

If you have 6 species of trees, this would require only 6 materials.
Title: Re: Object invisible in reflections
Post by: Frood on 2015-03-20, 13:17:02
No need to use object properties for that. [...]

"No need" is much more less effort than using rayswitch and is part of many workflows, including mine. A simple test with a mirrorball an a box (not even having a material) shows that when objects "Cast Shadows" setting is off the result is not what is to expect. The box looks somewhat transparent but the reflection does not completely disappear. I´m glad someone found this before I ran into that trap. This has to be fixed. Rayswitch is to be considered a a workaround here, not a solution imho.

Good luck!







 
Title: Re: Object invisible in reflections
Post by: maru on 2015-03-20, 13:24:36
I know this is not a good excuse but as far as I know these settings are considered "fake" by Corona. And Corona doesn't like fakes. I am sure Ondra will take a look at this problem, though.
Title: Re: Object invisible in reflections
Post by: Frood on 2015-03-20, 13:32:52
maru, I agree to the term "fake" but I don´t agree to break with absolutely basic max functionality. If this is considered NOT to work, object and layer rendering controls should be ignored COMPLETELY at the outset. And this should be clearly stated then. No one should be interested to turn Corona into a half-implemented renderer where features are not fully usable.


Title: Re: Object invisible in reflections
Post by: PROH on 2015-03-20, 14:38:43
Hi. AFAIK the "invisible to camera" does work as inspected. But for shadows, reflections and reflections you need to use the Corona Rayswitch. Please correct me if I'm wrong.

I've searched the help files several times for some accurate explanation on which properties are supported and which not, without any luck. Would be nice to have a reliable help file about this.

Just for clearing up: Corona isn't the only renderer having problems with these properties. Iray as well - just for one - doesn't support all settings.

Would be nice to have a more efficient method to do these things than the Rayswitch anyway.
Title: Re: Object invisible in reflections
Post by: Ondra on 2015-03-23, 16:23:19
This thread is too big of a mess, I am closing it down. If someone still has an unsolved problem, please try to describe it better in a new bug report (and with pictures ;)).

Frood: that looks like the expected behavior. Why should "cast shadows" disable entirely reflection? There is another checkbox for that. Casts shadows does exactly what it says - it disables shadows for the green box, so the environment is also visible on top of the object
Title: Re: Object invisible in reflections
Post by: Frood on 2015-03-23, 17:23:48
Ondra, I never stated that it should. That (quoting myself sucks) "but the reflection does not completely disappear" in my post referred to the original post claiming a DIFFERENCE to what hrisek encountered. Also I wanted to point out that for this littlte test, only the shadow setting was used and all other object settings worked as expected and were not touched for this. Sorry if anybody misunderstood that.

[...] it disables shadows for the green box, so the environment is also visible on top of the object

Somebody pinch me please, I seem to have missed something? Why should there be environment visible through the box? Attached the same situation as mr rendering, that is what I would expect: The green box (object settings: Cast Shadows off) looks the same but it simply does not cast shadows. And the same as Corona rendering again, just to have the same angle/scene. Additionally the Corona scene again with some geometry around it. So this is expected behaviour?

Frood
*scratchinghishead*








Title: Re: Object invisible in reflections
Post by: Ondra on 2015-03-23, 17:47:11
Yes, that is the expected behavior. Corona cannot behave the same as mental ray, as it uses 20 year old concepts, not 30 years old (multiple importance sampling). Also there are other situations where people protested the results they got - see attached - that is how it would look if "cast shadows" would mean something different.
Title: Re: Object invisible in reflections
Post by: Ludvik Koutny on 2015-03-23, 19:36:52
As it was mentioned above, use Rayswitcher. It will work in this case, but will disable also color bleeding from the object. That's OK unless the object has some self illumination scene is dependent on.

With Corona being a PBR renderer, you shouldn't rely on a workflow that regularly takes advantage of disabling shadow casting. These situation can be in 99.9% of cases handled a lot more efficiently.
Title: Re: Object invisible in reflections
Post by: Frood on 2015-03-24, 09:39:48
I´m of course aware of rayswitch and it´s advantages but still this result (https://forum.corona-renderer.com/index.php?action=dlattach;topic=7533.0;attach=29697;image) may not at all what users expect. It would be at least worth to be mentioned at

https://coronarenderer.freshdesk.com/support/solutions/articles/5000516180-known-bugs-and-limitations

with a link to

https://coronarenderer.freshdesk.com/support/solutions/articles/5000516723-how-to-disable-shadow-casting-of-an-object-


Thank you for clarification!

Edit: Just an idea, maybe it´s some day possible that corona plugs such objects internally into a kind of rayswitch, without user interaction and "hidden" at render time as all object/layer render options are already available in rayswitch.
Title: Re: Object invisible in reflections
Post by: Ondra on 2015-03-24, 11:25:09
to iterate: it is not a bug. You cannot thing with the 90' mindset that "shadows can be only casted to diffuse surfaces"

BTW: You can already write a maxscript material that would hive rayswitch inside AFAIK ;)