《我们的传奇》超流畅高画质的背后:苹果Metal技术

《我们的传奇》超流畅高画质的背后:苹果Metal技术,第1张

《我们的传奇》超流畅高画质的背后:苹果Metal技术

盛大游戏 携手天马时空共同出品3D 传奇手游 《我们的传奇》的消息曝出后,。其中最大的原因当属该游戏是“传奇”IP历史上首款真正3D正版手游,其采用Unity3D+苹果Metal双技术的引入,标志着传奇手游步入次世代。

Unity3D+Metal双技术 铸造手游研发的传奇

《我们的传奇》是一款真正意义上的 3d传奇手游 ,它采用了目前手游开发行业中最成熟的3D引擎“Unity3D”,凭借着该引擎全套的3D研发方案,可以实现数万套模型库的搭建,实现3D次世代级别的建模、阴影和粒子特效。同时,《我们的传奇》在iOS端首次运用了苹果的Metal优化技术,整个游戏品质得到了飞跃提升,也铸造了原创手游的一个传奇。

(图1:苹果METAL技术大幅提升手机游戏画面水品)

高清画质保证 游戏100%流畅运行

苹果公司的Metal技术是一种低层次的渲染应用程序编程接口,提供了软件所需的最低层,保证软件可以运行在不同的图像芯片上,专为智能手机开发。《我们的传奇》也是国内首款运用该技术的大型3D MMO手游,在Metal技术的助力下,《我们的传奇》图形渲染效率提升10倍,CPU及GPU利用率提升4倍。玩家在感受高清画质的同时不会感到跳帧、卡顿现象,真正实现品质和效率兼得的完美体验。Metal技术,让游戏无论在画质、特效、流畅度还是画面的逼真程度上,都得到了数倍的提升。那么运用Metal技术后的《我们的传奇》究竟会给我们带来怎么样的意外惊喜呢?下面将通过一系列的对比图片跟广大“传奇粉”们展示一番。

(图2:METAL技术下的高质量模型)

苹果Metal技术在《我们的传奇》开发运用中,得到多番验证。《我们的传奇》开发团队北京天马时空成立了一个专项的Metal技术小组,为《我们的传奇》提供专属优化技术方案,这也让游戏的品质得到了进一步保证。现在,Metal技术已经能够让《我们的传奇》兼容多种型号的iPhone、iPad等苹果终端。同时在研发团队的技术衔接下,也实现了安卓机型的兼容。

目前,通过内部专业测试,《我们的传奇》在3D开发领域可谓是国内领先,无论是战斗还是画面表现,都显得非常顺滑,这让游戏的战斗节奏显得更加爽快。

(图3:《我们的传奇》中凌厉的女法师)

模型表现更加逼真,游戏代入感更强

苹果Metal技术还有一个特色,就是能够实现较为真实的3D画面,特别是在特效、细节的渲染能力上,首屈一指,其真正目的是在移动设备上实现前所未有的画面逼真度。在《我们的传奇》技能效果的表现上便可见一斑,与传统的“传奇”技能相比,可以达到堪称完美的地步,凭借其动态粒子渲染技术,游戏中每个职业的技能都能被刻画得入木三分,栩栩如生。如果在多人的战斗画面场景下,整个战斗的代入感就会显得更为强烈。

此外,Metal技术对游戏的渲染功能更加强大,通过一组场景对比可见,被誉为玛法大陆“文明之珠”的比奇城,在《我们的传奇》中被渲染成了金碧辉煌、错落有致,这样既保证了画面色彩更精细唯美,也不失“传奇”之本色。

(图4:我们的传奇中仙风道骨的女道士)

2001年热血传奇的横空出世,开启了一代人的网游记忆,承载着无数玩家的青春,也见证了网络游戏时代的沧桑巨变。此次盛大游戏与天马时空的联合,集研发、发行优势于一体,是一次行业巨头与业界新秀的强强联手。而作为首款3D传奇手游,《我们的传奇》将延续这份梦想与激情,2016邀亿万传奇热爱者一起再战热血岁月!

《我们的传奇》——首款官方正版3D传奇手游,尊享预定火热开放中!

超凡而生,革新问世!

【关于《我们的传奇》】

