View in English

  • Apple 开发者
    • 入门汇总

    探索“入门汇总”

    • 概览
    • 学习
    • Apple Developer Program

    及时了解最新动态

    • 最新动态
    • 开发者你好
    • 平台

    探索“平台”

    • Apple 平台
    • iOS
    • iPadOS
    • macOS
    • Apple tvOS
    • visionOS
    • watchOS
    • App Store

    精选

    • 设计
    • 分发
    • 游戏
    • 配件
    • 网页
    • Home
    • CarPlay 车载
    • 技术

    探索“技术”

    • 概览
    • Xcode
    • Swift
    • SwiftUI

    精选

    • 辅助功能
    • App Intents
    • Apple 智能
    • 游戏
    • 机器学习与 AI
    • 安全性
    • Xcode Cloud
    • 社区

    探索“社区”

    • 概览
    • “与 Apple 会面交流”活动
    • 社区主导的活动
    • 开发者论坛
    • 开源

    精选

    • WWDC
    • Swift Student Challenge
    • 开发者故事
    • App Store 大奖
    • Apple 设计大奖
    • Apple Developer Centers
    • 文档

    探索“文档”

    • 文档库
    • 技术概述
    • 示例代码
    • 《人机界面指南》
    • 视频

    发布说明

    • 精选更新
    • iOS
    • iPadOS
    • macOS
    • watchOS
    • visionOS
    • Apple tvOS
    • Xcode
    • 下载

    探索“下载”

    • 所有下载
    • 操作系统
    • 应用程序
    • 设计资源

    精选

    • Xcode
    • TestFlight
    • 字体
    • SF Symbols
    • Icon Composer
    • 支持

    探索“支持”

    • 概览
    • 帮助指南
    • 开发者论坛
    • “反馈助理”
    • 联系我们

    精选

    • 《开发者账户帮助》
    • 《App 审核指南》
    • 《App Store Connect 帮助》
    • 即将实行的要求
    • 协议和准则
    • 系统状态
  • 快速链接

    • 活动
    • 新闻
    • 论坛
    • 示例代码
    • 视频
 

视频

打开菜单 关闭菜单
  • 专题
  • 所有视频
  • 关于

