unity 构建迷宫

GameDraw is a 3D modeling extension for Unity developed by Mixed Dimensions that reduces the time you use on switching back and forth between a modeling program and Unity.GameDraw provides the ability to model, edit, optimize meshes, and easily convert textures to meshes, right inside the Unity Editor!

GameDraw是由 Mixed Dimensions 开发的Unity的3D建模扩展 ,可减少您在建模程序和Unity之间来回切换的时间.GameDraw提供了建模,编辑,优化网格以及轻松将纹理转换为网格的功能。在Unity编辑器中!

Among the great features GameDraw provides:

GameDraw提供的出色功能包括:

安装 (Installation)

Once you download GameDraw from the Asset Store, Unity’s mesh filter editor gets automatically updated with all the options from GameDraw. Six tabs are immediately visible in the Inspector to give you fast access to GameDraw’s features.

从Asset Store下载GameDraw之后,Unity的网格过滤器编辑器会使用GameDraw中的所有选项自动更新。 在检查器中可以立即看到六个选项卡,以便您快速访问GameDraw的功能。

迷宫级别 (The maze level)

In this tutorial we’ll create a level in which you must traverse a maze from a starting point to a small house on the other side. All models will be created with GameDraw within Unity! We’ll be using the 2D to 3D feature, which allows you to proceed from tracing an image into a mesh, to creating the maze itself, and then we’ll model the house using the editing capabilities within GameDraw. Here’s the map for this level:.

在本教程中,我们将创建一个关卡,您必须在该关卡中从起点到另一边的一所小房子。 所有模型都将在Unity中使用GameDraw创建! 我们将使用2D到3D功能,该功能使您可以从将图像跟踪到网格中,创建迷宫本身,然后使用GameDraw中的编辑功能为房屋建模。 这是此级别的地图:

从图像生成迷宫模型 (Generating the maze model from an image)

One of the unique features of GameDraw is the ability to directly trace an image into a mesh. This is what we will use to get the maze model up and running within seconds, without even moving a single vertex from its location.

GameDraw的独特功能之一是能够直接将图像跟踪到网格中。 这就是我们将用来在几秒钟内启动并运行迷宫模型的方法,甚至不需要从其位置移动单个顶点。

First, we need to import the image that we want to turn into a mesh. You can download that imageright here. Once that’s done, we simply use any Game Object with a mesh filter to access GameDraw. From GameDraw, we select Create->Utilities->2Dto3D, then we click on Create new 2D element. A save dialog will appear, so choose any name, select a location for the element, and click Save.

首先,我们需要导入要变成网格的图像。 您可以在此处下载该图像。 完成后,我们只需使用带有网格过滤器的任何Game Object即可访问GameDraw。 从GameDraw中,选择Create-> Utilities-> 2Dto3D ,然后单击Create new 2D element 。 将出现一个保存对话框,因此选择任何名称,为元素选择一个位置,然后单击“ 保存”

Once you save the file, you’ll have more options to choose from. Click on the new window which appears, as demonstrated below. We’ll select the image we want to trace in the texture slot and click on Trace. You should see small points on the edges of the image. If there’s something wrong and you see missing points or improperly positioned points, play around with the settings until you are satisfied with the result and close the window afterward.

保存文件后,您将有更多选择。 单击出现的新窗口,如下所示。 我们将在纹理插槽中选择要跟踪的图像,然后单击“ 跟踪” 。 您应该在图像边缘看到小点。 如果出了点问题,而您发现缺少的点或位置不正确的点,请尝试设置,直到对结果满意为止,然后关闭窗口。

When you close the window you’ll be able to generate a mesh from the 2D element. You can replace the current mesh by toggling Replace Mesh; generate different parts as Game Objects by toggling Generate as Children, and merge sub meshes to get a single material.

关闭窗口时,您将能够从2D元素生成网格。 您可以通过切换“ 替换网格”来替换当前网 ; 通过切换“生成为子代”来生成不同的部分作为游戏对象,并合并子网格以获得单个材质。

In GameDraw, you’ll find construction types such as Layers2D to generate flat surfaces andLayers3D to generate extruded surfaces. However, you’ll first need to set up an extrusion.

在GameDraw中,您将找到诸如Layers2D的生成类型来生成平坦表面,以及Layers3D的生成类型来生成拉伸表面。 但是,您首先需要设置一个拉伸。

In our case we’ll use Layers3D. Select Generate As Children, then click on Update Mesh, which will generate the Game Objects and their meshes. You should end up with the following:

