查看: 1838|回复: 1
打印 上一主题 下一主题

[Unity 组件参考手册]组件:效果之线渲染器

[复制链接]
.    

3797

主题

11

听众

5万

积分

首席设计师

Rank: 8Rank: 8

纳金币
32328
精华
41

活跃会员 优秀版主 荣誉管理 论坛元老

跳转到指定楼层
楼主
发表于 2013-2-4 16:50:29 |只看该作者 |倒序浏览
The Line Renderer takes an array of two or more points in 3D space and draws a straight line between each one. A single Line Renderer Component can thus be used to draw anything from a simple straight line, to a complex spiral. The line is always continuous; if you need to draw two or more completely separate lines, you should use multiple GameObjects, each with its own Line Renderer.

线渲染器(Line Renderer)有一个包含两个或更多3D空间中点的数组并在每两个点之间绘制平直的线。一个单独的线渲染器(Line Renderer)组件因此可以用来绘制任何东西,从一条简单的平直线到一条复杂的螺旋线。这些线一直是连续的;如果你需要绘制两条或更多完全间断的线,你需要使用多个游戏物体(GameObject),每一个都带有它们自己的线渲染器(Line Renderer)。

The Line Renderer does not render one pixel thin lines. It renders billboard lines that have width and can be textured. It uses the same algorithm for line rendering as the Trail Renderer.

线渲染器(Line Renderer)并不渲染一个像素宽的线。它渲染有宽度并可以被赋予贴图的告示板线。它使用与拖尾渲染器(TrailRenderer)相同的线渲染算法。


The Line Renderer Inspector 线渲染器检视面板

[Properties 属性]
---------------------------------------------------------------------------------
    Materials 材质
    The first material from this list is used to render the lines.
    这个列表的第一个材质用于渲染这些线
    Positions 定位
    Array of Vector3 points to connect.
    用于连接Vector3类型点的数组
    Size 大小
    The number of segments in this line. 这条线中的段数
    Parameters 参数
    List of parameters for each line: 每一条线的参数列表
    StartWidth 开始宽度
    Width at the first line position. 线的第一个位置处的宽度
    EndWidth 结束宽度
    Width at the last line position. 线的最后一个位置的宽度
    Start Color 开始颜色
    Color at the first line position. 线的第一个位置的颜色
    End Color 结束颜色
    Color at the last line position. 线的最后一个位置的颜色
    Use World Space 使用世界坐标
    If enabled, the object's position is ignored, and the lines are rendered around world origin.
    如果设置为允许,物体的位置被忽略,并且相对于世界原点来渲染线

[Details 细节]
---------------------------------------------------------------------------------
To create a line renderer:

来创建一个线渲染器(Line Renderer):

    Choose GameObject->Create Empty
    选择菜单GameObject->Create Empty
    Choose Component->Miscellaneous->Line Renderer
    选择菜单Component->Miscellaneous->Line Renderer
    Drag a texture or Material on the Line Renderer. It looks best if you use a particle shader in the Material.
    拖拽一个贴图或者材质(Material)到线渲染器(Line Renderer)上。如果你在这个材质上使用一个粒子着色器会看上去非常好

[Hints 提示]
---------------------------------------------------------------------------------
    Line Renderers are good to use for effects when you need to lay out all the vertices in one frame.
    当你需要显示出一帧内所有的顶点时线渲染器(Line Renderer)用起来很好
    The lines may seem to rotate as you move the Camera. This is intentional.
    当你移动摄像机(Camera)的时候这些线可能看上去在旋转。这是故意如此的
    The Line Renderer should be the only Renderer on a GameObject.
    线渲染器(Line Render)应该是一个游戏物体(GameObject)上唯一的渲染器
【来源:互联网】
更多精彩教程,尽在web3D纳金网http://www.narkii.com/college/
分享到: QQ好友和群QQ好友和群 腾讯微博腾讯微博 腾讯朋友腾讯朋友 微信微信
转播转播0 分享淘帖0 收藏收藏0 支持支持0 反对反对0
回复

使用道具 举报

nts    

3

主题

1

听众

743

积分

初级设计师

Rank: 3Rank: 3

纳金币
7
精华
0

最佳新人 活跃会员 热心会员 灌水之王 突出贡献

沙发
发表于 2013-10-20 12:52:38 |只看该作者
线渲染器(Line Renderer)有一个包含两个或更多3D空间中点的数组并在每两个点之间绘制平直的线。一个单独的线渲染器(Line Renderer)组件因此可以用来绘制任何东西,从一条简单的平直线到一条复杂的螺旋线。这些线一直是连续的;如果你需要绘制两条或更多完全间断的线,你需要使用多个游戏物体(GameObject),每一个都带有它们自己的线渲染器(Line Renderer)。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

关闭

站长推荐上一条 /1 下一条

手机版|纳金网 ( 闽ICP备08008928号

GMT+8, 2024-5-6 12:42 , Processed in 0.086842 second(s), 32 queries .

Powered by Discuz!-创意设计 X2.5

© 2008-2019 Narkii Inc.

回顶部