0
$\begingroup$

I have a character model where a good portion of the skin is covered by clothes. To prevent the skin from clipping through the clothes, I assign a transparent material to the areas that aren't supposed to be visible (I can't delete these areas, since the character has multiple outfits with varying lengths of sleeves/pants). I recently came up with the idea of using a mask modifier instead of a transparent shader for this purpose in order to get better performance. My question is: would this actually improve performance? I think the answer would be different in the viewport than in rendering, if this is the case, I'd like to know how it effects both.

$\endgroup$

1 Answer 1

1
$\begingroup$

A transparent material still costs vertex transformation, BVH calculation, and fill rate, so a mask modified mesh will have better performance. The difference between the two will probably not be large enough to notice.

Viewport vs. render doesn't matter-- a viewport is a render-- although you'll have slightly different costs depending on rendering engine (and a solid view is workbench, a mat view, Eevee, and a rendered preview, whatever you have set.) For example, only Cycles does BVH calculation, and fill rate is really a rasterizer (workbench or eevee) characteristic (as far as I understand it, I'm not a raytracing guru.)

$\endgroup$
2
  • $\begingroup$ When you say "vertex transformation" does that include modifiers? If a mask modifier prevents any modifier after it from effecting the masked area, It could save quite a bit of time (assuming the mask itself doesn't take too much time). $\endgroup$ Mar 26, 2021 at 20:46
  • $\begingroup$ "Vertex transformation" does not refer to modifiers, but yes, masked vertices do not need to be calculated by later modifiers, and this can save a large amount of time. Even a noticeable amount of time :) I was talking about the raw case of transparency vs masking without other modifiers, or wtih mask at the bottom of the stack, as otherwise, mask can affect the behavior of modifiers. $\endgroup$
    – Nathan
    Mar 26, 2021 at 21:09

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .