ios - How to exclude model's shadows on itself? -
i have scnlight
type scnlighttypedirectional
. when scene rendered, model casts shadows on , wasn't expectation. how exclude model's shadows on itself?
or how smooth shadows edge? looks unnatural now.
well, find simple way achieve loss material details.
change light model of material scnlightingmodelconstant
, exclude model lighting calculation of scnlight
.
1. set light model
scnlightingmodelconstant
consider ambient light shading, need ambient lights keep model visible.
model.geometry.materials.firstobject.lightingmodelname = scnlightingmodelconstant;
2. set category bit mask of model , lights
model.categorybitmask = 1; directionallight.categorybitmask = ~1ul;
if results of bitwise , of categorybitmask
zero, node not take consideration light illumination, there no self-shadows anymore. shadows model casted still remain in scene.
Comments
Post a Comment