找回密码
 立即注册
查看: 4985|回复: 67

[插件] NGUI中如何新建atlas图集

[复制链接]
发表于 2013-3-4 13:59 | 显示全部楼层 |阅读模式
资源信息 Tutorial Information
教程名称: NGUI中如何新建atlas图集(发帖教程)
适用引擎:   (适用引擎,为空默认为Unity)
教程语种: 中文
教程等级: 1
教程格式: 图文(请用IE9以上浏览器访问本版块)
教程作者: 转载自互联网 (如有问题请短消息联系作者或发表回复)
下载地址: (兑换积分)
点击查看原图
美丽分割线
atlas是NGUI使用的图集。使用该内容可以实现图片显示还有通过切换实现动画效果。这里主要记录一下atlas的制作过程。


首先了解atlas的参数内容。


Material: 该内容包含了图籍的图片,还有Shade信息
TP Import: 在使用TexturePacker到处类型为unity3d时。直接使用.txt数据即可。立即可以实现sprite的划分和实现。后续的参数都自动生成。如果不是倒入就忽略。
Coordinates:坐标格式。使用pixels吧。好算一点。
New Sprite:创建图片信息。其实就是sprite名字,在大图片中的位置。
Sprite drop-down list lets you choose the sprite you’re working with.
Edit Name field allows you to rename your sprite to something more appropriate.
Dimensions is used to specify where your sprite begins as well as its size.
Border is used for 9-sliced sprites, allowing you to specify the part of the sprite that should not get scaled or scaled in only one direction. It’s used by sliced sprites.
Padding is the amount of pixel offset applied to all 4 sides. It’s used to adjust the pivot point, and is mainly a feature used by Texture Packer and the Atlas Maker when sprites get trimmed.
Show field lets you examine your sprite and its location in the atlas.


然后就是建立一个atlas的步骤。我使用了texturePacker打包图片。


1.使用texturePacker打包图片输出文件atlas.png、atlas.txt.让如unity3d资源中。后续所有操作都在untiy3d中
2.在project中创建一个atlasmaterial。shade选择 unlit-Transparent Colored,图片选择atlas.png
3.在hierarchy创建一个空对象。把对象拖到project,重命名为atlas,删除hierarchy中的对象。
4.给atlas添加一个atlas组件 componet->NGUI->UI->Atlas
5.把atlasmaterial拖入material
6.把atlas.txt拖入TP。
7.atlas制作完毕。所有的sprite是以原来的图片名命名的。

另外发现发现使用NGUI自带的Fantasy Atlas作为背景,在其上使用自己制作的Atlas的Sprite的时候,Sprite必须要旋转一定角度才能显示。把Fantasy的material换成重新生成的material就解决问题了。目前不知道问题原因。我使用的unity3d 3.4.2 pro

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

×

评分

参与人数 1 +1 收起 理由
L1247 + 1

查看全部评分

发表于 2013-3-4 17:23 | 显示全部楼层
{:5_427:} 顺便来学习看看 征集作品呢
发表于 2017-5-3 16:54 | 显示全部楼层
好帖就是要顶
发表于 2017-5-3 16:34 | 显示全部楼层
说的非常好
发表于 2017-5-3 16:49 | 显示全部楼层
很好哦
发表于 2017-5-3 16:52 | 显示全部楼层
不错不错
发表于 2017-5-3 16:44 | 显示全部楼层
LZ真是人才
发表于 2017-5-3 18:40 | 显示全部楼层
好帖就是要顶
发表于 2017-5-3 18:18 | 显示全部楼层
真心顶
发表于 2017-5-3 18:28 | 显示全部楼层
难得一见的好帖
懒得打字嘛,点击右侧快捷回复 【右侧内容,后台自定义】
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|手机版|Unity开发者联盟 ( 粤ICP备20003399号 )

GMT+8, 2024-4-28 13:43 , Processed in 0.599204 second(s), 32 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表