Author Topic: material error when the camera is in water and the clipping is on  (Read 600 times)

2024-03-14, 16:28:48

AndrasP

  • Users
  • *
  • Posts: 3
    • View Profile
I have an aquarium in a scene. When I move the camera inside it and turn on the clipping, some textures are acting weird and the lighing changes too. Any solution for this?




2024-03-14, 17:34:41
Reply #1

TomG

  • Administrator
  • Active Users
  • *****
  • Posts: 5468
    • View Profile
You don't mention which version of Corona - if 10 or later though, a camera knows when it is inside a water volume and when not. Is your water a cube? My guess is that the clipping is removing the "end of the water" ie it is clipping away the face of the cube that would represent where the water material should stop and air / glass begin, and so the camera now sees the water as continuing for an infinite distance as if the whole scene was underwater, as the rays cast from the camera never hit a surface that defines the end of the water it is inside.

If that is the case, the only option I can think of is not to use clipping - what are you are aiming to achieve from the clipping btw?
Tom Grimes | chaos-corona.com
Product Manager | contact us

2024-03-14, 17:48:43
Reply #2

AndrasP

  • Users
  • *
  • Posts: 3
    • View Profile
It's the latest Corona version with the latest Max.

Yes, probably that's the issue, but that sounds stupid to be honest. If you place your camera inside a wall and use clipping to render the scene, you can still render it without issues, it will realise that even though you are in the wall, there's clipping on, I mean that's the whole idea of the clipping...
As for what I'm aiming to achive: I can use different lenses because I'm further away from the scene. Obviously it's just an artistic choice and I still managed to render the scene with placing the camera next to the aquarium, but it's still annoying and it's not consistent with the way it works in other situations.

2024-03-14, 17:54:14
Reply #3

TomG

  • Administrator
  • Active Users
  • *****
  • Posts: 5468
    • View Profile
Well, a wall is different as it is not a volumetric object but a solid one, so you clip it to hide it (else you see nothing as you are inside a solid object :) ). But for being inside water, glass, smoke, fire, etc. you don't need to clip them away because you can still see through them by the correct amount depending on the nature of the volume.
Tom Grimes | chaos-corona.com
Product Manager | contact us

2024-03-14, 18:13:18
Reply #4

AndrasP

  • Users
  • *
  • Posts: 3
    • View Profile
so this is from the documentation:

"Camera clipping

Enable – Enables camera clipping - only objects between the minimum and maximum distance are visible when looking through the camera both in the viewport and in rendering."

The water box really acts like an object in Max... Look, I get what you are saying but it still feels wrong and I still think it shouldn't work this way.

2024-03-18, 17:21:33
Reply #5

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 12768
  • Marcin
    • View Profile
It's the latest Corona version with the latest Max.

I don't want to be that pain in the neck guy, but when asked about versions, please always provide specific numbers. "Latest Corona version" would mean Corona 11 Hotfix 1 as well as 05.03 Corona 12 daily build.

There is some additional information about underwater rendering here: https://support.chaos.com/hc/en-us/articles/11905001704977-New-Volume-Resolving-in-Corona-10
I am not sure, but maybe it will be useful to you.

Do you have the "physical size" option enabled in your camera?
What exactly are you trying to achieve? Is it something like a camera fly-through where the camera is passing through an aquarium at some point?

Lastly, the best idea may be submitting a support ticket here: https://support.chaos.com/hc/en-us/requests/new
Please attach your scene there, if possible.

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