• Editor
  • Spine在Unity里怎么制作实时光照。

  • Đã chỉnh sửa
Related Discussions
...

Spine导出的资源,怎么在unity中制作实时光照,影子跟随人做动作,影子跟随光照的变化而变化。

使用 "SkeletonAnimation "或 "SkeletonMecanim "组件实例化的骨架将默认在3D对象上投下阴影。请注意,它们不会对2D物体投射阴影。

在一个例子场景Spine Examples/Other Examples/Sprite Shaders中,你可以看到两个Spine gameObjects (stretchyman)为3D gameObjects投下阴影。
另外,角色使用了Spine/Sprite/Vertex Lit着色器与法线贴图,这样角色的纹理本身就会受到照明的影响。如果你想让你的Spine角色接受每个像素的实时阴影,你需要使用Pixel lit着色器,它是Vertex Lit的一个变体。关于着色器的更多信息,请参见文档:http://esotericsoftware.com/spine-unity#Shaders


Skeletons instantiated using SkeletonAnimation or SkeletonMecanim components will cast shadows on 3D objects by default. Please note they do not cast shadows on 2D objects.

In an example scene Spine Examples/Other Examples/Sprite Shaders, you can see two Spine gameObjects (stretchyman) cast shadow for 3D gameObjects.
Also, the characters use the Spine/Sprite/Vertex Lit shader with a normal map so that the character's texture itself is affected by lighting. If you want your Spine character to receive per-pixel realtime shadows, you need to use the Pixel lit shader, which is a variant of Vertex Lit. For more information on shaders, please see the documentation: spine-unity Runtime Documentation: Shaders