unity可视化着色器_着色器图简介:使用可视编辑器构建着色器

unity可视化着色器

Unity 2018.1 brings new levels of control and flexibility. One of the coolest features coming in 2018.1 is Shader Graph. Whether you’re a beginner or a pro, it helps you create a range of shaders; flowing lava, gooey slime mound, beautiful lakes, flashing LEDs, and more!

Unity 2018.1带来了新的控制和灵活性级别。 Shader Graph是2018.1中最酷的功能之一。 无论您是初学者还是专业人士,它都可以帮助您创建一系列着色器。 流动的熔岩,黏糊糊的土墩,美丽的湖泊,闪烁的LED等!

A Shader Graph enables you to build your shaders visually. Instead of hand writing code you create and connect nodes in a graph network. You can do things like:

着色器图使您可以直观地构建着色器。 您可以在图形网络中创建并连接节点,而无需手写代码。 您可以执行以下操作:

    The graph framework gives instant feedback on the changes, and it’s simple enough that new users can become involved in shader creation.

    图形框架可立即提供有关更改的反馈,而且非常简单,新用户即可参与着色器的创建。

    The Shader Graph is now available in beta! To get started, download the sample project, open it with Unity 2018.1 beta, and start exploring. You can also get Shader Graph via the Package Manager.

    着色器图现已提供beta版! 首先,下载示例项目,使用Unity 2018.1 beta打开它,然后开始探索。 您也可以通过Package Manager获取Shader Graph。

    Shader Graph is designed to work with another Unity 2018.1 feature: Scriptable Render Pipeline (SRP). Therefore, you can’t use it with the Built-In Unity Renderer. It will come with support for:

    Shader Graph旨在与Unity 2018.1的另一个功能配合使用: 可脚本化渲染管道 (SRP)。 因此,您不能将其与内置Unity Renderer一起使用。 它将支持:

      You will also be able to extend the system to export shaders for any custom SRP you write.

      您还可以扩展系统以导出您编写的任何自定义SRP的着色器。

      如何创建着色器图? (How do you create Shader Graphs?)

      In Unity 2018.1, a Shader Graph appears as a normal shader. To create a Shader Graph you click the Create menu, and select ‘Shader Graph’ from the dropdown. This will create a Shader Graph asset in the project. You can double click on the asset or select the Open Graph button to bring up the Shader Graph Edit window.

      在Unity 2018.1中,着色器图显示为普通着色器。 要创建着色器图,请单击“创建”菜单,然后从下拉列表中选择“着色器图”。 这将在项目中创建一个Shader Graph资产。 您可以双击资产或选择“打开图形”按钮以调出“着色器图形编辑”窗口。

      When you open the Shader Graph you start with the ‘Master Node’. You connect nodes into the Master Node to create the look of your surface. To learn more about the underlying material models check out the existing Unity Standard Shader documentation.

      打开“明暗器图形”时,从“主节点”开始。 您可以将节点连接到主节点中,以创建曲面外观。 要了解有关基础材料模型的更多信息,请查看现有的Unity Standard Shader文档。

      You can quickly edit your surface by changing the default values! But, you know what’s even more exciting? Adding textures and other complex interactions. To add a node simply right click and select ‘Create Node’.

      您可以通过更改默认值来快速编辑表面! 但是,您知道还有什么更令人兴奋的吗? 添加纹理和其他复杂的交互。 要添加节点,只需右键单击并选择“创建节点”。

      Each included Shader Graph node has a number of inputs, we’ve included default values that you can customize however you like.

      每个包含的“ Shader Graph”节点都有许多输入,我们包含了可根据需要自定义的默认值。

      Adding in a texture (or other assets) is also really easy, just create a node of that asset type and connect it!

      添加纹理(或其他资产)也非常容易,只需创建该资产类型的节点并将其连接即可!

      Your Shader Graph shader is just like a normal shader in Unity. Right click on any object in the Inspector and choose Create Material. You can create multiple materials from the same shader.

      您的Shader Graph着色器就像Unity中的普通着色器一样。 右键单击检查器中的任何对象,然后选择“创建材料”。 您可以从同一着色器创建多种材质。

      You can easily expose parameters in your shader so they can be overwritten in each material you create from your shader. In the Shader Graph, right lick on any variable node and select ‘Convert to Property’. These exposed parameters appear in the material inspector for each material you create from your shader.

      您可以轻松地在着色器中公开参数,以便在您从着色器创建的每种材质中都可以覆盖它们。 在“明暗器图形”中,右键单击任何变量节点,然后选择“转换为属性”。 这些暴露的参数将显示在材质检查器中,用于您从着色器创建的每种材质。

      我想要更多的教程! (I want more tutorials!)

      We’re hosting a live training session on the Shader Graph on March 7! Register for it on our Events page and follow our Twitter and YouTube for a recording of the session. If you’re going to GDC, you can look forward to a number of Shader Graph related talks, sign up here for updates.

      我们将于3月7日在Shader Graph上进行现场培训在我们的活动页面上进行注册,然后关注我们的TwitterYouTube ,以记录会议记录。 如果您要参加GDC,可以期待许多有关Shader Graph的讲座,请在此处注册以进行更新。

      We also highly recommend that you check out and learn from Andy Touch’s Shader Graph Example Library on GitHub!

      我们还强烈建议您检查并从GitHub上的 Andy Touch的Shader Graph示例库中学习!

      我有问题! (I have questions!)

      Excellent! We are happy to answer them. Please come talk to us on this forum thread, and we will help you out there.

      优秀的! 我们很乐意回答他们。 请通过这个论坛主题与我们联系,我们将为您提供帮助。

      翻译自: https://blogs.unity3d.com/2018/02/27/introduction-to-shader-graph-build-your-shaders-with-a-visual-editor/

      unity可视化着色器

      • 0
        点赞
      • 0
        收藏
        觉得还不错? 一键收藏
      • 0
        评论
      Unity 对话编辑器是一种强大的工具,用于创建游戏中的角色对话和交互。它提供了一个可的界面,使开发者能够轻松地设计和管理对话内容。 Unity 对话编辑器的主要功能包括创建对话流程、添加对话内容和选择角色的行为。在对话流程中,开发者可以设置不同的对话节点,并通过连接这些节点来构建对话的逻辑流程。在每个对话节点中,可以添加对话内容,包括对话文本、语音、片等,以丰富玩家的游戏体验。此外,开发者还可以为角色设置不同的行为,例如动画、特效和触发条件,以增加对话的互动性。 使用 Unity 对话编辑器,开发者可以方便地对对话内容进行管理和修改。通过可的界面,可以直观地编辑和组织对话的结构和内容。同时,对话编辑器还支持多语言翻译和本地,开发者可以在同一个工具中管理不同语言的对话文本,为不同地区的玩家提供更好的游戏体验。 Unity 对话编辑器的优势在于它与 Unity 强大的游戏开发生态系统的集成。与 Unity 其他组件和工具的无缝结合,开发者可以更加高效地创建和实现游戏中的对话和交互。此外,Unity 的大量资源和社区支持也为开发者提供了丰富的对话编辑器扩展和教程,使其更易于上手和使用。 总而言之,Unity 对话编辑器是一项重要的游戏开发工具,它为开发者提供了创建和管理游戏中角色对话的便捷方式。通过可的界面和灵活的功能,它能够帮助开发者实现丰富多样的对话内容和交互体验,提升游戏的质量和吸引力。

      “相关推荐”对你有帮助么?

      • 非常没帮助
      • 没帮助
      • 一般
      • 有帮助
      • 非常有帮助
      提交
      评论
      添加红包

      请填写红包祝福语或标题

      红包个数最小为10个

      红包金额最低5元

      当前余额3.43前往充值 >
      需支付:10.00
      成就一亿技术人!
      领取后你会自动成为博主和红包主的粉丝 规则
      hope_wisdom
      发出的红包
      实付
      使用余额支付
      点击重新获取
      扫码支付
      钱包余额 0

      抵扣说明:

      1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
      2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

      余额充值