朱峰社區(qū)首頁 朱峰社區(qū)

搜索資源 注冊|登陸

等待

返回 展開菜單
按功能 按軟件

unity3d視頻教程

unity3d視頻教程

包含11節(jié)視頻教程

從零基礎(chǔ)學(xué)習(xí)unity3d游戲引擎,簡單易學(xué)的視頻教程,讓你快速掌握unity3d,并喜歡上游戲開發(fā)的樂趣。

關(guān)閉

Unity組件:Flare 眩光 耀斑

關(guān)注:1830 留言:0 樓主:duoduo2015 發(fā)帖時(shí)間:15年11月16日

duoduo2015

普通會員

duoduo2015

社區(qū)新人:1級

關(guān)注2313人

  • 積分

    1

  • 登陸

    1

  • 發(fā)帖

    1

  • 作品

    2

間隔線

Flare objects are the source assets that are used by Lens Flare Components. The Flare itself is a combination of a texture file and specific information that determines how the Flare behaves. Then when you want to use the Flare in a Scene, you reference the specific Flare from inside a LensFlare Component attached to a GameObject.

眩光(Flare?)對象是被鏡頭光暈組件(?Lens Flare Components)使用的源資源。眩光本身是一個(gè)紋理文件和具體的信息的結(jié)合,確定眩光的行為。然后,當(dāng)你想在一個(gè)場景中使用眩光,將帶有鏡頭暈光組件(LensFlare?Component)的具體眩光貼到一個(gè)游戲物體。

There are some sample Flares in the Standard Assets package. If you want to add one of these to your scene, attach a Lens Flare Component to a GameObject, and drag the Flare you want to use into the Flare property of the Lens Flare, just like assigning a Material to a Mesh Renderer.

在標(biāo)準(zhǔn)資源包(Standard Assets?package)中有一些樣品耀斑。如果您要添加其中之一到你的場景,將鏡頭光暈(Lens Flare)組件貼到一個(gè)游戲物體上,并拖動你要使用到鏡頭光暈的耀斑屬性的耀斑,就像給網(wǎng)格渲染器(?Mesh Renderer)指派一個(gè)材質(zhì)(Material?)一樣。

耀斑檢視面板
The Flare Inspector 耀斑檢視面板

Flares work by containing several Flare Elements on a single Texture. Within the Flare, you pick & choose which Elements you want to include from any of the Textures.

耀斑在一個(gè)紋理中包含幾個(gè)耀斑元素(Elements?)。你可以挑選和選擇要包含紋理的哪些元素。

Properties 屬性
  • Elements 元素
    The number of Flare images included in the Flare.
    包括在耀斑中的耀斑圖像的數(shù)量
  • Image Index
    圖像索引
    Which Flare image to use from the Flare Texture for this Element. See the Flare Textures section below for more information.
    該元素的耀斑紋理(?Flare Texture?)使用哪一個(gè)耀斑圖像。耀斑紋理(Flare Textures?)更多信息,見下面一節(jié)。
  • Position 位置
    The Element's offset along a line running from the containing GameObject's position through the screen center. 0 = GameObject position, 1 = screen center.
    包含游戲物體的位置到屏幕中心位置上的元素偏移量。?0 =游戲物體的位置,1=屏幕的中心。
  • Size 大小
    The size of the element. 元素的大小
  • Color 顏色
    Color tint of the element. 元素的色調(diào)
  • Use Light Color 使用光顏色
    If the Flare is attached to a Light, enabling this will tint the Flare with the Light's color.
    如果耀斑貼到到一個(gè)燈光上,啟用它為耀斑填上光的顏色。
  • Rotate 旋轉(zhuǎn)
    If enabled, bottom of the Element will always face the center of the screen, making the Element spin as the Lens Flare moves around on the screen.
    如果啟用,元素底部將始終面對著屏幕的中心,使元素旋轉(zhuǎn)同時(shí)鏡頭光暈在屏幕上移動。
  • Zoom 變焦
    If enabled, the Element will scale up when it becomes visible and scale down again when it isn't.
    如果啟用,元素當(dāng)它可見時(shí)變大和當(dāng)它不可見時(shí)縮小。
  • Fade 淡出
    If enabled, the Element will fade in to full strength when it becomes visible and fade out when it isn't.
    如果啟用,元素當(dāng)它可見時(shí)淡入大和當(dāng)它不可見時(shí)淡出。
  • Flare Texture
    耀斑紋理
    A texture containing images used by this Flare's Elements. It must be arranged according to one of the TextureLayout options.
    包含用于耀斑元素的圖像的紋理。必須安排的紋理布局(TextureLayout?)選項(xiàng)之一。
  • Texture Layout
    紋理布局
    How the individual Flare Element images are laid out inside the Flare Texture.
    單個(gè)耀斑元素的圖像在耀斑紋理內(nèi)部如何布局。
  • Use Fog 使用霧
    If enabled, the Flare will fade away with distance fog. This is used commonly for small Flares.
    如果啟用,耀斑將隨著遠(yuǎn)處霧淡出。常用于小耀斑。
