Author Topic: Refraction issues  (Read 4659 times)

2020-04-14, 22:31:01

Flavius

  • Active Users
  • **
  • Posts: 167
    • View Profile
Hello...

So I've been bashing my head around this... It started initially with the phoenix fd liquid simulator..I thought that is the culprit, then I exported the mesh to Alembic, then I thought that is the problem + many other things until I ended up with this simple setup- a collapsed mesh(Singe sided!) from the ABC file and a simple plane and a ground plane.

I have a ground plane at -60meters. And I have this water plane(with the cutout) and the ,abc mesh at +3 meters.  I don't know how to explain it properly, I think the images shows the issue. If the meshes are separate they render differently, if they are attached they render uniform and with correct depth/absorbtion parameter.

Is there anyway around this? In case you are wondering why I need this, I want to render a big plane with displacement with water and then composit the phoenix fd simulator box on top of it, but I can't do that because of this problem. I've attached another screenshot to see. Look how the displaced mesh (a collapsed edit poly now) looks. This doesn't seem right at all to me.
Even more weird, if I attached the mesh to the plane with the cut, it renders correct!!!

Thanks in advance!

« Last Edit: 2020-04-15, 11:27:10 by Flavius »

2020-04-14, 23:19:48
Reply #1

sprayer

  • Active Users
  • **
  • Posts: 794
    • View Profile
Did you tried to use box instead plane?

2020-04-15, 09:19:27
Reply #2

Flavius

  • Active Users
  • **
  • Posts: 167
    • View Profile
I do have the ground plane underneath to properly calculate the absorption parameter. A box wouldn't help me at all, I need a plane because the phoenix mesh I am outputing is a plane basically. It's clearly a corona problem(EDIT: Not only a corona thing:( ), as detached meshes look different and if I simply attach them and do nothing else they render differently.
« Last Edit: 2020-04-15, 13:19:58 by Flavius »

2020-04-15, 10:21:21
Reply #3

Flavius

  • Active Users
  • **
  • Posts: 167
    • View Profile
Ok..I am very confused and will go nuts soon...I have tried Arnold and I get the same thing... Separate meshes seem to have a completely different behavior than attached meshes. See the examples...So how come the result is so different by simply using an "attach" to edit poly?

And if you guys know a workaround this, it would be of tremendous help.

Thanks!


EDIT: Going completely nuts with it.... Separate mesh render incorrectly, if I attach them in the same mesh they render differently. I even made a a bigger cut in the plane to emphasize the problem
« Last Edit: 2020-04-15, 17:54:52 by Flavius »

2020-04-15, 18:18:52
Reply #4

Flavius

  • Active Users
  • **
  • Posts: 167
    • View Profile
So. Corona-Vray-Arnold-> same broken behavior.

I have asked a friend to try this thing out on RedShift and that renders and calculates things correctly. Is this something related to Embree? Any workaround would be of great help.

I made a test with ART renderer and this one seems to do things right.
« Last Edit: 2020-04-15, 18:40:00 by Flavius »

2020-04-15, 19:01:11
Reply #5

PROH

  • Active Users
  • **
  • Posts: 1219
    • View Profile
Hi. Kind of hard to understand what you are showing, since everything changes in all images, and the materials bump seems wrong when you find it correct.

But here's a long shot: Have you tried to do a "Reset X-form" to all meshes? This is one of the things that changes when attaching meshes. So this could be a reason for change.

2020-04-15, 19:08:16
Reply #6

Flavius

  • Active Users
  • **
  • Posts: 167
    • View Profile
hi...

it's not about the bump or anything related to displacement. to make things simpler.. I made a simple big plane, and a simple small plane. Smaller one renders very differently.

« Last Edit: 2020-04-15, 19:14:47 by Flavius »

2020-04-15, 19:36:22
Reply #7

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 8779
  • Let's move this topic, shall we?
    • View Profile
    • My Models
You are trying to render impossible setup - it's hard to tell what is supposed to be "correct" look. Having said that, i have to admit that Corona still has issues with refractive materials in certain situations.
I'm not Corona Team member. Everything i say, is my personal opinion only.
My Models | My Videos | My Pictures

2020-04-15, 19:41:45
Reply #8

Flavius

  • Active Users
  • **
  • Posts: 167
    • View Profile
You are trying to render impossible setup - it's hard to tell what is supposed to be "correct" look. Having said that, i have to admit that Corona still has issues with refractive materials in certain situations.

Hi Romullus... I don't know how to explain it better sadly. A smaller plane behaves very differently than a bigger plane. Even if the planes are not connected via polygons, If I attach the smaller plane to the bigger one the appearance changes completely.

I just wanted to render a big plane of water, and then my smaller simulation and composite that on top.

EDIT: Ok, maybe correct/incorrect is not the way to put it. But it shouldn't render so differently. That's the problem. Very inconsistent :(
« Last Edit: 2020-04-15, 19:47:20 by Flavius »

2020-04-15, 20:12:20
Reply #9

PROH

  • Active Users
  • **
  • Posts: 1219
    • View Profile
Hi. I think I know what's going on. I made a test myself, and as you can see on the attached render, the edges of the 2 planes (1 small & 1 big) are darker than the center. This is caused by refracyion + scattering distance.

So if the dark "color-edge" is bigger than the small plane, then it will look darker than the big plane.

You can see how it changes in IR when you move the bottom plane up and down, or adjust the scatter distance value.

Hope it helps

2020-04-15, 20:13:17
Reply #10

antanas

  • Active Users
  • **
  • Posts: 269
  • Hmm ...
    • View Profile
Flavius sent me the scene to test it out and I rendered one of it's earlier versions in Cycles for Max and Redshift prior to that (sadly I didn't save the renders from rs)  - no such weird behavior in neither of those - maybe it's some sort or an Embree bug after all cause the renders who do suffer from that behavior are embree based (Arnold, Corona, Vray) which might explain it cause neither Redshift or Cycles (in it's gpu mode which I used) are not - not so sure about Art renderer though.

