Author Topic: Liquid in Glass - Bug or is it me?  (Read 2979 times)

2021-07-28, 19:07:55

LKEdesign

  • Active Users
  • **
  • Posts: 100
  • I'm addicted to Corona Render and I need NO cure.
    • View Profile
    • LKE Design Web-site
I don’t get it!!!
Playing with various liquids in a glass with the new Physical Material in Corona 7 for MAX

Apparently it is not possible to have the glass and the liquid in the same object - separated by a Material ID?? Which I think is unfortunate  - We mostly keep our assets as one object, and it hasn't been a problem before the new way of calculating volumes.

I have followed the description on Corona Helpdesk having the liquid overlapping the inner faces of the container - and I have setup a test scene where i have done the following:

I have a box  10x10x10 cm for the liquid, Mat ID 2. Copied the box, removed the top face and added a  shell modifier with inner amount=0,2cm and outer amount =0,3 cm - this should ensure that the liquid would overlap with 0,2 cm on the sides and bottom. I have assigned mat ID 1 to the container.

In the back row I have them as separate parts and as loose parts placed correctly inside each other. I have copied the two objects and attached the inner to the outer ( liquid to glass).

I have also made a lathed object in two versions  - one with two splines, the container and the liquid. Each spline has its own Mat ID, 1 for the container and 2 for the liquid.

The other version is made with the splines separated and lathed with an instanced lathe modifier.

I have made a multisub material with the glass on ID 1 and on ID 2 a corona selector material with 6 different liquid materials. One using the new Physical material preset for water and the rest taken unedited from the Corona Material Library.

The scene is lit by an HDRI only.

You can see the result on the attached images.

So my question is …

a) Is it really true that the liquid and the container must be in a separate object to calculate right?

It seems like Corona can’t find out which is which, as the sides of the liquid get the color of the glass absorption color ??!! 

b) there are some strange artifacts in the attached objects, some black lines - I can’t find out where they come from  - it's not a reflection of the texts - as I have tried to render the scene without and the artifacts were still occuring .

Is it a bug or am I doing something wrong?
All the best,
LKE Design
See my work at: http://www.lkedesign.dk/en/portfolio_en.html

2021-07-29, 13:28:14
Reply #1

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 12711
  • Marcin
    • View Profile
This is weird, we will definitely investigate.

One question for now:
Are you 100% sure that the normals of your objects are correct? (facing outwards - one way to check the is enabling "backface culling" option in object properties).
Marcin Miodek | chaos-corona.com
3D Support Team Lead - Corona | contact us

2021-07-29, 13:50:06
Reply #2

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 12711
  • Marcin
    • View Profile
This is the same in V6 and V7 regardless if the legacy mtl or physical mtl is used:
https://corona-renderer.com/comparer/fSfEaR

We can report this and probably some improvements could be made, but:
- how much of a problem is this for you? (and possibly other users - if we could hear some other voices)
- is it a problem when creating new models?
- is it a problem when importing existing models?

On the other hand this can be seen as a feature that could probably help in some cases so I am not sure if we want to get rid of this option completely.
Marcin Miodek | chaos-corona.com
3D Support Team Lead - Corona | contact us

2021-07-29, 14:23:47
Reply #3

burnin

  • Active Users
  • **
  • Posts: 1532
    • View Profile
My thought is same as maru noted - Are you 110% sure, your geometry is correct?

ps
It's always better & faster problem solving when there's a scene file attached...


pps (for devs)
Here's your case why Volume priorities are better than Normals maneuvering ;)
« Last Edit: 2021-07-29, 14:27:36 by burnin »

2021-07-29, 14:52:27
Reply #4

LKEdesign

  • Active Users
  • **
  • Posts: 100
  • I'm addicted to Corona Render and I need NO cure.
    • View Profile
    • LKE Design Web-site
Thanks for your replies,

Yes I’m 100% sure the normals are right. That is exactly the reason I have made the first two object, the container and the liquid, as separate objects. All I have done afterwards is that I have copied the two objects and moved the liquid inside the container and copied these and attached the liquid to the container.
I haven’t touched the normals at all.

I will attach the scene tomorrow, today I am out of offiice.

Cheers
All the best,
LKE Design
See my work at: http://www.lkedesign.dk/en/portfolio_en.html

2021-07-29, 14:53:30
Reply #5

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 8779
  • Let's move this topic, shall we?
    • View Profile
    • My Models