更多视频

  • 简介
  • 概要
  • 代码
  • 探索 RealityKit 的新进展

    了解 RealityKit 的最新进展,让 App 和游戏的沉浸感和真实感更胜以往。探索一众强大的新功能,包括交互式布料模拟、NavMesh 寻路、混合现实光照,以及让空间音频更出彩的自定混响网格。借助改进的阴影效果、角色渲染增强功能以及对高斯泼溅技术的支持,提升视觉保真度。

    章节

    • 0:00 - Introduction
    • 2:00 - Lighting and shadows
    • 7:44 - Navigation mesh
    • 11:01 - Cloth simulation
    • 13:42 - Performance
    • 17:09 - 3D Gaussian splats
    • 19:08 - Immersive audio
    • 22:42 - Next steps

    资源

    • Gaussian splats on visionOS
      • 高清视频
      • 标清视频

    相关视频

    WWDC26

    • 使用 Reality Composer Pro 3 加速你的空间工作流程
    • 使用 Reality Composer Pro 3 加速空间场景迭代
    • 使用 Reality Composer Pro 3 设计无代码游戏
    • 使用 Xcode 扩展 Reality Composer Pro 3 的功能
  • 搜索此视频…
    • 4:02 - Soft shadows

      // Enable soft shadows for the hearth spotlight
          
      guard var shadow = hearthSpotlight.components[SpotLightComponent.Shadow.self] else {
          // handle error
      }
      shadow.lightSize = 0.7 // meters
          
      shadow.quality = .medium // or .high
      // shadow.quality = .low // will result in hard shadows
          
      hearthSpotlight.components.set(shadow)
    • 6:13 - Projective textures

      // Create one of the planetarium spotlights
          
      let spotLightEntity = Entity()
      spotLightEntity.components.set(SpotLightComponent(
          color: .white,
          intensity: intensity,
          innerAngleInDegrees: innerAngle,
          outerAngleInDegrees: outerAngle,
          attenuationRadius: attenuationRadius,
      ))
          
      let projectiveTexture: TextureResource = generateStarsAndNebulaeTexture()
      spotLightEntity.components.set(SpotLightComponent.ProjectiveTexture(
          texture: projectiveTexture
      ))
    • 7:13 - Physical space lighting

      // Enable physical space lighting
          
      spotLightEntity.components.set(SpotLightComponent.SurroundingsLight())
    • 9:46 - Querying the navigation mesh

      // Querying the navigation mesh in Chaparral Village
      
      extension Entity {
          public func navigate(/* ... */) async {
              let navigator = try! NavigationController(entity: self)
              guard let result = await navigator.computePath(from: fromPosition, to: toPosition) 
              else {
                  return
              }
              if result.isEmpty {
                  return
              }
              for node in result {
                  switch node.category {
                      case .meshPoint:
                          finalPath.append(node.position)
                      case .offMeshConnection:
                          // handle ladders
                  }
              }
          }
      }
    • 12:51 - Pinning cloth to anchor points

      // Pin the curtains to the Alchemist's lab
      
      for (pin, pinComponent) in pins {
              let position = pin.position(relativeTo: event.entity)
              let selectionSphere = ClothSphereShape(radius: pinComponent.radius)
          
              let vertices = clothMesh.vertices(in: .sphere(selectionSphere),
                                          center: position)
              clothBody.motionTypes.set(vertexIndices: vertices, value: .kinematic)
      }
    • 14:42 - LOD by camera distance

      // Create entity with LODs
          
      let lod0 = [ModelEntity(mesh: lodMesh0)]
      let lod1 = [ModelEntity(mesh: lodMesh1)]
      let lod2 = [ModelEntity(mesh: lodMesh2)]
      
      let entity = Entity()
      
      LevelOfDetailComponent.addByCameraDistance(to: entity, levels: [
          (entities: lod0, maxDistance: 1.0 /* meters */), // highest detail
          (entities: lod1, maxDistance: 5.0),              // medium detail
          (entities: lod2, maxDistance: .infinity),        // lowest detail
      ])
    • 15:58 - LOD by screen area

      // Create entity with LODs
          
      let lod0 = [ModelEntity(mesh: lodMesh0)]
      let lod1 = [ModelEntity(mesh: lodMesh1)]
      let lod2 = [ModelEntity(mesh: lodMesh2)]
      
      let entity = Entity()
      
      LevelOfDetailComponent.addByScreenArea(to: entity, levels: [
          (entities: lod0, minArea: 0.2 /* fraction of screen area */),  // highest detail
          (entities: lod1, minArea: 0.1),                                // medium detail
          (entities: lod2, minArea: 0.01),                               // lowest detail
      ])
    • 16:26 - Responding to thermal state changes

      // Respond to changes in device thermal state
          
      NotificationCenter.default.addObserver(of: ProcessInfo.self,
                                             for: .thermalStateDidChange) {_ in
          switch ProcessInfo.processInfo.thermalState {
              case .nominal, .fair:
                  // Stay the course
              case .serious, .critical:
                  // Improve performance by:
                  // More aggressive LOD switching
                  // Lower shadow quality
          }
      }
    • 18:44 - Creating a Gaussian splat

      // Create Gaussian splat resource and component
      
      let resource = try GaussianSplatResource.BufferResource(count: splatCount,
                                                              position: positionBuffer,
                                                              scale: scaleBuffer,
                                                              rotation: rotationBuffer,
                                                              opacity: opacityBuffer,
                                                              sphericalHarmonics:
                                                                                                                          (sphericalHarmonicsBuffer, degree))
      
      let splatResource = GaussianSplatResource(resource)
      
      let splatComponent = GaussianSplatComponent(splatResource)
      
      splatEntity.components.set(splatComponent)
    • 20:49 - Creating a custom reverb mesh

      // Create and use custom reverb mesh
      
      let mesh: ReverbMeshResource = .shoebox(size: [5, 4, 6])
          
      let reverb: Reverb = .simulated(mesh: mesh, materials: [.dryWall])
          
      entity.components.set(ReverbComponent(reverb: reverb))
    • 21:33 - Creating custom reverb materials

      // Create custom materials for custom reverb mesh
          
      let thickCarpet: Audio.Material = .carpet.scalingAbsorption {freq in 0.1 }
          
      let bookshelf: Audio.Material
          
      // Absorption coefficients by center frequency:
      // 31.5Hz, 63Hz, 125Hz, 250Hz, 500Hz, 1kHz, 2kHz, 4kHz, 8kHz, 16kHz
      let bookshelfAbsorption = Audio.Absorption(
          [0.10, 0.15, 0.28, 0.20, 0.15, 0.10, 0.10, 0.07, 0.07, 0.05])
          
      // Scattering coefficients for: 500Hz, 1000Hz, 4000Hz
      let bookshelfScattering = Audio.Scattering([500: 0.5, 1000: 0.6, 4000: 0.7])
          
      bookshelf = .init(absorption: bookshelfAbsorption,
                    scattering: bookshelfScattering)
    • 0:00 - Introduction
    • Overview of the new RealityKit features introduced this year, including lighting and shadows, navigation mesh, cloth simulation, performance tools, 3D Gaussian splats, and immersive audio.

    • 2:00 - Lighting and shadows
    • Explore RealityKit's updated lighting and shadow capabilities, including lightmap support for indirect lighting and ambient occlusion, soft shadows for dynamic lights, projective textures, and physical space lighting that lets virtual lights interact with real-world environments.

    • 7:44 - Navigation mesh
    • Learn how to use RealityKit's navigation mesh to define traversable paths for characters and NPCs. Covers NavigationMeshResource, NavigationComponent, NavigationController, and how to query and iterate path nodes asynchronously.

    • 11:01 - Cloth simulation
    • Discover how to add realistic cloth simulation to your scenes using ClothBodyComponent, ClothColliderComponent, and cloth mesh resources. Includes how to pin cloth vertices to anchor points using kinematic motion types.

    • 13:42 - Performance
    • Cover performance optimization techniques, including mesh level of detail (LOD) using LevelOfDetailComponent with camera-distance and screen-area algorithms, and how to monitor and respond to device thermal state changes.

    • 17:09 - 3D Gaussian splats
    • Learn how to render high-fidelity real-world captures using RealityKit's 3D Gaussian splat support. Covers how to construct a GaussianSplatResource from position, scale, rotation, opacity, and spherical harmonics buffers, and attach it via GaussianSplatComponent.

    • 19:08 - Immersive audio
    • Explore RealityKit's immersive audio features for Apple Vision Pro, including custom reverb meshes that model the acoustic properties of virtual and real environments. Covers ReverbMeshResource, built-in preset materials, and creating custom materials with absorption and scattering coefficients.

    • 22:42 - Next steps
    • Recap of session topics and pointers to related sessions, sample code, and documentation to explore more of what RealityKit has to offer this year.

