Skip to content

Conversation

@gameknife
Copy link
Owner

No description provided.

gameknife and others added 30 commits January 25, 2026 23:46
- Read KHR_materials_emissive_strength extension for emissive strength
- Identify pure emissive materials (emissiveFactor > 0.001 without emissiveTexture)
- Set MaterialModel to DiffuseLight for pure emissive materials
- Apply emissiveColor * emissiveStrength as diffuse color
- Simplify emissiveTexture handling logic
- Simplify CMake options: GK_ENABLE_* → ENABLE_*
- Unify Vulkan SDK versions across CI (1.4.313.x)
- Add incremental configure support (--reconfigure to force)
- Add ENABLE_LTO option (default OFF)
- Increase Unity Build batch size to 12
- Centralize source file definitions in SourceFiles.cmake

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Enable ImGuizmo-based transforms and selection edge highlighting in editor and renderer, with input gating and CPU BVH refresh after edits.

Co-authored-by: codex <codex@openai.com>
Document gizmo integration lessons and clarify co-author attribution for the active model.

Co-authored-by: gpt-5.2-codex <gpt-5.2-codex@openai.com>
- Implement smooth camera focus on selected nodes
- Add Alt+RightClick orbit controls using selected node bounds
- Refactor node bounds calculation into Assets::Scene for reuse
- Optimize rotation inversion in Orbit using transpose
Implement scene export functionality to save edited scenes as GLTF/GLB files.

Core Features:
- Add FSceneSaver class for scene serialization
- Serialize Node hierarchy with TRS transforms
- Export Mesh geometry (vertices, normals, UVs, tangents, indices)
- Export Material PBR parameters (base color, metallic, roughness)
- Export Camera data and node associations
- Texture export placeholder (GPU readback to be implemented)

Editor Integration:
- Add "Save Scene As..." menu item with Ctrl+Shift+S shortcut
- Add KeepCPUMeshData option for editor mode to retain mesh data

Additional Improvements:
- Add EmissiveTexture loading support in FSceneLoader
- Exclude FSceneLoader/FSceneSaver from Unity Build to avoid STB conflicts
- Add const overload for Scene::Materials()

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Introduce runtime command stack and gizmo/delete hooks so apps can undo or redo node transforms, duplication, and deletion.

Co-authored-by: gpt-5.2-codex <gpt-5.2-codex@openai.com>
Allow users to add glTF/GLB models to the current scene without unloading existing content.

Core Features:

- Implement Scene::Append to merge new scene data (nodes, materials, models, lights, tracks) into the active scene.

- Ensure unique root node naming for appended scenes (e.g., SceneName_1).

- Remap resource IDs (ModelId, MaterialId) to avoid conflicts.

- Refactor NextEngine scene loading logic using LaunchLoadSceneTask to reduce duplication between LoadScene and LoadSceneAdd.

Editor Integration:

- Add Add To Scene context menu option for GLB files in Content Browser.

- Register ECmdIO_LoadSceneAdd editor command.
Co-authored-by: gpt-5-codex <gpt-5-codex@openai.com>
Co-authored-by: gpt-5-codex <gpt-5-codex@openai.com>
- Add PropertyAccessor, PropertyTypes, PropertyMeta for reflection core
- Add PropertyWidgets for auto-generated ImGui property editing
- Add CommandHistory and PropertyCommand for undo/redo support
- Register RenderComponent, PhysicsComponent, SkinnedMeshComponent properties
- Support arrays (std::array, std::vector) and enum types
- Refactor DrawArray() with template helper to reduce duplication
- Add centralized ContainerTypeInfo registry in PropertyAccessor
- Add AGENT_GUIDE/ReflectionSystem.md documentation

Co-authored-by: claude-opus-4.5 <claude-opus-4.5@anthropic.com>
Moves command system into Runtime and adds an editor history panel for debugging, while tightening merge and undo handling consistency.

Co-authored-by: gpt-5.2-codex <gpt-5.2-codex@openai.com>
Refines the viewport status bar styling and drop-target padding, and matches the gizmo toolbar background and bottom-center placement.

Co-authored-by: gpt-5.2-codex <gpt-5.2-codex@openai.com>
- Remove line length limit requirements from all agent docs
- Update build flags to use preset system (minimal/default/full)
- Clarify shader uses ray query not ray pipeline (remove rmiss.slang)
- Expand CLAUDE.md with subprojects, architecture tree, and test commands

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…zmo transform