- how much of a problem is this for you? (and possibly other users - if we could hear some other voices)

I never had problems with liquid in a glass scenario, because i always keep them as separate objects, but i think this could be a real issue if you'd want to export such object as proxy.

Another example where this limitation become as nuisance, is headlights of old car. It needs glass with different properties on each side (smooth on one side and with bump on the other) and it has to be modeled as solid object. You can't assign such object a multimaterial with two different glass materials, because Corona would render it incorrectly. The solution is to use single material and define different properties via texmaps. It's a bit less convenient to setup, but it works. I don't think i ever encountered scenario where current behaviour would be preferable, so you have my voice for fixing this issue. On the other hand, i wouldn't be too upset if the fix would have low priority, since there's an easy workaround.
I'm not Corona Team member. Everything i say, is my personal opinion only.
My Models | My Videos | My Pictures

2021-07-29, 14:57:20
Reply #6

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 8779
  • Let's move this topic, shall we?
    • View Profile
    • My Models
b) there are some strange artifacts in the attached objects, some black lines - I can’t find out where they come from  - it's not a reflection of the texts - as I have tried to render the scene without and the artifacts were still occuring .

Is it a bug or am I doing something wrong?

Check if your glass surface is touching the floor. You want that the glass object would float ever so slightly above the floor, not touch it and not go below it, otherwise you will get incorrect results.
I'm not Corona Team member. Everything i say, is my personal opinion only.
My Models | My Videos | My Pictures

2021-07-29, 15:06:16
Reply #7

LKEdesign

  • Active Users
  • **
  • Posts: 100
  • I'm addicted to Corona Render and I need NO cure.
    • View Profile
    • LKE Design Web-site
This is the same in V6 and V7 regardless if the legacy mtl or physical mtl is used:
https://corona-renderer.com/comparer/fSfEaR

We can report this and probably some improvements could be made, but:
- how much of a problem is this for you? (and possibly other users - if we could hear some other voices)

well all is relative, I prefer to have things like these as a single object.

When making larger setups I often distribute them using either RailClone or ForestPro - and then it complicate things when they are groups instead of single objects


- is it a problem when creating new models?

not really

- is it a problem when importing existing models?

well that depends. Different renders has different ways of handeling these things, - so 8 out of 10 times you have to remodel the fluid anyway

Btw in that connection - how do you make a correct looking fluid simulation, if the fluid need to be intersecting the container???


On the other hand this can be seen as a feature that could probably help in some cases so I am not sure if we want to get rid of this option completely.
All the best,
LKE Design
See my work at: http://www.lkedesign.dk/en/portfolio_en.html

2021-07-29, 15:09:10
Reply #8

LKEdesign

  • Active Users
  • **
  • Posts: 100
  • I'm addicted to Corona Render and I need NO cure.
    • View Profile
    • LKE Design Web-site
b) there are some strange artifacts in the attached objects, some black lines - I can’t find out where they come from  - it's not a reflection of the texts - as I have tried to render the scene without and the artifacts were still occuring .

Is it a bug or am I doing something wrong?

Check if your glass surface is touching the floor. You want that the glass object would float ever so slightly above the floor, not touch it and not go below it, otherwise you will get incorrect results.


Everything is “flying” 1 mm above the ground plane
All the best,
LKE Design
See my work at: http://www.lkedesign.dk/en/portfolio_en.html

2021-07-29, 15:19:05
Reply #9

LKEdesign

  • Active Users
  • **
  • Posts: 100
  • I'm addicted to Corona Render and I need NO cure.
    • View Profile
    • LKE Design Web-site
MARU, I have just been looking at your two examples.
Have you noticed that your images also have artifacts in the refraction when the glass and fluid are one and same object
All the best,
LKE Design
See my work at: http://www.lkedesign.dk/en/portfolio_en.html

2021-07-29, 16:12:46
Reply #10

PROH

  • Active Users
  • **
  • Posts: 1219
    • View Profile
Hi. Just to give my point of view.

I do think that this is a serious problem, since there are many cases where one single object containing both glas & fluid is the only usable solution, + many premade models are made this way.

I really hope that this will be seen as "high priority", and will be fixed soon.

Best regards

2021-07-30, 16:15:46
Reply #11

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 12711
  • Marcin
    • View Profile
Reported. Hopefully can be improved.

(Report ID=CRMAX-861)
Marcin Miodek | chaos-corona.com
3D Support Team Lead - Corona | contact us