Author Topic: Backplate/HDRI Refraction through 2sided Vehicle windshield  (Read 13837 times)

2017-01-17, 17:29:18
Reply #15

Ludvik Koutny

  • VIP
  • Active Users
  • ***
  • Posts: 2557
  • Just another user
    • View Profile
    • My Portfolio
Yes, and those projected reflections would be mapped absolutely correctly, given that you would model holdout objects in the same/similar distance actual real scene elements were captured on the backplate when shot. I do that all the time when doing VFX integration into footage. If you put plane very far away and make it small enough to cover just window, I doubt you will get any visible reflections projected on your car.

Actually, I will often take extra time to blockout some elements on the backplate to make scene even more realistic, such as for example street lamp close to the car, so that it gets reflected in the car hood/windshield, etc...

Everyone keeps talking about solution, yet no one knows what the solution is. No render engine has any advanced AI, that can differ which mesh is modeled in a way, in which it does not refract any environment outside of the camera's field of view, and which meshes with refractive materials bend the rays, and need to refract the environment.

Owlempires has stumbled upon this problem in one of the previous posts, where enabling refraction environment messed up his other glass materials. This is what I mean. If we had yet another override called "backplate map", what would that override do? In which ways would it be different to the existing refraction environment? I am sincerely asking here, without any angry tone.

You have simple solution of putting a small plane behind it, which never failed me in my life, and I did a lot of cars integration, and then you also have Refract BG Override slot at the bottom of each CoronaMTL, into which you can instance your screen mapped backplate, so you get refraction override only on materials selected by you.

I can't possibly imagine scenario where both these mechanisms would fail.
« Last Edit: 2017-01-17, 17:36:43 by Rawalanche »

2017-01-17, 17:39:29
Reply #16

redstarcg

  • Active Users
  • **
  • Posts: 23
    • View Profile
    • Poltavskiy
Rawalanche - The refraction override is almost doing it but the only issue I noticed for me when trying to use it, it will put the image in areas that should see other things, it kills the life of the headlights etc.

I dont like comparing things to vray because its not fair to do so. But for reference, in vray, whatever I have in my environment background image, that shows up through the back of my glass, refraction remain the same but it shows the bg image in back of glass.

On the other hand, the glass in Corona usually has alpha, so if you bring it into AE or Photoshop without showing background in render you can put backplate in there and it will be fine lol.

2017-01-17, 17:43:22
Reply #17

Ludvik Koutny

  • VIP
  • Active Users
  • ***
  • Posts: 2557
  • Just another user
    • View Profile
    • My Portfolio
I dont like comparing things to vray because its not fair to do so. But for reference, in vray, whatever I have in my environment background image, that shows up through the back of my glass, refraction remain the same but it shows the bg image in back of glass.

In that case, I am very curious what kind of setup do you use, because I use V-Ray on almost daily basis, and it behaves exactly as Corona does. In V-Ray, I always use planes behind the glass for the exact same reason. I can actually prove it. Could you share your V-Ray scene? Even if just stripped down?

And yes, it will kill life in your glass materials if you use it, because exactly as I said in one of my previous posts, backplate projection is limited to the camera's field of view. Renderer can not magically know what's outside of the view. It has no data. That' exactly he problem here. That's why you, as a human, need to manually tell the renderer where backplate is, by placing geometry with ShadowCatcher, and rest will be always considered HDRI environment.

Also, I did verify my workflow, and it indeed works, given that the plane is in sufficient distance from the car. Even if it stretches across the entire frame, it still does not affect the reflections:

2017-01-17, 18:00:59
Reply #18

redstarcg

  • Active Users
  • **
  • Posts: 23
    • View Profile
    • Poltavskiy
Here is my setup. Very simple. Backplate in Env slot. Vray dome with light set to invisible. Everything functions properly.

2017-01-17, 18:08:24
Reply #19

Ludvik Koutny

  • VIP
  • Active Users
  • ***
  • Posts: 2557
  • Just another user
    • View Profile
    • My Portfolio
That's because you are using environment mapped in screen space as your main environment. How does it illuminate your scene with GI instead of dome... have you tried that? You will see that once you enable GI, you will get your backplate ghosting also through completely opaque materials with no refraction or opacity. Also, don't you find it strange, that you have lens shaped meshes that should refract and bend light, yet your teapot and sphere pass through refraction from the environment as if they were completely thin? Shouldn't sphere refract what's behind it upside down, like it does in real world?

2017-01-17, 18:14:44
Reply #20

Ludvik Koutny

  • VIP
  • Active Users
  • ***
  • Posts: 2557
  • Just another user
    • View Profile
    • My Portfolio
Attaching below an example of what happens on your image, vs what should happen. Rendered in V-Ray.

But yes, this is easily achievable. But it will make your refractions on some other meshes look pretty bland. That's exactly what Owlempires has complained about in some of his previous posts. So again, it's a tradeoff.

2017-01-17, 18:18:35
Reply #21

redstarcg

  • Active Users
  • **
  • Posts: 23
    • View Profile
    • Poltavskiy
