KeyShot Forum

Technical discussions => Animation => Topic started by: Ryan Day on September 03, 2019, 02:06:30 pm

Title: Cutaway leaves witness marks on non-cut objects
Post by: Ryan Day on September 03, 2019, 02:06:30 pm
Trying to animate a cutaway cutting down into an object to show the interior. The interior objects are all exempt from the cutaway, but it leaves a witness mark where they intersect anyways. Is there any fix for this? It doesn't matter what type of caps are used; wherever the cutaway object surfaces intersects the non-cut objects there's a line across the surface of the non-cut object.
Title: Re: Cutaway leaves witness marks on non-cut objects
Post by: mattjgerard on September 04, 2019, 05:44:22 am
Screenshot? Usually its caused by weird geometry intersections.
Title: Re: Cutaway leaves witness marks on non-cut objects
Post by: Ryan Day on September 04, 2019, 08:54:32 am
Here's a small crop of the larger frame, can't really show much of this at the moment. You can see the black line across the mannequin; this line is where the cutaway body intersects the excluded object (the mannequin), and moves as the cutaway moves in the animation. This same line is present on all surfaces of the excluded bodies where they intersect the cutaway object. This happens irrespective of the type of cap used, the cutaway object is a solid body (or, rather, was in the CAD program before being converted to polygons on import).

These issues have turned what should have been a super quick animation into quite an ordeal, unfortunately.
Title: Re: Cutaway leaves witness marks on non-cut objects
Post by: mattjgerard on September 04, 2019, 09:40:38 am
What are the details of your scene, what lighting mode, HDR or pin lighting? Sure you aren't in preview mode? Does the color of the line change if you change the material of the cutaway object or the caps? Never seent this particular issue before
Title: Re: Cutaway leaves witness marks on non-cut objects
Post by: Eric Summers on September 04, 2019, 11:06:51 am
If you're using Interior Mode, try switching to Product Mode. However, there is a known issue related to shadows which is what it seems like you are encountering: https://luxion.atlassian.net/wiki/spaces/K8M/pages/415596607/Cutaway
Title: Re: Cutaway leaves witness marks on non-cut objects
Post by: Ryan Day on September 04, 2019, 03:14:54 pm
Thanks for the input, guys

What are the details of your scene, what lighting mode, HDR or pin lighting? Sure you aren't in preview mode? Does the color of the line change if you change the material of the cutaway object or the caps? Never seent this particular issue before

Shadow quality 1, ground illumination off, self shadows on, 8 ray bounces, global illumination on, caustics off, product lighting mode. This issue only appears when not in performance mode. HDR scene (studio). Changing the cap style/colour does not change anything about this witness mark.

However, the body being cutaway does intersect a couple other objects in the scene, and those objects display a witness mark across their surfaces where they intersect with the body that is being cutaway matching whatever cap style is selected. For this reason we're using no caps for the cutaway so we don't have those particular witness lines.

If you're using Interior Mode, try switching to Product Mode. However, there is a known issue related to shadows which is what it seems like you are encountering: https://luxion.atlassian.net/wiki/spaces/K8M/pages/415596607/Cutaway

Using product mode already. Would this be the "bad shadows on excluded objects" bug, then? The camera is not inside the cutaway object, so it's not that issue. I do notice the "improper reflections on excluded objects" bug in one spot but it's not especially noticeable.


I'm not a video editor, so I don't think I'd be able to competently composite multiple renders together in post (no idea where I'd even begin, really), and there's nearly 200 individual frames that would need to be edited manually to remove these witness marks.

