Author Topic: Cast shadow from invisible object BUG!  (Read 518 times)

2024-02-09, 13:42:49

kingmax

  • Active Users
  • **
  • Posts: 22
    • View Profile
Don't know if it's a bug or it's intentional, but having an object cast shadows in the scene by unticking "visible to camera" doesn't work if the same object has "visible to reflection/refraction" unticked as well. It doesn't make any sense, and it's been working fine until Corona 11!
I have a project I've been working on by the end of 2023, and now I need to rerender 20 images, and the whole setup is broken since it consist of multiple trees that were supposed to cast shadows in the room without being visible to reflections, as there's a backplate behind.

2024-02-09, 14:24:09
Reply #1

Avi

  • Corona Team
  • Active Users
  • ****
  • Posts: 507
    • View Profile
Can you check my recording and let me know if this is what you are trying to do?

I am using Corona 11 HF 1 and 3ds Max 2024.2
Arpit Pandey | chaos-corona.com
3D Support Specialist - Corona | contact us

2024-02-09, 18:14:33
Reply #2

kingmax

  • Active Users
  • **
  • Posts: 22
    • View Profile
Yes, and I can replicate the exact thing you did in the video. Thing is, it works when there're are no materials applied, but with some corona materials (not all) the invisible object doesn't cast any shadows if the reflect/refract object properties is switched off. See attached images. The correct one where the trees are casting shadows has the trees reflect/refract turned on! Otherwise the engine doesn't see the trees at all. It happens in multiple scenes on different max versions as I tried in 2021 and 2023. For the sake of this test I've created a simple box without any material applied to it and the same thing happens. I'm using a HDR to light the scene.


2024-02-12, 10:20:05
Reply #3

Avi

  • Corona Team
  • Active Users
  • ****
  • Posts: 507
    • View Profile
the only condition when a material won't cast any shadow is if you have set its opacity to 0 in the corona physical material.

Please double-check your materials. I still cannot repro the issue with a simple scene containing Corona materials. It would be best if you could share that "certain" material that is causing the problem. If you're unable to share your scene here, please start a ticket with us using this link. Share the scene along with the repro steps so that we can replicate the issue on our end.

https://support.chaos.com/hc/en-us/requests/new

I am not 100% sure how your scene is setup, but you mentioned that you are using a HDR to light your scene then maybe your issue is related to "black highlights" which is mentioned here: https://support.chaos.com/hc/en-us/articles/4528311915025-Known-bugs-and-limitations
Arpit Pandey | chaos-corona.com
3D Support Specialist - Corona | contact us

2024-02-12, 11:33:33
Reply #4

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 12768
  • Marcin
    • View Profile
What you are seeing here is the "black highlights" issue described here https://support.chaos.com/hc/en-us/articles/4528311915025 , but in a reverse situation. What most of our users consider a bug you would like to use to actually see the shadow of the object.

The issue here is that in reality if an object does not reflect any light (visible to reflections disabled), then it cannot cast any shadows, because all of the light is passing through it, nothing can block it. Since Corona is modelled based on physical world, "fakes" such as invisibility but shadow casting can be a problem.

In Corona, whether you see the shadow/reflection as "dark" or "bright" actually depends on the ground material's roughness and camera position. You can check that by positioning your camera to see both the expected shadows and a strong reflection from the environment (such as HDRI sun) and then changing the ground material's roughness value in IR and observing how the shadow/reflection changes.

Unfortunately, there is no easy fix for this. As a workaround, I would suggest using full tree models visible directly and in reflections, or disabling trees' direct visibility only (while leaving visibility in reflections enabled).


it's been working fine until Corona 11!

This statement is wrong. It renders exactly the same in Corona 10 or older and Corona 11. There were no changes in Corona 11 which would affect this behavior.



Marcin Miodek | chaos-corona.com
3D Support Team Lead - Corona | contact us

2024-02-12, 12:01:34
Reply #5

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 12768
  • Marcin
    • View Profile
It seems that Arnold is producing similar results as Corona. I tried multiple options:
- object properties switches
- Arnold Properties modifier
- Arnold Ray Switch Shader
In every case, the object is invisible to the camera and casts shadows, but is also visible in reflections (glossy and sharp).
Marcin Miodek | chaos-corona.com
3D Support Team Lead - Corona | contact us

2024-02-14, 13:14:09
Reply #6

kingmax

  • Active Users
  • **
  • Posts: 22
    • View Profile
Sorry for the late reply, but it's been a really busy week. I understand the issue and was certain it was related to Corona physical world calculation model.
This seems like the black highlights problem, and I am using corona light materials for the backplates that don't emit any light. I'm pretty sure I've tried to render the scene without the backplate as it was the first thing that came to my mind as the source of the issue. Still, I haven't noticed this behavior until now, and I've been using Corona for the past 7 years.

In my particular case it's quite inconvenient to set the trees as visible in reflections since I'm delivering 60+ images of hotel rooms that have mirrors reflecting the outside and the actual real backplate. I would need to create a separate pass for that, and the lighting changes as well. When I'll have some spare time I'll recheck the offending scenes and get back to you. As I was using Vray from the early 2000' it was a common thing to be able to tweak various material/object properties to get the desired result.

So, for example how is one supposed to be using animated vegetation shades applied to a simple plane? https://henrikbc.gumroad.com/l/figment_treeshade_vol_1?layout=profile

2024-02-14, 13:19:29
Reply #7

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 12768
  • Marcin
    • View Profile
Just to clarify: this specific case is not related to backplates at all. It's the same issue, but it's caused by objects with visibility to camera and reflections/refractions disabled (trees).

Unfortunately, right now we don't have any solution to this or a workaround which would allow you to get the effect you are after without any issues such as unexpected shading, sorry. We have these cases reported to our dev team and they are being actively worked on, so we might see some updates in Corona 12, but unfortunately I cannot promise that.

Yes, this should work fine in V-Ray.
Marcin Miodek | chaos-corona.com
3D Support Team Lead - Corona | contact us