My backplate never illuminates anything even with GI on because I use a dome light. I created the shapes with no shell for a quick example. Also as long as you use a dome light with spherical checked your backplate will never show up through solid objects. I know exactly what issue you are talking about, but using a dome fixes that haha.
Trust me, this works 100% accurately when I am setting up a proper scene.
I am attaching some shots I have done in past with Vray so you can see how the glass works just fine, this was same method with no backplate plane.
« Last Edit: 2017-01-17, 18:22:03 by redstarcg »

2017-01-17, 18:25:37
Reply #22

Ludvik Koutny

  • VIP
  • Active Users
  • ***
  • Posts: 2557
  • Just another user
    • View Profile
    • My Portfolio
Yes, of course it works in those scenes, because you don't see any ray-bending objects against the plate. All the refractive materials except for window glass, where refraction is not noticeable, are blocked by something behind it.

But that's not an issue, really. I completely agree it works in these simple cases. The point here is, that the Refract BG override in material or Refraction environment override will do nearly same thing. Owlempires has brought up an issue where refraction environment override would modify his other glass materials, and ruin the look he liked. The thing with your V-Ray setup is, that you work with that setup he does not like right from the very begining. He already had a set up look, and then it changes. Hence my plane suggestion, or suggestion to use refraction override in CoronaMTL. Those two solutions should resolve that particular issue.

If you want to go with same workflow as your V-Ray one, then simply start your scene from scratch with refraction environment override enabled and filled with the backplate..

2017-01-17, 18:28:46
Reply #23

redstarcg

  • Active Users
  • **
  • Posts: 23
    • View Profile
    • Poltavskiy

2017-01-17, 18:37:12
Reply #24

Ludvik Koutny

  • VIP
  • Active Users
  • ***
  • Posts: 2557
  • Just another user
    • View Profile
    • My Portfolio
Oh come on... Don't just end it like this. It's exactly discussions like these that lead to improvements of Corona. I occasionally even change my mind and try myself to convince Ondra and his team to implement something new. It just needs to make sense.

I just want to work out how would the better solution work...

Look, with your setup, you can indeed make great output, but I mean, what would you for example do, if you had to integrate some Car as well as a few glass refractive objects in the scene, something like this:


Right now, Corona accommodates for this scenario right out of the box, where as V-Ray doesn't. If you want quick, easy fix to your window glass in your car, you just plug your backplate into window glass material's refraction BG slot. And you are done. But with V-Ray, how would that work then? If we in theory switched to V-Ray's solution, how would people go about this use case then?

2017-01-17, 19:05:48
Reply #25

redstarcg

  • Active Users
  • **
  • Posts: 23
    • View Profile
    • Poltavskiy
Aha! Okay so I did the test Rawalanche.
I see what is happening. Vray and Corona have the same concept inverted lol.

I agree with you on the ball sample, vray will only do this if I do not override backplate image, which makes it actually a bigger pain than Corona and actually corona wins here with it being easier.
But I do have to still stand behind the logic that when you do refraction override in Corona it does behave a little bit different than when you have a backplate image in Vray env slot.

I guess at this point its either one way or another, in this sense the foundation of Corona is more accurate if you want to use balls and such, however it does backfire in the sense of refraction override but that can be fixed with a plane behind windows.

Just knowing solutions to problems, still cgi so it can never be 100% easy hahahaha. :)

2017-01-17, 19:24:55
Reply #26

Ludvik Koutny

  • VIP
  • Active Users
  • ***
  • Posts: 2557
  • Just another user
    • View Profile
    • My Portfolio
Sure, it will never be 100% easy :)

BTW could you try using backplate plugged into refraction BG override of a car windows glass material in some of your scenes? I mean, it could cause some issues on meshes that refract parts of environment outside of camera's FOV, but that's not the case of windows planes, which are usually quite thin an straight. In that cause, it could work as a best solution. Only drawback would be that you would have to have one more separate material specifically for windows glass (which is the case mostly anyway).

I am just curious, if it would cause any problems in your scenes. It should not. And if it does not, then you don't need to worry about planes anymore.

2017-01-18, 01:03:43
Reply #27

mferster

  • Active Users
  • **
  • Posts: 523
    • View Profile
http://www.ardakutlu.com/maxscripts/#cameraPlaneJump

This script may help you.... with maybe a few tweaks

Creates a plane that matches your backplate input and takes up the extent of your camera's field of view at all times and moves along with your camera's movements/transforms.

2017-01-18, 13:10:10
Reply #28

Robert Bodis

  • Active Users
  • **
  • Posts: 36
  • Tall dude, likes pizza.
    • View Profile
    • @owlempires
I haven't joined in the conversation between you two gentleman, because my knowledge is still not thorough enough about the subject.

However. Blunt idea.
Getting correct results is possible. Via the plane.  So the end result is achievable.
What if the camera or the material has an option, that will make selected objects act as if they were Glass with a back-plane behind them ,determined angle by the camera and its target.

I'm only spit balling ideas here.
Would that be possible in some way ?

2017-01-18, 14:02:42
Reply #29

Ludvik Koutny

  • VIP
  • Active Users
  • ***
  • Posts: 2557
  • Just another user
    • View Profile
    • My Portfolio
What if the camera or the material has an option, that will make selected objects act as if they were Glass with a back-plane behind them ,determined angle by the camera and its target.

That's pretty much what you get if you plug your backplate into CoronaMTL's refract BG override slot.