When moving nodes via gizmo, the CPU acceleration structure (BVH) was updated
but voxelization tasks were not queued, causing probe/voxel data to remain stale.
Now AsyncProcessFull is called when sceneDirtyForCpuAS_ is set, which properly
queues voxelization tasks. Also removed redundant UpdateBVH call from
TransformNodeCommand since AsyncProcessFull already handles it.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Run tsc on Linux during runtime and resolve local bin copy before PATH.

Co-authored-by: gpt-5.2-codex <gpt-5.2-codex@openai.com>
Add JS bridge helpers, TS definition generation, and update test.ts to use object-style component access.

Co-authored-by: gpt-5.2-codex <gpt-5.2-codex@openai.com>
Avoid redundant tsc runs, improve output path handling, and expand reflected d.ts coverage.

Co-authored-by: gpt-5.2-codex <gpt-5.2-codex@openai.com>
…FocusAnimation

- Extract FocusAnimation class for cleaner separation of concerns
- Replace 12 bool movement flags with MovementInput struct (25->18 members)
- Optimize Get*() methods to return cached vectors instead of computing matrix inverse
- Add WASDQE camera movement only when right mouse pressed (Unreal Engine style)
- Add double-click to focus on node in Outliner panel
- Add Camera_FocusSelected action with node ID parameter support
- Disable gizmo shortcuts (W/E/R) when right mouse is pressed
- Add Scene::GetNodeBounds() for direct node bounds query

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Move scene/node access to reflection, add node component access, and streamline QuickJS bindings and d.ts.