Details 細(xì)節(jié)

A Flare consists of multiple Elements, arranged along a line. The line is calculated by comparing the position of the GameObject containing the Lens Flare to the center of the screen. The line extends beyond the containing GameObject and the screen center. All Flare Elements are strung out on this line.

耀斑由沿直線排列的多個(gè)元素(Elements)組成。這條線是通過比較包含鏡頭光暈游戲物體的位置到屏幕中心的位置計(jì)算。這條線穿過包含的游戲物體和屏幕的中心進(jìn)行延伸。所有耀斑元素在這條線上串起。

Flare Textures 耀斑紋理

For performance reasons, all Elements of one Flare must share the same Texture. This Texture contains a collection of the different images that are available as Elements in a single Flare. The Texture Layout defines how the Elements are laid out in the Flare Texture.

出于性能方面的原因,耀斑的所有元素都必須共享相同的紋理。這紋理包含可作為在一個(gè)單一耀斑元素的不同圖像的集合。紋理布局(?Texture Layout?)決定了元素(Elements?)是如何在耀斑紋理(Flare Texture)進(jìn)行布局。

Texture Layouts 紋理布局

These are the options you have for different Flare Texture Layouts. The numbers in the images correspond to the Image Index property for each Element.

這些決定不同的耀斑紋理布局(Texture Layouts.)的選項(xiàng)。在圖像中的數(shù)字對應(yīng)每個(gè)元素的圖像索引屬性。

  • 1 Large 4 Small
    1大4小
    1大4小
    Designed for large sun-style Flares where you need one of the Elements to have a higher fidelity than the others. This is designed to be used with Textures that are twice as high as they are wide.
    設(shè)計(jì)用于較大太陽類型的耀斑,需要有比其他更高清晰度的元素。使用的紋理高是寬的2兩倍。
  • 1 Large 2 Medium 8 Small
    1大2中8小
    1大2中8小
    Designed for complex flares that require 1 high-definition, 2 medium & 8 small images. This is used in the standard assets "50mm Zoom Flare" where the two medium Elements are the rainbow-colored circles. This is designed to be used with textures that are twice as high as they are wide.
    設(shè)計(jì)用于復(fù)雜的耀斑,1個(gè)高清晰,2個(gè)中等,8個(gè)小圖像。這個(gè)用于標(biāo)準(zhǔn)的50mm變焦眩光資源,其中2個(gè)中等元素是彩虹光圈。使用的紋理高是寬的2兩倍。
  • 1 Texture
    單一紋理
    單一紋理
    A single image. 一個(gè)單一圖像。
  • 2x2 grid
    2x2網(wǎng)格
    2x2網(wǎng)格
    A simple 2x2 grid. 一個(gè)簡單的2x2網(wǎng)格
  • 3x3 grid
    3x3網(wǎng)格
    3x3網(wǎng)格
    A simple 3x3 grid. 一個(gè)簡單的3x3網(wǎng)格
  • 4x4 grid
    4x4網(wǎng)格
    4x4網(wǎng)格
    A simple 4x4 grid. 一個(gè)簡單的4x4網(wǎng)格
Hints 提示
  • If you use many different Flares, using a single Flare Texture that contains all the Elements will give you best rendering performance.
    如果你使用了許多不同的耀斑,使用單一耀斑紋理(Flare Texture)去包含所有元素(Elements?),這會給你帶來最好的渲染性能。
  • Lens Flares are blocked by Colliders. A Collider in-between the Flare GameObject and the Camera will hide the Flare, even if the Collider does not have a Mesh Renderer.
    鏡頭光暈被碰撞器(Colliders)阻擋。一個(gè)在耀斑游戲物體和相機(jī)之間的碰撞器,這會把耀斑隱藏掉,即使碰撞器沒有網(wǎng)格渲染器(Mesh Renderer.)。

贊0 踩0

未知用戶

2005-2025 朱峰社區(qū) 版權(quán)所有 遼ICP備2021001865號-1
2005-2025 ZhuFeng Community All Rights Reserved

VIP

朱峰社區(qū)微信公眾號

回頂部

1.復(fù)制文本發(fā)給您的QQ好友或群、微信等;好友點(diǎn)擊鏈接以后,轉(zhuǎn)發(fā)就成功了。 2.如朋友點(diǎn)擊您的鏈接,您需要需刷新一下才行;同一個(gè)好友僅能點(diǎn)擊一次。
購買VIP,觀看所有收費(fèi)教程!!