在我们的例子中,我们将使用Layers3D 。 选择“生成为子代” ,然后单击“更新网格” ,这将生成游戏对象及其网格。 您应该以以下内容结束:

By this point, we’ve have created the maze itself. Next, let’s create the house at the end of the maze.

至此,我们已经创建了迷宫本身。 接下来,让我们在迷宫的尽头建立房屋。

房屋建模 (Modeling the house)

To start modeling the house, we first create a cube either from Unity’s primitives or from the primitives included with GameDraw. GameDraw ships with 25 extended primitives and includes the means to also easily add your own.Once we create the cube, we’llGameDraw->Edit and click on the triangle selection button, which is the second button at the top of the edit tab. Select the top triangles, which should be highlighted in green. Next, click on Extrude to extrude the selection, and then move upwards. Continue working with this operation to generate the different parts of the building, including window and door offsets, as seen in the screenshots below:

要开始为房屋建模,我们首先要根据Unity的原语或GameDraw随附的原语创建一个多维数据集。 GameDraw附带了25种扩展原语,并提供了轻松添加自己的方法。一旦创建了多维数据集,我们将进行GameDraw-> Edit并单击三角形选择按钮,这是编辑选项卡顶部的第二个按钮。 选择顶部的三角形,应将其突出显示为绿色。 接下来,单击“ 拉伸”以拉伸选区,然后向上移动。 继续使用此操作来生成建筑物的不同部分,包括窗户和门的偏移量,如以下屏幕截图所示:

Assigning materials and UV manipulation

分配材料和UV操作

Once we finish modeling the house, we’ll need to assign materials to the different parts of the building, as well as to manipulate its UVs to fit just right.To assign materials we simply select the desired triangles from the Edit tab. Select a material in the Material tab under the Assign New Material settings. Then, click on the Assign New Material button in the upper right corner of theEdit tab.

完成房屋建模后,我们需要将材料分配给建筑物的不同部分,并操纵其UV以使其恰好适合。要分配材料,我们只需从“ 编辑”选项卡中选择所需的三角形即可。 在“ 分配新材料”设置下的“ 材料”选项卡中选择一种材料。 然后,单击“ 编辑”选项卡右上角的“分配新材料”按钮。

To fix UVs, go to the UV Tab then click on Make Cubic. Other available options are spherical and planar. Then rotate, scale or translate the UVs until they fit the model’s needs. To work on specific parts of the mesh UV coordinates, there is a simple UV editor that can be used to manipulate each UV coordinate individually.

要修复UV,请转到UV选项卡,然后单击Make Cubic 。 其他可用的选项是球形和平面的。 然后旋转,缩放或平移UV,直到它们满足模型的需求。 要处理网格UV坐标的特定部分,有一个简单的UV编辑器,可用于单独处理每个UV坐标。

结论 (Conclusion)

By now you should have learned to use GameDraw to trace 2D images into 3D, create and edit models, assign materials and manipulate UVs, and build a complete level from scratch. And entirely within Unity!

到现在为止,您应该已经学会了使用GameDraw将2D图像跟踪到3D,创建和编辑模型,分配材质和操纵UV,以及从头开始构建完整的关卡。 完全在Unity内!

This is just an example of the many powerful features included in GameDraw, but it’s certainly not all of them. In addition, we’re regularly releasing new updates and have a strong roadmap with new features in the works, including a procedural cities system, poly reduction brush, sprite support and more!

这只是GameDraw中包含的许多强大功能的示例,但当然并不是全部。 此外,我们会定期发布新的更新,并制定了具有新功能的强大路线图,其中包括程序性城市系统,多边形减少笔刷,精灵支持等!

想要查询更多的信息 (For more information)

You can learn more about GameDraw from http://www.gamedraw3d.com and you can access the documentation here or simply follow Mixed Dimensions on: Twitter: @MXDimensions orFacebook: Facebook.com/MXDimensions

您可以从http://www.gamedraw3d.com了解有关GameDraw的更多信息,也可以在此处访问文档,也可以在以下网站上遵循“ 混合尺寸 ”:Twitter: @MXDimensions或Facebook:Facebook.com/MXDimensions

翻译自: https://blogs.unity3d.com/2012/04/07/tutorial-build-a-maze-game-level-within-unity-using-gamedraw/

unity 构建迷宫

