Godot 4.7: Lights, Camera, Action
Godot 4.7: Lights, Camera, Action
Godot 4.7:灯光、摄像机、动作
Migrating to a new version
迁移至新版本
Before transitioning your existing projects to Godot 4.7, carefully read through our migration guide to learn about breaking changes. 在将现有项目迁移到 Godot 4.7 之前,请仔细阅读我们的迁移指南,以了解重大的破坏性变更。
AreaLight3D, a new node for rectangular light sources
AreaLight3D:用于矩形光源的新节点
Do you think light can bloom even on a battlefield? Soft radiating glows from humming TV screens, illuminated billboards in vibrant cityscapes, and ominous light through frosted windows are now achievable with rectangular area lights. 你认为即使在战场上,光芒也能绽放吗?现在,通过矩形区域光,你可以实现嗡嗡作响的电视屏幕发出的柔和光芒、充满活力的城市景观中被照亮的广告牌,以及透过磨砂窗户射入的阴森光线。
You no longer need to use an emissive material combined with Global Illumination to simulate a glowing area. By leveraging the new AreaLight3D, it is now possible to render real-time light from a rectangle in 3D space. Rectangular area lights can create softer shadows and more realistic reflections for your scenes. 你不再需要使用自发光材质结合全局光照(Global Illumination)来模拟发光区域。通过利用全新的 AreaLight3D,现在可以在 3D 空间中渲染来自矩形的实时光照。矩形区域光可以为你的场景创造更柔和的阴影和更逼真的反射。
Enter the Asset Store
进入资源商店 (Asset Store)
The Asset Library did its job and it was really useful. But it’s now time for it to make way for the new Asset Store. The new update adds some changes to make browsing assets easier and more enjoyable! We’ve polished how asset items are displayed and you can now zoom asset preview images. 资源库(Asset Library)完成了它的使命,它确实非常有用。但现在是时候让它为全新的资源商店(Asset Store)让路了。此次更新增加了一些改进,使浏览资源变得更加轻松愉快!我们优化了资源项目的显示方式,现在你可以缩放资源预览图了。
Behind the scenes, we have also introduced threading. This means the Asset Store can perform certain tasks in the background without blocking the editor’s main user interface. Now while you’re exploring your organized assets, you’ll also know there’s someone paving a path and clearing brush quietly in the background, making it that much easier for you to get the lay of the land. 在后台,我们还引入了多线程处理。这意味着资源商店可以在后台执行某些任务,而不会阻塞编辑器的主要用户界面。现在,当你探索整理好的资源时,你也会知道后台有程序在默默地为你铺路清障,让你更容易掌握全局。
Inline previews of text-based shader operations
基于文本的着色器操作的内联预览
With inline text shader previews, the treacherous journey is over. Right as you type vec2 v4 = UV;, you can now preview Godot text shaders within the editor in real-time. Back in the day, you would have needed to compile a shader and view it separately in the workspace. But thanks to the long-awaited quality-of-life addition to the text shader editor, you will actually be able to preview the shader and what it will do, in the moment, as you’re working on the shader from within the editor!
有了内联文本着色器预览,那段艰辛的旅程结束了。当你输入 vec2 v4 = UV; 时,现在可以在编辑器内实时预览 Godot 文本着色器。在过去,你需要编译着色器并在工作区中单独查看。但多亏了文本着色器编辑器中这一期待已久的体验优化,你现在可以在编辑器内编写着色器的同时,即时预览其效果!
Offset transform of Control nodes
Control 节点的偏移变换 (Offset Transform)
One of the most long-awaited features in Godot’s GUI system has been to be able to translate, rotate, or scale a Control node without it affecting the rest of the container. This is most notably used for animation purposes, so that buttons can smoothly slide into view or fade away with a scale change. Godot GUI 系统中最受期待的功能之一,就是能够在不影响容器其余部分的情况下平移、旋转或缩放 Control 节点。这主要用于动画制作,例如让按钮平滑滑入视野,或通过缩放变化淡出。
Control’s new offset_transform_* properties aim to address this limitation in a self-contained manner, similar to the CSS transform property. You can choose whether the transform offset affects mouse input. By default, transform offset is purely visual, which means there is no risk of buttons losing their hover status after being transformed.
Control 节点新增的 offset_transform_* 属性旨在以一种独立的方式解决这一限制,类似于 CSS 的 transform 属性。你可以选择变换偏移是否影响鼠标输入。默认情况下,变换偏移纯粹是视觉上的,这意味着按钮在变换后不会出现失去悬停状态的风险。
Creating games entirely on Android
完全在 Android 上开发游戏
Developing on Android and XR has been possible for a while, and with the stable release of the Godot Android Build Environment (GABE), developers can now export and publish their games as well! GABE is a companion app to the Godot Android editor that developers can download for Gradle export support. Godot 4.7 sees some QOL improvements to better integrate and leverage GABE on Android devices. 在 Android 和 XR 上进行开发已经有一段时间了,随着 Godot Android 构建环境 (GABE) 的稳定发布,开发者现在也可以导出并发布他们的游戏了!GABE 是 Godot Android 编辑器的配套应用,开发者可以下载它以获得 Gradle 导出支持。Godot 4.7 带来了一些体验优化,以便在 Android 设备上更好地集成和利用 GABE。
Drawing on a texture has never been this easy
在纹理上绘图从未如此简单
After a long wait, we’re excited to share that it is now possible to easily draw on a texture! Previously, there were some hacky solutions through using a Viewport, but they were limited and costly when handling more complex tasks. However, now we have something much more accessible: a solution in the form of DrawableTexture2D. It’s a simple API layer that abstracts away all the technical noise and gives users of all skill levels an approachable way to draw on textures!
经过漫长的等待,我们很高兴地宣布,现在可以轻松地在纹理上绘图了!以前,有一些通过使用 Viewport 实现的“黑科技”方案,但在处理更复杂的任务时,它们不仅受限而且开销巨大。然而,现在我们有了更易用的方案:DrawableTexture2D。这是一个简单的 API 层,它屏蔽了所有技术细节,为各水平的用户提供了一种在纹理上绘图的便捷方式!
HDR output support
HDR 输出支持
Your Godot project just got a huge upgrade in range and color with high dynamic range (HDR) output support. Imagine vibrant colors and ultra-bright special effects for both 2D and 3D scenes! HDR is a method of saving, processing, or displaying colors that are as bright or as dim as you can imagine. Godot has internally rendered lighting in HDR for a long time, but the full detail can’t be seen with the existing SDR output mode. 随着高动态范围 (HDR) 输出支持的加入,你的 Godot 项目在色彩范围上得到了巨大的提升。想象一下 2D 和 3D 场景中充满活力的色彩和超亮的特效!HDR 是一种保存、处理或显示色彩的方法,可以呈现出你所能想象到的最亮或最暗的细节。Godot 长期以来一直在内部以 HDR 渲染光照,但现有的 SDR 输出模式无法展现其全部细节。