《我们的传奇》是中国网游领导品牌“热血传奇”系列首款正版3D手游作品,由盛大游戏联合天马时空出品。《我们的传奇》继承“传奇”系列精髓,在iOS端,首度运用了苹果公司(Apple Inc. )最新的优化技术:“Metal”,提升游戏10倍流畅度,全高清画质将整个玛法大陆带入次世代殿堂级大作之列。恢弘的游戏场景、高效的运行效率、酷炫的声光色效、强大的动态渲染等突破性进化即将一一问世!耳熟能详的玛法大陆、战法道三职业设定、 打怪爆装备 、激爽PK和 沙巴克 行会争霸等经典玩法,加上耳目一新的装备投保、跨服竞技、跨服城战等全新设计,必将为传奇忠实玩家带来革命性手游新体验。

【关于盛大游戏】

盛大游戏是中国领先的网络游戏开发商、运营商和发行商,致力于打造国际化的网游平台。盛大游戏拥有两千多名研发和运营人员,一直勇于创新和开放,坚持优秀和丰富多样的产品线,向用户提供基于PC客户端、 浏览器 以及智能移动终端等多平台50多款网络游戏产品,连续多年赢得金翎奖、金凤凰奖等重量级行业奖项,居行业之首。

【关于天马时空】

北京天马时空网络技术有限公司是国内领先的移动游戏和应用研发商,致力于打造一流的精品移动和应用。2014年12,公司首款移动MMO手游产品《 全民奇迹 》亮相,迅速成为新一代3D移动MMO游戏的标杆,截止2015年9月底,全球总流水已突破5亿美元,收获数十项行业奖项。天马时空将继续秉承“以端游的品质来做手游”的宗旨,致力于精品手游的研发战略,同时涉足手游发行领域,自身成长的同时为推动行业发展贡献优质产品。

Example In GitHub

使用Metal绘制视图内容

Create a MetalKit view and a render pass to draw the view’s contents.

创建MetalKit视图和渲染过程以绘制视图的内容。

In this sample, you’ll learn the basics of rendering graphics content with Metal. You’ll use the MetalKit framework to create a view that uses Metal to draw the contents of the view. Then, you’ll encode commands for a render pass that erases the view to a background color.

在本示例中,您将学习使用Metal渲染图形的基础知识。您将使用MetalKit框架创建一个使用Metal绘制视图内容的视图。然后,将对一个用于将视图擦除后设置自定义背景色的渲染过程的命令进行编码。

Note

MetalKit automates windowing system tasks, loads textures, and handles 3D model data. See MetalKit for more information.

MetalKit自动执行窗口系统任务、加载纹理和处理三维模型数据。有关详细信息,请参阅MetalKit。

准备要绘制的MetalKit视图

MetalKit provides a class called MTKView, which is a subclass of NSView (in macOS) or UIView (in iOS and tvOS). MTKView handles many of the details related to getting the content you draw with Metal onto the screen.

MetalKit提供了一个名为MTKView的类,它是NSView(在macOS中)或UIView(在iOS和tvOS中)的子类。MTKView处理许多细节(将用Metal绘制的内容显示在屏幕上有关的)。

An MTKView needs a reference to a Metal device object in order to create resources internally, so your first step is to set the view’s device property to an existing MTLDevice.

为了在内部创建资源,MTKView需要引用Metal的设备对象,因此第一步是将视图的device属性设置为现有的MTLDevice。

Other properties on MTKView allow you to control its behavior. To erase the contents of the view to a solid background color, you set its clearColor property. You create the color using the MTLClearColorMake(_:_:_:_:) function, specifying the red, green, blue, and alpha values.

MTKView上的其他属性允许您控制其行为。将视图内容清除为纯色背景时,需要设置其clearColor属性。使用MTLClearColorMake(::::)函数创建颜色,指定红色、绿色、蓝色和alpha值。

Because you won’t be drawing animated content in this sample, configure the view so that it only draws when the contents need to be updated, such as when the view changes shape:

由于您不会在本示例中绘制动画内容,所以配置视图使其仅在需要更新内容时才绘制,例如当视图更改形状时:

设置负责绘制的代理

MTKView relies on your app to issue commands to Metal to produce visual content. MTKView uses the delegate pattern to inform your app when it should draw. To receive delegate callbacks, set the view’s delegate property to an object that conforms to the MTKViewDelegate protocol.

MTKView依赖于您的应用程序向Metal发出命令以生成可视内容。MTKView使用委托模式通知app何时应该绘制。要接收回调方法,请将视图的delegate属性设置为符合MTKViewDelegate协议的对象。