unity 构建迷宫_教程:使用GameDraw在Unity中构建迷宫游戏关卡相关推荐

  1. unity ui框架_[教程汇总+持续更新]Unity从入门到入坟——收藏这一篇就够了

    ----------------塔防(更新中),作者重写了基础篇(下方目录为:1.1(新) 基础)目前还在持续连载了5篇,因为不多我们更新完就能追到原作者的进度了------------------- ...

  2. word2vec python实现_教程 | 在Python和TensorFlow上构建Word2Vec词嵌入模型

    原标题:教程 | 在Python和TensorFlow上构建Word2Vec词嵌入模型 选自adventuresinmachinelearning 参与:李诗萌.刘晓坤 本文详细介绍了 word2ve ...

  3. unity ui 概述_通过此概述了解Unity 2D和Platformer基础知识

    unity ui 概述 If you're shopping around for a 2D game engine, you've undoubtedly come across Unity. Di ...

  4. Unity完全学习教程-从初学者到C#中的RPG游戏开发

    打造3款游戏&学习Unity实用方式!从基础开始,以一个RPG游戏结束.使用Unity 2020和C# 你会学到: 通过创建酷游戏的实用方法 游戏开发的基础和核心概念 创建一个拥有大量功能的角 ...

  5. 虚幻引擎构建光照失败的原因_如何在虚幻引擎4中构建实时动态封面系统

    虚幻引擎构建光照失败的原因 by David Nadaski 大卫·纳达斯基(David Nadaski) 如何在虚幻引擎4中构建实时动态封面系统 (How to build a real-time ...

  6. 手工做迷宫_教你利用瓦楞纸手工制作弹珠迷宫

    现在的小孩都迷恋上电脑游戏和手机视频,反而很少机会接触到一些传统的益智玩具.今天的手工制作教程里面51费宝教你如何利用瓦楞纸板做一个可以比赛竞技的DIY弹珠迷宫游戏,你可以通过把握手柄控制迷宫里面的珠 ...

  7. kotlin 构建对象_使用Kotlin,TypeScript和Okta构建安全的Notes应用程序

    kotlin 构建对象 I love my job as a developer advocate at Okta. I get to learn a lot, write interesting b ...

  8. react中使用构建缓存_使用React和Netlify从头开始构建电子商务网站

    react中使用构建缓存 In this step-by-step, 6-hour tutorial from Coding Addict, you will learn to build an e- ...

  9. vue.js 构建项目_使用Vue.js和AWS Amplify构建Chatbot

    vue.js 构建项目 Over the last few years, chatbots have exploded in popularity. It makes sense that busin ...

最新文章

  1. Ubuntu Server下配置UTF-8中文/英文环境
  2. python3 读取文件的最后一行 非空行
  3. iOS 开发一定要尝试的 Texture(ASDK)
  4. 日常生活小技巧 -- UART 回环测试
  5. junit:junit_简而言之,JUnit:Hello World
  6. Akka构建Reactive应用《one》
  7. matlab将某点标红,Draw-a-rectangle-matlab 本程序在图像上指定位置话红色的矩形框作为标记 - 下载 - 搜珍网...
  8. YYKit-YYModel分析
  9. 2021年遥感类SCI期刊JCR分区/中科院分区排名与影响因子汇总
  10. 域名不要www如何解析
  11. 阴阳师1月服务器维护,《阴阳师》手游1月24日维护更新公告:新区「暖风春穗」集结开启!...
  12. Eclipse官网查找历史版本Eclipse
  13. php-ews发送邮件,使用php-ews回复电子邮件
  14. 算法基础:Aggressive cows--二分算法
  15. (论文加源码)基于DEAP的脑电情绪识别(CNN,RNN和两种不同的注意力机制)
  16. 用python计算工资工资_python练习-工资计算器
  17. 新氧季报图解:营收3.25亿同比降28% 净利3130万
  18. java开发项目经验怎么写,最全指南
  19. 解决Win10系统电脑使用耳机听歌、看视频、看网页只有伴奏背景音没有人声的方法
  20. 手持两把锟斤拷,口中疾呼烫烫烫。脚踏千朵屯屯屯,笑看万物锘锘锘

热门文章

  1. 浏览器y轴滚动条占据宽度,导致出现x轴滚动条的解决方案
  2. 如何通过优化物流体验的技术来提高客单价?
  3. Linux命令--查看文件信息
  4. 武汉流星汇聚:跨境电商的未来是跨境电商和区块链技术相结合
  5. 2023最新SSM计算机毕业设计选题大全(附源码+LW)之java校园新闻发布管理系统574ec
  6. 安东尼:为来欧洲踢球做出了牺牲,穿上曼联球衣让我很满足
  7. 一文搞懂 Web Worker(原理到实践)
  8. Java操作桌面应用 --- Desktop 类
  9. 小白calculator
  10. Dubbo (五) ---------监控中心