Co-authored-by: gpt-5.2-codex <gpt-5.2-codex@openai.com>
- Move UserSettings.hpp to Runtime/Config/
- Move ShowFlags.hpp to Runtime/Config/
- Update all include paths
- Move TaskCoordinator.cpp/hpp to Runtime/Utilities/
- Update all include paths
- Move SceneList.cpp/hpp to Runtime/Scene/
- Move GltfTestRunner.cpp/hpp to Runtime/Scene/
- Update all include paths
- Move ModelViewController.cpp/hpp to Runtime/Camera/
- Move FocusAnimation.cpp/hpp to Runtime/Camera/
- Move NextEngineHelper.cpp/h to Runtime/Camera/
- Update all include paths
gameknife and others added 20 commits February 2, 2026 10:55
- Move UserInterface.cpp/hpp to Runtime/Editor/
- Move GizmoController.cpp/hpp to Runtime/Editor/
- Move ScreenShot.cpp/hpp to Runtime/Editor/
- Update all include paths
- Move NextAudio.cpp/h to Runtime/Subsystems/
- Move NextPhysics.cpp/h to Runtime/Subsystems/
- Move NextPhysicsTypes.h to Runtime/Subsystems/
- Move NextAnimation.cpp/h to Runtime/Subsystems/
- Move QuickJSEngine.cpp/hpp to Runtime/Subsystems/
- Update all include paths
- Update CMakeLists.txt iOS special handling
- Fix Engine.hpp include in QuickJSEngine.cpp
- Fix Engine.hpp include in NextAnimation.cpp
- Fix Engine.hpp include in NextPhysics.cpp
- Fix Engine.hpp include in UserInterface.cpp
- Fix PlatformCommon.h include in QuickJSEngine.cpp
- Add GLM_ENABLE_EXPERIMENTAL define in GizmoController.cpp
- Move imgui.h include before GizmoController.hpp to fix ImGuizmo dependency
- Fixes compilation errors caused by Unity Build file ordering changes
- Move TaskCoordinator from Utilities/ to Subsystems/ (it's a subsystem)
- Move NextEngineHelper from Camera/ to Utilities/ (it's a utility function)
- Move ScreenShot from Editor/ to Runtime/ root (it's a basic runtime feature)
- Add missing Assets/Node.h include in Engine.cpp
- Update all include paths accordingly
Reorganize Assets directory by moving pure data structures into
Data/ subdirectory for better code organization.

Files moved:
- Vertex.hpp → Data/Vertex.hpp
- Material.hpp → Data/Material.hpp
- Skeleton.hpp → Data/Skeleton.hpp
- Animation.hpp/cpp → Data/Animation.hpp/cpp

Updated all include paths across the codebase to reflect new structure.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Move CPU acceleration structure files to dedicated Acceleration/ subdirectory.

Files moved:
- CPUAccelerationStructure.h/cpp → Acceleration/CPUAccelerationStructure.h/cpp

Updated all include paths to use absolute paths from src root.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Move loader and saver files to Loaders/ and Savers/ subdirectories.

Files moved:
- FSceneLoader.h/cpp → Loaders/FSceneLoader.h/cpp
- FProcModel.h/cpp → Loaders/FProcModel.h/cpp
- FSceneSaver.h/cpp → Savers/FSceneSaver.h/cpp

Updated CMakeLists.txt to reflect new paths for Unity Build exclusions.
Fixed all include paths to use absolute paths from src root.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Move GPU resource management files to dedicated GPU/ subdirectory.

Files moved:
- UniformBuffer.hpp/cpp → GPU/UniformBuffer.hpp/cpp
- TextureImage.hpp/cpp → GPU/TextureImage.hpp/cpp
- Texture.hpp/cpp → GPU/Texture.hpp/cpp

Updated all include paths across Runtime, Rendering, Editor, and Vulkan modules.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Move core data model files to dedicated Core/ subdirectory.

Files moved:
- Component.h → Core/Component.h
- Node.h/cpp → Core/Node.h/cpp
- Model.hpp/cpp → Core/Model.hpp/cpp
- Scene.hpp/cpp → Core/Scene.hpp/cpp

Updated all include paths across the entire codebase (Runtime, Rendering,
Editor, Application, Tests, and Vulkan modules).

Fixed all internal references within Core files to use absolute paths.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Consolidate window system classes into single file
- Reduce file count: 42 -> 40 pairs (3 files merged)
- Total lines: 309 (Window 238 + Surface 50 + WindowConfig 21)
- Update all include paths across codebase

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
…Timing

- Consolidate synchronization primitives and GPU timing into single file
- Reduce file count: 40 -> 37 pairs (3 files merged)
- Total lines: 436 (Fence 79 + Semaphore 62 + VulkanGpuTimer 295)
- Update include paths across codebase

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
…mmands into CommandExecution

- Merged 3 files into CommandExecution.hpp/cpp
- CommandPool: manages command pool and queue allocation
- CommandBuffers: manages command buffer allocation and recording
- SingleTimeCommands: utility for single-time command submission
- All classes clearly separated with // ============ markers
- Updated all references across codebase

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Merged 5 files into DescriptorSystem.hpp/cpp
- DescriptorBinding: struct defining descriptor binding parameters
- DescriptorPool: manages descriptor pool allocation
- DescriptorSetLayout: manages descriptor set layout
- DescriptorSets: manages descriptor set allocation and updates
- DescriptorSetManager: high-level manager coordinating pool, layout, and sets
- All classes clearly separated with // ============ markers
- Updated all references across codebase

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
…lineBase into RenderingPipeline

- Consolidate rendering pipeline components into single file
- Reduce file count: 8 -> 2 pairs (6 files merged)
- Total lines: 564 (RenderPass: 291, FrameBuffer: 74, PipelineLayout: 83, PipelineBase: 34)
- Update include paths across codebase
- Move Device, SwapChain, DescriptorSystem includes to header for PipelineBase

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
…Image into GpuResources

- Consolidate GPU resource management into single file
- Reduce file count: 10 -> 2 pairs (8 files merged)
- Total lines: 664 (Image: 237, ImageView: 37, Buffer: 86, DepthBuffer: 71, RenderImage: 74)
- Update include paths across 25+ files in codebase
- Move helper functions (FindSupportedFormat, FindDepthFormat) to anonymous namespace

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
…ryAndShader

- Merged 3 file pairs into MemoryAndShader.hpp/cpp
- Preserved BufferUtil.hpp as independent file (template dependencies)
- Updated all include references
- Phase 7 complete

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Merged the following files into DebugUtilities.hpp/cpp:
- DebugUtils, DebugUtilsMessenger
- Strings (utility class for Vulkan enums)
- Enumerate (template utilities)
- ImageMemoryBarrier, BufferMemoryBarrier
- Version (driver version handling)
- Vulkan.hpp/cpp (core Check and ToString functions)

This creates a single comprehensive utilities file containing:
- Core Vulkan error checking and result string conversion
- Debug naming and markers for Vulkan objects
- Validation layer callback setup
- Memory barrier helper classes
- Enumerate template functions for Vulkan queries
- String conversion utilities for device types and vendors
- Version parsing utilities

Phase 8 complete - reduced 14 files (7 pairs + 3 header-only) to 1 pair

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Completes comprehensive reorganization of src/Vulkan directory:
- Reduced file count by 73% (84 -> 23 source files)
- Consolidated related classes into cohesive modules
- All tests passing (7/7 test cases, 31 assertions)

Merged components:
- WindowSurface (Window + Surface + WindowConfig)
- SyncAndTiming (Fence + Semaphore + VulkanGpuTimer)
- CommandExecution (CommandPool + CommandBuffers + SingleTimeCommands)
- DescriptorSystem (5 descriptor classes)
- RenderingPipeline (RenderPass + FrameBuffer + PipelineLayout + PipelineBase)
- GpuResources (Image + ImageView + Buffer + DepthBuffer + RenderImage)
- MemoryAndShader (DeviceMemory + Sampler + ShaderModule)
- DebugUtilities (7+ debug/utility files)

Retained: BufferUtil.hpp (template dependencies), RayTracing/ subdirectory

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Align MinGW defaults and platform handling to keep MSYS2 builds working.\n\nCo-authored-by: gpt-5.2-codex <gpt-5.2-codex@openai.com>
@gemini-code-assist
Copy link

Summary of Changes

Hello @gameknife, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

此拉取请求的核心目标是为引擎引入一个功能完善的编辑器工作流,通过深度集成反射系统,实现了属性的动态UI展示、脚本交互和强大的撤销/重做机制。同时,对构建系统、场景管理和文件结构进行了全面优化,为未来的开发和维护奠定了坚实基础。

Highlights

  • 编辑器与反射系统重构: 此PR对引擎的编辑器和反射系统进行了大规模重构和增强。引入了一个统一的属性反射系统,支持编辑器UI自动生成、QuickJS绑定以及撤销/重做功能。新增了Gizmo控制器,允许在编辑器中进行3D变换操作,并集成了撤销/重做命令。
  • CMake配置更新: CMake配置进行了多项更新,包括将所有GK_ENABLE_XXX选项重命名为ENABLE_XXX以保持一致性,为MinGW平台添加了新的预设配置,并引入了链接时优化(LTO)选项。此外,Unity Build的批处理大小增加,并排除了特定文件以避免编译冲突。
  • 场景管理与GLTF导出: 场景管理功能得到显著增强,新增了场景追加(Append)功能,支持将外部场景合并到当前场景中。同时,实现了将运行时场景导出为GLTF/GLB格式的功能,允许用户保存编辑后的场景。新增了节点删除和复制的撤销/重做命令。
  • QuickJS脚本与TypeScript集成: QuickJS引擎现在支持TypeScript源码的热重载,并能根据C++反射数据自动生成TypeScript定义文件。JS绑定也通过反射机制得到了扩展,允许脚本访问和修改节点及组件的属性和方法。
  • 文件结构与命名规范调整: 项目文件结构进行了大量调整,将Assets下的文件按功能拆分到Assets/CoreAssets/DataAssets/GPUAssets/LoadersAssets/Savers等子目录。Runtime下的模块也进行了类似重构,例如Runtime/CameraRuntime/ConfigRuntime/EditorRuntime/Subsystems等,以提高代码组织性和可维护性。
Ignored Files
  • Ignored by pattern: .github/workflows/** (4)
    • .github/workflows/android.yml
    • .github/workflows/ios.yml
    • .github/workflows/macos.yml
    • .github/workflows/windows.yml
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This is a massive and impressive overhaul of the engine's architecture. The introduction of a full reflection system, a command history for undo/redo, and a complete refactoring of the editor UI are huge steps forward for the project's maintainability and feature set. The code is well-structured, and the separation of concerns is much clearer now. The improvements to the build scripts and camera controls are also very welcome.

I have a few specific comments:

  • In assets/typescript/Engine.d.ts, I've suggested tightening some types from any to improve script safety.
  • In src/Assets/Loaders/FSceneLoader.cpp, I've raised a concern about disabling optimizations, as this can hide bugs and impact performance.
  • In src/Application/MagicaLego/MagicaLegoUserInterface.cpp, I've suggested adding error handling for the ffmpeg process to make the video recording feature more robust.

Overall, this is an excellent set of changes that significantly matures the engine. Great work!

Comment on lines +14 to +15
RegisterJSCallback(arg0: any): void;
GetScenePtr(): any;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The use of any for RegisterJSCallback and GetScenePtr reduces type safety in the scripting environment. Could these be typed more strictly? For example, GetScenePtr could return Scene, and the callback parameter could be defined if it has a consistent structure.

Suggested change
RegisterJSCallback(arg0: any): void;
GetScenePtr(): any;
RegisterJSCallback(callback: (deltaTime: number) => void): void;
GetScenePtr(): Scene;

- fix on non-unity build
- use right vulkansdk ver for macos & ios
- review issues
- quickjs default disabled, for android build
@gameknife gameknife merged commit 52928eb into main Feb 3, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants