unity3d引擎引擎游戏怎么改人物生命值

限制级视频展示Unity引擎打造最真实的人物角色_
我的位置:>>>
限制级视频展示Unity引擎打造最真实的人物角色
发布时间: 14:15 () 作者:3DM新闻组-druiber 编辑:newtype2001
Lee Perry-Smith公布了一段视频,展示了Unity引擎打造的人物角色。屌爆了。Lee表示,这段视频展示了Unity引擎的在线3D全身扫描标准效果。
Lee Perry-Smith公布了一段视频,展示了Unity引擎打造的人物角色。屌爆了。Lee表示,这段视频展示了Unity引擎的在线3D全身扫描标准效果。视频中提供了不同的观看效果,单屏幕或者VR立体&Rift&模式,还可以实时开关自然光,模型,开启/隐藏某些模型和动画。这些人物模型是我们迄今为止见过最真实的模型。想象一下,几年以后,我们在电子游戏中看到的人物都是这样的。啊,已经等不及想快点长大了呢。警告,视频仅限成人观看。三维游戏引擎——Unity&角色模型优化要点
在和朋友制作游戏的过程中,经常有人问到角色模型应该怎么建才更符合Unity的需要。在此,我将Unity中关于的部分翻译如下,供参考。
我并不打算一句句照搬地进行翻译,而是基于自己对引擎的理解,采用我觉得更易于理解的方式来翻译。每段翻译上方附上英语原文,以便大家对照。有些内容若朋友们觉得翻译得不妥,欢迎给我留言。
Modeling Optimized Characters
角色优化建模
Use one Skinned Mesh Renderer
一个角色仅使用一个(后简称
Your character should use only a single . There is usually no reason to use multiple
meshes for a character. Unity also has optimizations related to
visibility culling and bounding volume updating which only kick in
if you use one
and one skinned mesh renderer in conjunction. If you
care about performance, multiple skinned meshes per character is
not an option. If you use two skinned mesh renderers for one
character instead of one, the time spent on rendering the character
will most likely double!
在Unity中您应该每个角色仅使用一个SkinedMeshRenderer来绘制。一般来说单个角色没必要用到两个或更多的网格(译者:此网格应理解为Unity中Render组件所使用的Mesh,该Mesh可以包含多个sub
mesh,各sub
mesh有自己的材质,但都用一个Render绘制)。而且,Unity在优化视景裁剪和更新角色包围体时,是基于仅有一个动画组件和一个SMR的假设的。所以,如果你追求性能,就不应该为一个角色使用多个SMR。如果你用了两个SMR,则时间消耗可能是用一个SMR的两倍!
Don't Use Many Materials
不要使用过多的材质
You also want to keep the number of
on that mesh as low as possible. There is only one reason why you
might want to have more than one material on the character: when
you need to use a different shader (e.g. if you want to use a
special shader for the eyes). However, 2-3 materials per character
should be sufficient in almost all cases. If your character is
carrying a gun, it might be useful to have the gun a separate
object, simply because it might get detached.
你还应该尽可能地减少角色所用材质的数量。你应该只有一个理由使用多个材质:那就是你想使用多个着色器(例如,你想为角色眼睛使用另外一个着色器)。但是,大多数情况下,每个角色2-3个材质就够了。如果你的角色还有一把枪,那你应该考虑把枪作为另外一个物体(而不是角色的一部分),因为它可以从角色身上拿走。(译者:如果装备不得不采用蒙皮技术来制作,那也可以采用脚本动态生成多材质SMR来实现换装,参见)
Reduce Amount of Bones
减少骨骼数量
Medium Desktop games use bone hierarchies with 15-60 bones. The
fewer bone with 30 bones you can achieve very
good quality on Desktop platforms and fairly good quality on Mobile
Platforms. Unless you really have to, we strongly recommend you use
fewer than 30 bones if you are developing for Mobile Platforms and
around 30 bones per character on Desktop platforms.
中型的PC游戏每个角色一般使用15-60个骨骼。骨骼越少,计算执行速度越快。一般用30个骨骼就可以在PC游戏中获得很好的表现效果,同时在手机平台上也如此。我们建议如果不是特别有需要的话,在手机平台上单角色的骨骼不要超过30个,在PC平台上也尽量只用30个左右的骨骼。
Polygon Count
三角片数量
How many polygons you should use depends on the quality you
require and the platform you are targeting. Anything between
300-1500 triangles on Mobile Platforms and 500-6000 triangles on
Desktop Platforms is reasonable. If you want lots of characters on
screen or want the game to run on old machines, you will have to
reduce the polygon count for each character. As an example: Half
Life 2 characters used
triangles per character. Next-gen
AAA games running on PS3 or Xbox 360 usually have characters with
triangles.
究竟用多少三角片取决于你所要求的细致程度和游戏运行的目标平台。一般手机上单角色200-1500,PC上500-6000个三角片都是合适的。如果你想同时显示很多个角色,或者想在较早的硬件平台上流畅运行,那么就需要再削减三角片数量。举个例子:半条命2
每个角色用个三角片,在PS3或者Xbox360上运行的下一代的AAA游戏一般每个角色三角片。
Separate Out IK and FK
将IK和FK分开
Separate out inverse kinematics (IK) and forward kinematics
(FK). When animations are imported, the IK nodes are baked into FK,
thus Unity doesn't need the IK nodes at all. You can either kill
the GameObjects in Unity or the nodes in the modelling tool. By
removing them, the IK nodes don't need to be animated every frame
anymore. For this reason it is a very bad idea to intermix IK and
FK hierarchies. Instead, you should create two hierarchies: one
strictly for IK and one for FK. This way you can very easily select
the whole IK hierarchy and delete it.
将IK和FK分开。当Unity导入模型动作时,IK节点会被烘焙成FK,因为Unity根本不需要IK节点。你可以在Uniy中将IK节点对应生成的GameObject删除,或者直接在建模工具(如maya、MAX等)中将IK节点删除后再导入。这样,Unity在绘制每帧时就不需要再考虑IK节点的动作了,由此提高了性能。所以,建模时将IK和FK混在一起可不是什么好主意。正确的做法是:你应该将IK和FK分成两组。这样删除的时候就非常方便。(译者:IK在导出时要先塌陷,采样精度最好是每帧都塌陷——不用担心,Unity导入时可以选择自动拟合——否则你会发现动作导入Unity后严重失真)
Use Reusable Rigs
创建可重用的Rig
Create a rig which you can reuse. This allows you to share
animations between different characters.
创建并使用可重用的rig。这样,你就可以将一套动作应用到不同的角色。(译者:基于骨骼设计动作,然后在骨骼上设计多套Mesh,就可以实现不同外貌的角色具有相同的动作。这个在游戏中提供用户自定义角色外貌时很有用。)
Name Bones Correctly
为骨骼取直观易懂的名字
Name the bones correctly (left hip, left ankle, left foot etc.).
Especially with characters, naming your bones correctly is very
important. For example if you want to turn a character into a
Ragdoll you will have to find the right bones for each body part.
If they are not named correctly, finding all the body parts will
take much longer.
为骨骼取上直观易懂的名字(例如左臀、左踝、右腿等等)。对于人物角色,为骨骼取个正确的名字尤其重要。举个例子:如果你要让一个角色进入纸娃娃(译者:一种靠物理引擎驱动的动作模型,常用于模拟人体与真实环境相互作用下的动作)状态,你就需要正确定位角色的各段骨骼。如果名字取得不好(例如
1、2、3之类的),程序兄弟写起脚本来就很费劲。
已投稿到:
以上网友发言只代表其个人观点,不代表新浪网的观点或立场。

我要回帖

更多关于 unity3d引擎架构设计 的文章

 

随机推荐