how to get floor reflections - no shadow

Started by andy.engelkemier, April 09, 2019, 01:30:41 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

andy.engelkemier

It seems Most of the keyshot users are rendering for final output in Photoshop. So this might seem a little off, but it's definitely what I'm after, so lets see how close we can get.

disclaimer: render layers are great, but if you look Really close, you get a halo of half missing pixels. So, not great for final production in this case.

I need 3 layers:
     -Final render
     -Ground reflection
     -Ground shadow

The final render, of course, may consist of several different composite layers. But when I hand off the final files for people to add to graphics, they need the final render, the reflection, and shadow as separate files. Illustrator won't read that you've used the shadow layer as multiply, and won't read what you might have done for your reflection layer either.

So then there's the problem. It's already a lot of work for shadows, because your shadows aren't black unless you render on black background, but it doesn't get sampled properly if it's rendered on black. So you pretty much Have to render your shadows on white. I've got a workflow for that, and although it's annoying and I wish Keyshot just had a tool for saying, "give me a ground shadow all by itself" that's fine.
And when I say Just the ground shadow, I mean not just clipping the edge of the shadow. It needs to go clear under the product.

"What's this halo thing your talking about Andy?"
I'm glad you asked. There's an easy way to check that out, completely outside of Keyshot!
Create yourself a photoshop file, 1200 square. Make the background white. Create a new layer, and make that red. Now make a big selection at an angle and select about half of it. Hit Ctrl+J to duplicate that to a new layer. Make that same selection again by holding Ctrl (option on mac?) and clicking on the thumbnail. Invert the selection (Ctrl+Shift+i), and create a layer mask, or hit ctl+J again and just delete the solid layer.
Looks fine? Maybe, zoom in to 200% just to be sure.
OH NO!

This is what happens with Render Layers in Keyshot. So the best practice is to always keep your full render underneath the render layers to keep those half transparent pixels hidden.

So shadows? Well, that's a problem. Because your shadow IS transparent. So you'll get this nice little halo between your product, and the shadow. This is why I don't use render layers for shadows or reflections.

OK - back to the issue: You can render the product, and you can render the shadows by themselves by applying an emissive material to everything and making it invisible to camera. This trick has been around for some time now. You just have to jack up your refraction rays quite a bit first. No problem.
But the reflection? This is more tricky.

There are a few options, but I've not been thrilled with any of them.
You can get a reflection without a shadow, if you render with the environment reflection. But the limitation there is you can only get a crisp reflection.
If you add a ground plane you can get a reflection with blurry reflections, but you can't render without a shadow. You can change the color of the shadow to white, but that just literally changes the shadow color to white, it's not shadow intensity.

So the best I've found, if you need blurry reflections, is to render on black background, with black shadow as a separate pass. Now, you still have the "halo" issue because you can't get reflections under the product, but it's not a Huge issue for reflections. I have a way to fix that in post for reflections.

The problem? Transparency. If you want that, and blurry reflections, you'll have to render a second pass. You can render your entire object as flat white, with the reflection plane and a black environment with no lights. This way you get a selection of just your object, and the blurry reflection. This is the same method use for creating selections when you render with DOF active. It's also the reason I do my best to Not render with DOF active.
I do the same thing to get transparency through objects. Just do a second render with something like a flat green plane in the background (use a color that isn't likely to be in your product) and use color selection to create a mask. It isn't entirely accurate, but if it looks believable, then no one will know.

If it looks good, it is good. But I'd sure like to keep my time down. I'm a consultant. Realstically everyone works hourly, but people see costs and think of how much it is per image. That also means, if I can be twice as fast as "the next guy" then I'm either making more money, or delivering better quality.

If you folks have some advice on how to achieve the ground reflections, blurred, in a more efficient way, I'm all ears.
And if the Luxion folks see this, and are able to disable ground shadows on the ground plane? Well, that would be super.

Esben Oxholm

Hi Andy.

If I enable experimental features, add the 'ray mask' node to the opacity of the material and uncheck 'show front',  'visible camera' and 'visible shadow', I think I get the same results with reflections as you do with the emissive material trick for shadows.

Not sure if it's useful for your specific purpose or how it works when rendering the image. This is literally the first time I do this.

Hope it works, although having ways to outputting transparent shadows and reflection without workarounds like this would be nice :)

andy.engelkemier

Yes! Thanks Esben.

I can just create a multi material for every material I create, and have that as an option.

That's killer.

Hopefully Keyshot just gets some of these things built in, eventually. But for now, this works.
I still have to deal with the environment being visible in the reflections on that as well, but that's not terrible to deal with.

Esben Oxholm

Quote from: andy.engelkemier on April 10, 2019, 07:20:43 AM
Yes! Thanks Esben.

I can just create a multi material for every material I create, and have that as an option.

That's killer.

Hopefully Keyshot just gets some of these things built in, eventually. But for now, this works.
I still have to deal with the environment being visible in the reflections on that as well, but that's not terrible to deal with.

Awesome, that's great to hear. Learned something new myself :)

richardfunnell


TGS808

And that, Esben, is why you... are the master. :)

Esben Oxholm


andy.engelkemier

OH NO! I spoke too soon.

The ray mask is a little odd. I'm not sure what the back/front actually means. Disabling back hides the faces that are hit first? I'm not quite sure why that would be named that way. And it would be Much more useful to have one check for reflection and one for refraction. It appears to me, that you are Only disabling reflection, but not refraction.

Well, the downside to that? this solution only works for a Single object, with no visible object behind it. Perfect for a primitive, but as soon as you have objects behind other objects, or inside objects? Well, it no longer works.

I've put together a basic test file. I created a box, with some boxes and a plane inside it. I haphazardly added a few materials on it. I was just trying to replicate why my project wasn't working at all. I've moved the big box to the side a bit, so you get some inner and outer things going on. Well, you'll see why it doesn't work.

I'd take a screengrab, but I don't have keyshot on my computer, and a coworker already hopped on that machine. I only kick them off if it's billable work.
I wish I had it, but it's not the best computer to have keyshot on, so it'd be a waste of money. That's the main reason you'll rarely see test renders, or just fun stuff from me. I can't take it home! Too bad there isn't a permanent trial that only allowed you to save files directly to keyshot servers or something. That'd be a way to keep the community sharing, students using it, and people playing with it, but businesses would still pay for it because of privacy. Well, and doing business work on a "free" version is generally not legal. I just wanted to throw that out there. It's something I've been thinking about. I'd Love a copy just to play with making advanced procedural materials. If I wanted them at work, I'd have to share them with the world first since you could only save to the community. So doing something like that would benefit the community.