The delegate implements two methods:

代理实现两个方法:

In this sample, a class called AAPLRenderer implements the delegate methods and takes on the responsibility of drawing. The view controller creates an instance of this class and sets it as the view’s delegate.

在这个示例中,一个名为AAPLRenderer的类实现了委托方法并承担了绘图的责任。VC创建此类的一个实例,并将其设置为视图的委托。

创建渲染过程描述符

When you draw, the GPU stores the results into textures, which are blocks of memory that contain image data and are accessible to the GPU. In this sample, the MTKView creates all of the textures you need to draw into the view. It creates multiple textures so that it can display the contents of one texture while you render into another.

绘制时,GPU将结果存储到纹理中,纹理是包含图像数据的内存块,可供GPU访问。在本示例中,MTKView将创建需要绘制到视图中的所有纹理。它创建多个纹理,以便在渲染到另一个纹理时显示一个纹理的内容。

To draw, you create a render pass, which is a sequence of rendering commands that draw into a set of textures. When used in a render pass, textures are also called render targets. To create a render pass, you need a render pass descriptor, an instance of MTLRenderPassDescriptor. In this sample, rather than configuring your own render pass descriptor, ask the MetalKit view to create one for you.

若要绘制,请创建渲染过程,该过程是绘制到一组纹理中的渲染命令序列。在渲染过程中使用时,纹理也称为渲染目标。若要创建渲染过程,需要一个渲染过程描述符,即MTLRenderPassDescriptor的实例。在本示例中,请使用MetalKit视图为您创建一个,而不是配置自己的渲染过程描述符。

A render pass descriptor describes the set of render targets, and how they should be processed at the start and end of the render pass. Render passes also define some other aspects of rendering that are not part of this sample. The view returns a render pass descriptor with a single color attachment that points to one of the view’s textures, and otherwise configures the render pass based on the view’s properties. By default, this means that at the start of the render pass, the render target is erased to a solid color that matches the view’s clearColor property, and at the end of the render pass, all changes are stored back to the texture.

渲染过程描述符描述了一组渲染目标,以及在渲染过程开始和结束时应如何处理这些目标。渲染过程还定义了渲染的某些其他方面,这些方面不是此示例的一部分。该视图返回一个渲染过程描述符,该描述符具有指向该视图的某个纹理的单色附加,否则将基于该视图的属性配置渲染过程。默认情况下,这意味着在渲染过程开始时,渲染目标将被清除为与视图的clearColor属性匹配的纯色,在渲染过程结束时,所有更改都存储回纹理。

Because a view’s render pass descriptor might be nil, you should test to make sure the render pass descriptor object is non-nil before creating the render pass.

由于视图的渲染过程描述符可能为nil,因此在创建渲染过程之前,应测试以确保渲染过程描述符对象为非空。

创建渲染过程

You create the render pass by encoding it into the command buffer using a MTLRenderCommandEncoder object. Call the command buffer’s makeRenderCommandEncoder(descriptor:) method and pass in the render pass descriptor.

通过使用MTLRenderCommandEncoder对象将其编码到命令缓冲区来创建渲染过程。调用命令缓冲区的makeRenderCommandEncoder(descriptor:)方法并传入呈现过程描述符。

In this sample, you don’t encode any drawing commands, so the only thing the render pass does is erase the texture. Call the encoder’s endEncoding method to indicate that the pass is complete.

在本示例中,您不编码任何绘图命令,因此渲染过程只会删除纹理。调用编码器的endEncoding方法以指示该过程已完成。

在屏幕上呈现一幅图画

Drawing to a texture doesn’t automatically display the new contents onscreen. In fact, only some textures can be presented onscreen. In Metal, textures that can be displayed onscreen are managed by drawable objects, and to display the content, you present the drawable.

绘制到纹理不会自动在屏幕上显示新内容。实际上,只有一些纹理可以显示在屏幕上。在Metal中,可以在屏幕上显示的纹理是由可绘制对象管理的,要显示内容,需要显示可绘制对象。

MTKView automatically creates drawable objects to manage its textures. Read the currentDrawable property to get the drawable that owns the texture that is the render pass’s target. The view returns a CAMetalDrawable object, an object connected to Core Animation.