Developer Footer

  • 视频
  • WWDC26
  • 探索 RealityKit 的新进展
  • 打开菜单 关闭菜单
    • iOS
    • iPadOS
    • macOS
    • Apple tvOS
    • visionOS
    • watchOS
    打开菜单 关闭菜单
    • Swift
    • SwiftUI
    • Swift Playground
    • TestFlight
    • Xcode
    • Xcode Cloud
    • SF Symbols
    打开菜单 关闭菜单
    • 辅助功能
    • 配件
    • Apple 智能
    • App 扩展
    • App Store
    • 音频与视频 (英文)
    • 增强现实
    • 设计
    • 分发
    • 教育
    • 字体 (英文)
    • 游戏
    • 健康与健身
    • App 内购买项目
    • 本地化
    • 地图与位置
    • 机器学习与 AI
    • 开源资源 (英文)
    • 安全性
    • Safari 浏览器与网页 (英文)
    打开菜单 关闭菜单
    • 完整文档 (英文)
    • 部分主题文档 (简体中文)
    • 教程
    • 下载
    • 论坛 (英文)
    • 视频
    打开菜单 关闭菜单
    • 支持文档
    • 联系我们
    • 错误报告
    • 系统状态 (英文)
    打开菜单 关闭菜单
    • Apple 开发者
    • App Store Connect
    • 证书、标识符和描述文件 (英文)
    • 反馈助理
    打开菜单 关闭菜单
    • Apple Developer Program
    • Apple Developer Enterprise Program
    • App Store Small Business Program
    • MFi Program (英文)
    • Mini Apps Partner Program
    • News Partner Program (英文)
    • Video Partner Program (英文)
    • 安全赏金计划 (英文)
    • Security Research Device Program (英文)
    打开菜单 关闭菜单
    • 与 Apple 会面交流
    • Apple Developer Center
    • App Store 大奖 (英文)
    • Apple 设计大奖
    • Apple Developer Academies (英文)
    • WWDC
    阅读最近新闻。
    获取 Apple Developer App。
    版权所有 © 2026 Apple Inc. 保留所有权利。
    使用条款 隐私政策 协议和准则