Author Topic: GI visibility workaround for clear objects  (Read 424 times)

0 Members and 1 Guest are viewing this topic.

Offline andy.engelkemier

  • Sr. Member
  • ****
  • Posts: 391
GI visibility workaround for clear objects
« on: March 08, 2019, 01:34:12 pm »
So looking through glass is often problematic because it takes lots of time to pass GI rays through. And you pretty much HAVE to have GI on in order to see inside anything. And putting a little bit of emissive something inside there? Well, now you have fireflies to contend with.

A good workaround in Vray is an override material. I'm wondering if there's some similar workaround.
With an override, you are still working with physical materials (although you don't Have to), but you're telling different aspects to do different things. One trick for stainless is to override reflections and refractions with a copy of the material that doesn't have the texture. As long as it's not a clear reflection/refraction, there's no need to see any of that texture, which means, the computer doesn't have to calculate all that complication.

The same goes for GI. If you have a clear material with a bit of roughness to it? Well, that's quite a bit of time. Override that with a material that has no need for refracting at all. GI just passes through.

Clear objects really shouldn't be casting shadows unless you are Also calculating caustics. So might as well let us cheat it by having GI and shadows ignore the object.

I don't think Keyshot allows for that, but I'm asking here first to see if I just don't know about some secret More advanced material. I'm trying to do a bunch of large realistic renders in keyshot (which I'd like to keep coming our way), but I keep having to do lots of workarounds in order to complete them. Too many workarounds would means going over on time, or possibly not even finishing on time. Well, that's not ok obviously. I'd really like to deliver keyshot files back to them also, as an added bonus for working with me, but can only do that if I do the work in keyshot. lol

Anyone know some good tricks for that? I've got some tests going to see what kind of timing works out, but right now it looks like brute force samples at 128 might win. I think some interior quality might be ok by disabling GI cache, but I may also have to increase the quality to 2, then the time goes through the Roof.
I didn't notice a few things until I rendered it out at 7K. So now I'm going back and filling in with a bunch of region renders and photoshop masks.

Offline MWo

  • Hero Member
  • *****
  • Posts: 801
  • Senior Technical Consultant @ INNEO (Germany)
    • german KeyShot page from INNEO Solutions
Re: GI visibility workaround for clear objects
« Reply #1 on: March 09, 2019, 11:41:53 pm »
(I just reply to follow this interesting entry - and post my thoughts if I can add some solution)


Cheers
Marco

Offline andy.engelkemier

  • Sr. Member
  • ****
  • Posts: 391
Re: GI visibility workaround for clear objects
« Reply #2 on: March 11, 2019, 05:32:23 am »
So the weekend is over, and results are in. I submitted quite a few to compare. Sorry, can't show anything because it was client work.

But, there's a window. It's maybe 6% of the image (just a rough guess).
The total render at 128 samples was 47m for 7K square. (network render, don't get too excited)

Just the window area  was 20 minutes. So that's Definitely what's slowing it down.
GI no cache, with GI at 1 (raising GI increased time and you couldn't really see any difference in quality) was 40min for the same window. So, it's double. BUT....
You completely lose texture in the shadows with the real-time method.

So my options now are to render with GI no cache for one render at a pretty high render time. Or render with it off, then submit region renders for the windows. So it boils down to my time vs machine time.
Well, machines work overnight (and I prefer not to), so I'm headed the direction of GI no cache.

Offline bdesign

  • Hero Member
  • *****
  • Posts: 795
Re: GI visibility workaround for clear objects
« Reply #3 on: March 11, 2019, 06:47:54 am »
Hi Andy-

The Ray Mask node can be used to toggle on/off shadows, reflections, object visibility, and combinations thereof. There is also a "Visible GI" check box, but I haven't been able to get any noticeable results with that option. You can use this node to disable shadows for a glass material, so that objects inside will be illuminated without enabling GI. Plug the Ray Mask node into the Opacity of the glass material, and uncheck "Visible Shadow". The Ray Mask can also be used to get shadows only (as mentioned in your post here: https://www.keyshot.com/forum/index.php?topic=24053.msg100851#msg100851 ) by setting the Opacity mode to "Inverse Color". To avoid the blank spot in shadows of objects that are coplanar with the ground plane, you'll need to move them up in the Y axis by a fractional amount (.001). To make the Ray Mask node available in the Material Graph, you'll need to enable Experimental Features by  editing the KeyShot .xml file. Close KeyShot. Open the .xml file (found in Documents > KeyShot 8 ) in a text editor such as WordPad, and search for "experimental_features". Set the bool value = "true". Save the file and close the text editor. Restart KeyShot and the Ray Mask should be an available utility in the Material Graph. Example renders below of glass with/without Ray Mask, and also of simple geometry/shadow only.

Cheers,
Eric
« Last Edit: March 11, 2019, 06:49:53 am by bdesign »

Offline camomiles

  • Full Member
  • ***
  • Posts: 216
    • www.camomiles.de
Re: GI visibility workaround for clear objects
« Reply #4 on: March 11, 2019, 07:33:20 am »
Uuuuhhhh ... this is awesome  :o. Thanks for sharing Eric!!!

Offline bdesign

  • Hero Member
  • *****
  • Posts: 795
Re: GI visibility workaround for clear objects
« Reply #5 on: March 11, 2019, 07:47:12 am »
You're welcome, Eugen :)

Cheers,
Eric

Offline DriesV

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2412
  • Product Specialist at Luxion
Re: GI visibility workaround for clear objects
« Reply #6 on: March 11, 2019, 11:34:34 am »
Great tricks, Eric!

Please be aware that the Ray Mask node is indeed experimental.
In its current form it has not been subjected to rigorous testing and as such may not behave consistently and/or correctly across all materials and render modes. Results may vary. :)

Dries

Offline bdesign

  • Hero Member
  • *****
  • Posts: 795
Re: GI visibility workaround for clear objects
« Reply #7 on: March 11, 2019, 11:37:20 am »
Thanks very much, Dries! Is the "Visible GI" option currently not functioning?

Cheers,
Eric

Offline MWo

  • Hero Member
  • *****
  • Posts: 801
  • Senior Technical Consultant @ INNEO (Germany)
    • german KeyShot page from INNEO Solutions
Re: GI visibility workaround for clear objects
« Reply #8 on: March 11, 2019, 11:50:28 am »
Great solution, Eric (as always!) - this is the reason, I appreciate this community / forum!!!

Happy to see, that this works in this particular scene.


Cheers
Marco

Offline andy.engelkemier

  • Sr. Member
  • ****
  • Posts: 391
Re: GI visibility workaround for clear objects
« Reply #9 on: March 11, 2019, 12:06:09 pm »
Yes, that's awesome. Thank you very much.
The experimental features Used to be a checkbox in preferences. This is also a shared machine. But, I'll enable them anyway. lol. Other people can deal.

And yes, I like that solution a bit better than how I'm achieving the shadows in my other post since that will work much better with things like transparent objects. I'm a big fan of control. Especially when the numbers actually mean something, rather than some arbitrary numbers.

Offline bdesign

  • Hero Member
  • *****
  • Posts: 795
Re: GI visibility workaround for clear objects
« Reply #10 on: March 11, 2019, 12:11:34 pm »
Quote
Great solution, Eric (as always!) - this is the reason, I appreciate this community / forum!!!

Happy to see, that this works in this particular scene.


Cheers
Marco

Thanks very much, Marco! I appreciate your appreciation :)

Cheers,
Eric

Offline bdesign

  • Hero Member
  • *****
  • Posts: 795
Re: GI visibility workaround for clear objects
« Reply #11 on: March 11, 2019, 12:13:32 pm »
Quote
Yes, that's awesome. Thank you very much.
The experimental features Used to be a checkbox in preferences. This is also a shared machine. But, I'll enable them anyway. lol. Other people can deal.

And yes, I like that solution a bit better than how I'm achieving the shadows in my other post since that will work much better with things like transparent objects. I'm a big fan of control. Especially when the numbers actually mean something, rather than some arbitrary numbers.

You're welcome, Andy. Hope it is helpful in your particular cases :)

Cheers,
Eric


Offline andy.engelkemier

  • Sr. Member
  • ****
  • Posts: 391
Re: GI visibility workaround for clear objects
« Reply #12 on: March 12, 2019, 12:26:55 pm »
Yes. Score. I just used it, and it even made render time faster because there's less to calculate. I May also have coincident surfaces. Not quite sure. But since the object isn't casting shadows, and not contributing to GI, no display issues.