2020-04-15, 20:29:20
Reply #11

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 8779
  • Let's move this topic, shall we?
    • View Profile
    • My Models
Antanas, does material in your examples has refraction? I know, that from such angle, reflection normally overpowers refraction, but it still should be visible even if barely. Maybe for this test we should disable reflection at all, so it wouldn't distract from results.

Also, the fact that Cycles or Redshift renders what seems to be expected, that doesn't mean they are physically correct, because the setup itself isn't physically plausible. Maybe those renders are cheating, or cutting corners and coincidentally that led to better looking outcome :]
I'm not Corona Team member. Everything i say, is my personal opinion only.
My Models | My Videos | My Pictures

2020-04-15, 20:35:57
Reply #12

antanas

  • Active Users
  • **
  • Posts: 269
  • Hmm ...
    • View Profile
Yeah, it has a refraction but it's not a native Cycles for max material - I used a regular physical one cause my knowledge of Cycles is limited at best.
You might be right about both of them cheating, no arguing there but we sure need that kind of cheating option in Corona too, otherwise dealing with such scenes which is impossible or rather unfeasible to do in corona at least when we talk about animations which Flavius needs doing, cause it would simply take ages to render on any kind of hardware if done physically correct - the water depth of 60m would see to that ))))

2020-04-15, 20:39:56
Reply #13

Juraj

  • Active Users
  • **
  • Posts: 4743
    • View Profile
    • studio website
I can clearly see refraction in Antannas image (box to the utmost right), unless it's some hack :- ).

Where do refractive rays travel if their volume is defined by two planes (the actual sea level, and the ground object), but nothing else, no actual enclosed volume?
How does it calculate its virtual volume? Do these "extents" change based on object's bounding box or something?

(side-note, is it in any way affected by ray directionality, somewhat further fake?)
(side-note 2, I don't think index differs for reflection and refraction, both should be 1.333 imho)

I plan on making this same scenario for long time, so very interested in outcome!
Please follow my new Instagram for latest projects, tips&tricks, short video tutorials and free models
Behance  Probably best updated portfolio of my work
lysfaere.com Please check the new stuff!

2020-04-15, 21:45:27
Reply #14

Flavius

  • Active Users
  • **
  • Posts: 167
    • View Profile
Hi all,

Thanks for looking into this. I have simplified the scene, organized it a bit. You have a big plane, a small plane, the ground and two materials of water, one with sub-surface scattering and a simple one to test them out. the SSS one darkens the edge of the plane.

If there is any workaround this that would be amazing. What I need is the small plane to have the same look as the bigger one so I can blend them in post production.

P.S. The reason why I am not using the Ocean Mesh generation by Phoenix is that the displacement is really bad compared to Corona's and even if I increase the ocean subdivisions from Phoenix, the "transforming vertices' stage takes over 2 minutes @1080p which is not acceptable.

Thanks again!