Author Topic: Refraction doubles render time  (Read 1985 times)

2020-08-28, 15:42:19

Flavius

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

I need to get to the bottom of this and any suggestion of faking this or any posibility to speed this up would greatly improve my renderings (and my mental state).

Please see the attached 2 renders. One has refraction set to zero = Render time 03:39
                                                   One has refraction set to 1, no scattering = Render time 07:17

So you see my frustration and desperation...I need to render animation out of this but refraction completely destroys my render times. This is on a 3950X CPU.
If I use translucency the render times are similar to the NO refraction ones, but at this angle the water looks like plastic :(

Is there anything at all I can do? Any tricks to fake the look and feel? I could get the color in order in post, but look at the back part of the ship, no underwater foam is visible of course. And at lower angles I need some transparenct near the ship. Can this be made adaptive in anyway?

I tried to map a gradient around the ship and make the water near the ship refractive and the rest non refractive but oh boy the render times are like 12311x higher:))

Any suggestion would be welcomed. To me 2x render times for refraction seems very excessive.

Thanks!

2020-08-28, 18:01:21
Reply #1

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 12708
  • Marcin
    • View Profile
Two ideas:

1) Hide the foam and splashes and see if it changes anything. *Maybe* the foam becomes super slow when rendered under refractive water?

2) You can try lowering "Max ray depth" in Render Setup > Performance. You can reset it to the default value by right-clicking on the spinner. Then go down by just a single click and check if the result is acceptable. Lowering it usually makes rendering faster, especially with refractive materials. Too low value will make everything much darker, and will basically disable any GI! For a scene like this, you can try going as low as 5-7.
Marcin Miodek | chaos-corona.com
3D Support Team Lead - Corona | contact us

2020-08-28, 19:30:20
Reply #2

Flavius

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

Indeed, I have a max depth ray of 5, MSI to 5 as well. There is something with huge refractive areas that simply doesn't go well with Corona. I did hide the foam and the difference is insane as well.... I know I asked this before, I have absolutely no knowledge of programming, but can a custom ocean shader be done for corona, by a 3rd party for example?  Or that is not possible? I am asking this because literally 99% of my renders include ocean and waves...

Thanks!

2020-08-31, 20:00:17
Reply #3

sebastian___

  • Active Users
  • **
  • Posts: 200
    • View Profile
The difference between the two pictures are quite subtle. Can't you fake it somehow with some fog color or translucency or something ?

2020-09-01, 08:17:14
Reply #4

Flavius

  • Active Users
  • **
  • Posts: 167
    • View Profile
The difference between the two pictures are quite subtle. Can't you fake it somehow with some fog color or translucency or something ?
Hi,

I have tried that and it is very unreliable (different angles have totally different results) using translucency method. Also the "transparency" using translucency doesn't work properly,it's too murky if I get closer with the camera. It's very very frustrating since I deal with this on a daily basis...

2020-09-01, 09:37:08
Reply #5

sebastian___

  • Active Users
  • **
  • Posts: 200
    • View Profile
Yep, for multiple angles and camera positions a realistic solution is the best. I didn't realize it you need this for lots of camera positions even though you said you use a lot of renders with sea water.

There's also Dreamscape from Sitnisati which is a pretty good looking ocean solution (as long as you don't use tall waves) complete with waves and surface shader and I guess pretty fast or optimized, but probably doesn't work with Corona.

But as far as I remember it looked pretty photorealistic rendered just with scanline render, so you could also render separately and composite after.
But the waves and wake interaction is much worse compared to your solution from your images. So it's good only as a "background" ocean.
And compositing the foam and wakes with the dreamscape ocean would be a lot of work I guess.

2020-09-01, 09:44:59
Reply #6

Flavius

  • Active Users
  • **
  • Posts: 167
    • View Profile
Yep, for multiple angles and camera positions a realistic solution is the best. I didn't realize it you need this for lots of camera positions even though you said you use a lot of renders with sea water.

There's also Dreamscape from Sitnisati which is a pretty good looking ocean solution (as long as you don't use tall waves) complete with waves and surface shader and I guess pretty fast or optimized, but probably doesn't work with Corona.


Yeah..and I need animations as well..I don't know what to do man. If I render the ships separately I don't have the foam reflection in the hull and I don't have the waves and water reflection in the hull. Rendering the water separately means no reflection of the ship in the water and no shadow of the ship on the water (well, shadow would be the only thing easy to fix). Also the foam simply doesn't look good if I render it separate. So it kind of has to be in one go. Imagine... Pressing that refraction ON button is  pretty much reducing my 16 core machine to a 8 core one speed wise. Denoiser is not an option, becuase they generate incredible amount of splotchiness(like good old school low Irradiance map settings).
I'm still looking for solutions and dreaming of a custom ocean shader from Corona :D..but I'm a minority here

2020-09-01, 14:06:20
Reply #7

Juraj

  • Active Users
  • **
  • Posts: 4743
    • View Profile
    • studio website
Hey, no help from me just wanted to say I love the result so far :- ). Do you have WIP thread? I have older personal project where I planned to make same stuff with yacht&foam, though not animation, just stills.
I would love to consult with someone eventually who already passed some pain of the process :- ).
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-09-01, 14:19:04
Reply #8

Flavius

  • Active Users
  • **
  • Posts: 167
    • View Profile
Hey, no help from me just wanted to say I love the result so far :- ). Do you have WIP thread? I have older personal project where I planned to make same stuff with yacht&foam, though not animation, just stills.
I would love to consult with someone eventually who already passed some pain of the process :- ).

Hi there& thanks.

I don't have a WIP thread, but you can PM me any questions you have. Pain is a good word for the tests l did lol :)) I think and I can point out some key things which are essential to get right (engine cooling outlet, anchor pocket interaction, propellers etc) so the process will be smoothened a bit.