The only other option I can think of right now is to animate an opacity map (is that possible?) - which I'd have to do on at least 7 different materials; maybe more. Is there any other workaround?
Title: Re: Cutaway leaves witness marks on non-cut objects
Post by: richardfunnell on September 04, 2019, 04:36:53 pm
Oh man, I fought with this same issue not long ago. Yes, you can definitely animate an opacity map to achieve a cutaway-ish effect on parts. I tend to use the color gradient for this (either planar, spherical, depending on the shape) to determine the hidden/visible portion, and animate the "Shift" value to get it to move in the animation. Works pretty well, just make sure to bump up your ray bounces. Once you have the right position/animation in the material graph, just copy/paste the selection into your other materials. Part vs. model texture centering becomes important here, so you may have to play with those (depending on your scene/hierarchy) to get the right position. Good luck!
Title: Re: Cutaway leaves witness marks on non-cut objects
Post by: Ryan Day on September 04, 2019, 05:12:10 pm
Oh man, I fought with this same issue not long ago. Yes, you can definitely animate an opacity map to achieve a cutaway-ish effect on parts. I tend to use the color gradient for this (either planar, spherical, depending on the shape) to determine the hidden/visible portion, and animate the "Shift" value to get it to move in the animation. Works pretty well, just make sure to bump up your ray bounces. Once you have the right position/animation in the material graph, just copy/paste the selection into your other materials. Part vs. model texture centering becomes important here, so you may have to play with those (depending on your scene/hierarchy) to get the right position. Good luck!

That's good to hear. I could set up that material animation quick enough to be usable. Now the next part; after my post I went to try out that method and I could only seem to connect the number fade to the "map" node on the colour gradient; how do I connect it to the shift input? I'm probably just being thick, here.
Title: Re: Cutaway leaves witness marks on non-cut objects
Post by: richardfunnell on September 04, 2019, 05:24:49 pm
If you drag a connector to the center of the node (not the input of the node), you should see a list of available inputs for that particular node. Really saves time and opens up lots of options for building graphs :)
Title: Re: Cutaway leaves witness marks on non-cut objects
Post by: Ryan Day on September 04, 2019, 05:34:04 pm
Ah! Thanks so much, I'd never have found that functionality on my own. Is the same possible with other types of nodes as well? (Dragging to the middle, I mean)
Title: Re: Cutaway leaves witness marks on non-cut objects
Post by: richardfunnell on September 04, 2019, 05:36:31 pm
Yes, you can try dragging to the center of any node, and it will show you what's allowed for that node. I also added a quick .BIP file for my example in case it's helpful for you or anyone else.
Title: Re: Cutaway leaves witness marks on non-cut objects
Post by: Ryan Day on September 04, 2019, 05:42:34 pm
Beauty. Thanks so much!
Title: Re: Cutaway leaves witness marks on non-cut objects
Post by: INNEO_MWo on September 06, 2019, 04:01:50 am
Do you tried to intersect the overall cutting material (body) with a smaller one (same material) that is slightly larger then the 3D person? The limitation of the cutting material (in case of intersecting cutting objects) should solve this issue?!
Title: Re: Cutaway leaves witness marks on non-cut objects
Post by: Ryan Day on September 06, 2019, 08:24:05 am
Do you tried to intersect the overall cutting material (body) with a smaller one (same material) that is slightly larger then the 3D person? The limitation of the cutting material (in case of intersecting cutting objects) should solve this issue?!

I'm not sure I follow; are you suggesting that a second cutaway object nested in the main cutaway object cancels out the bug?
Title: Re: Cutaway leaves witness marks on non-cut objects
Post by: INNEO_MWo on September 07, 2019, 03:53:57 am
The cutaway has several limitations described in the help.
The nested solution works only if nothing else intersects the boundaries of the inner objects.
So it might be workaround for some scenes?!


In this case, it helps as you can see in my attached example.


Cheers
Marco
Title: Re: Cutaway leaves witness marks on non-cut objects
Post by: Ryan Day on September 07, 2019, 08:07:49 am
Looking at your example file I think I can see how the cutaways cancel eachother out - that being said, on my end even without the nested object, I don't get any shadow issues or artifacts.


I'll keep that in mind for future projects, though. Thanks!