GI visibility workaround for clear objects

Started by andy.engelkemier, March 08, 2019, 01:34:12 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

andy.engelkemier

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.

INNEO_MWo

(I just reply to follow this interesting entry - and post my thoughts if I can add some solution)


Cheers
Marco

andy.engelkemier

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.

bdesign

#3
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

Eugen Fetsch

Uuuuhhhh ... this is awesome  :o. Thanks for sharing Eric!!!

bdesign


DriesV

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

bdesign

Thanks very much, Dries! Is the "Visible GI" option currently not functioning?

Cheers,
Eric

INNEO_MWo

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

andy.engelkemier

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.

bdesign

QuoteGreat 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

bdesign

QuoteYes, 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


andy.engelkemier

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.