MTKView会自动创建可绘制对象来管理其纹理。读取currentDrawable属性以获取拥有作为渲染过程目标的纹理的drawable。视图返回一个CAMetalDrawable对象,一个连接到核心动画的对象。

Call the present(_:) method on the command buffer, passing in the drawable.

对命令缓冲区调用present(:)方法,传递drawable。

This method tells Metal that when the command buffer is scheduled for execution, Metal should coordinate with Core Animation to display the texture after rendering completes. When Core Animation presents the texture, it becomes the view’s new contents. In this sample, this means that the erased texture becomes the new background for the view. The change happens alongside any other visual updates that Core Animation makes for onscreen user interface elements.

此方法告诉Metal,当计划执行命令缓冲区时,Metal应与核心动画协调以在渲染完成后显示纹理。当核心动画呈现纹理时,它将成为视图的新内容。在本示例中,这意味着删除的纹理将成为视图的新背景。这种变化与核心动画为屏幕用户界面元素所做的任何其他视觉更新一起发生。

提交命令缓冲区

Now that you’ve issued all the commands for the frame, commit the command buffer.

现在已经发出了帧的所有命令,提交命令缓冲区。

问题一:魅族如何关闭后台运行程序 设置 应用控制 自动启动 进去把你不想自动启动的软件关掉!

这样自启软件就没了! 接下来是已经打开的后台软件 !HOME键旁边(左右都行)向上拉一下

就能看到已经打开的后台软件 想单个停止就拖住某软件图标向上拉 想全部关闭就向下拉!往右边边拉可以设置屏幕亮度!

要简单方便就直接下载个安全软件一般都有类似功能!

问题二:魅族手机怎么关闭后台程序 用户可以从屏幕低端两侧空白处上划,就可以唤出任务管理器,然后左右滑动就可以关闭后台程序了。

问题三:魅族手机怎么关闭后台程序 你好,从最低端往上划,会出现程序,然后点着任意一个往下滑,就会全部清理了

问题四:魅族metal怎么关闭后台程序 1.直接的方法(表面) 在home键旁边向上拉 就会d出多任务 在那你直接删除就可以了 2.全面的清除后台任务 打开设置-应用程序-正在运行

问题五:魅族e怎么快速关闭后台运行 你好,从最低端往上划,会出现程序,然后点着任意一个往下滑,就会全部清理了

问题六:魅族metal怎么关闭后台 打开任务管理器的方法:

1.从手机底部往上滑可以调出任务管理器,在任务管理器选取图标下滑可以清除所有任务记录,选取单个软件往上滑是关闭单个应用,按住软件两秒可以锁定该任务。

2.Flyme 4.0以上系统,手机桌面自带安全中心app,点击进入应用界面,自带:垃圾清理,大文件管理,应用清理,流量管理,病毒查杀,权限管理,省电模式等功能,轻轻松松一键清理,您可以进入了解更多.

3.Flyme 5.0以上系统,从手机底部往上滑可以调出任务管理器,在任务管理器选取图标,向左(或向右)移除即可清除任务记录,或者直接选择屏幕顶部“全部关闭”按钮,即可清除手机当前所有运行进程.

问题七:魅族mx4怎么关闭后台程序 进入后台,然后按住设置键不放往下拖动或者往上拖动 关闭后台的程序即可。

问题八:魅族metal怎么关闭后台程序 用户可以从屏幕低端空白处上划,就可以唤出任务管理器,然后点着想关闭的程序右划,就可以关闭该后台程序了。

问题九:魅族手机,怎么后台运行按哪里? 用户可以从屏幕低端两侧空白处尚华就可以唤出后台,左右滑动可以清理,也可以点击上方的清理全部来清理所有后台的。

问题十:魅族MX2 如何真正关闭后台运行的程序? 您好,

您使用的是什么版本的固件啊。魅族MX2最新的体验固件是有应用控制的,并且有更高效的应用唤醒机制。

针对您说的应用不能完全关闭的情况有所帮助的。

实际上这个问题,在手机和电脑上都不能完全解决的。除非强制停止。

但是手机/或者电脑内存足够的,也不必担心这个问题,实际的耗电和系统的唤醒机制有关的。也就是说,系统优化好的,即使在占用内存的,耗电也不会太多的。

运行几天,重启是最好的方法。


欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/yw/11244702.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2023-05-14
下一篇2023-05-14

发表评论

登录后才能评论

评论列表(0条)

    保存