diff --git a/built-in-nodes/Load3D.mdx b/built-in-nodes/Load3D.mdx new file mode 100644 index 00000000..8668aefd --- /dev/null +++ b/built-in-nodes/Load3D.mdx @@ -0,0 +1,140 @@ +--- +title: "Load3D - ComfyUI Built-in Node Documentation" +description: "The Load3D node is a core node in ComfyUI for loading and previewing various 3D model files, supporting multi-format import and rich three-dimensional view operations." +sidebarTitle: "Load3D" +icon: "circle" +--- + +The Load3D node is a core node for loading and processing 3D model files. When loading the node, it automatically retrieves available 3D resources from `ComfyUI/input/3d/`. You can also upload supported 3D files for preview using the upload function. + +**Supported Formats** +Currently, this node supports multiple 3D file formats, including `.gltf`, `.glb`, `.obj`, `.fbx`, and `.stl`. + +**3D Node Preferences** +Some related preferences for 3D nodes can be configured in ComfyUI's settings menu. Please refer to the following documentation for corresponding settings: + +[Settings Menu - 3D](/interface/settings/3d) + +Besides regular node outputs, Load3D has lots of 3D view-related settings in the canvas menu. + +## Inputs + +| Parameter Name | Type | Description | Default | Range | +|---------------|----------|---------------------------------|---------|--------------| +| model_file | File Selection | 3D model file path, supports upload, defaults to reading model files from `ComfyUI/input/3d/` | - | Supported formats | +| width | INT | Canvas rendering width | 1024 | 1-4096 | +| height | INT | Canvas rendering height | 1024 | 1-4096 | + +## Outputs + +| Parameter Name | Data Type | Description | +|-----------------|----------------|------------------------------------| +| image | IMAGE | Canvas rendered image | +| mask | MASK | Mask containing current model position | +| mesh_path | STRING | Model file path | +| normal | IMAGE | Normal map | +| lineart | IMAGE | Line art image output, corresponding `edge_threshold` can be adjusted in the canvas model menu | +| camera_info | LOAD3D_CAMERA | Camera information | +| recording_video | VIDEO | Recorded video (only when recording exists) | + +All corresponding outputs preview +![View Operation Demo](/images/comfy_core/load3d/load3d_outputs.jpg) + +## Canvas Area Description + +The Load3D node's Canvas area contains numerous view operations, including: +- Preview view settings (grid, background color, preview view) +- Camera control: Control FOV, camera type +- Global illumination intensity: Adjust lighting intensity +- Video recording: Record and export videos +- Model export: Supports `GLB`, `OBJ`, `STL` formats +- And more + +![Load 3D Node UI](/images/comfy_core/load3d/load3d_ui.jpg) + +1. Contains multiple menus and hidden menus of the Load 3D node +2. Menu for `resizing preview window` and `canvas video recording` +3. 3D view operation axis +4. Preview thumbnail +5. Preview size settings, scale preview view display by setting dimensions and then resizing window + +### 1. View Operations + + + +View control operations: +- Left-click + drag: Rotate the view +- Right-click + drag: Pan the view +- Middle wheel scroll or middle-click + drag: Zoom in/out +- Coordinate axis: Switch views + +### 2. Left Menu Functions + +![Menu](/images/comfy_core/load3d/menu.jpg) + +In the canvas, some settings are hidden in the menu. Click the menu button to expand different menus +- 1. Scene: Contains preview window grid, background color, preview settings +- 2. Model: Model rendering mode, texture materials, up direction settings +- 3. Camera: Switch between orthographic and perspective views, and set the perspective angle size +- 4. Light: Scene global illumination intensity +- 5. Export: Export model to other formats (GLB, OBJ, STL) + +#### Scene + +![scene menu](/images/comfy_core/load3d/menu_scene.jpg) + +The Scene menu provides some basic scene setting functions +1. Show/Hide grid +2. Set background color +3. Click to upload a background image +4. Hide the preview + +#### Model + +![Menu_Scene](/images/comfy_core/load3d/menu_model.jpg) + +The Model menu provides some model-related functions +1. **Up direction**: Determine which axis is the up direction for the model +2. **Material mode**: Switch model rendering modes - Original, Normal, Wireframe, Lineart + +#### Camera + +![menu_modelmenu_camera](/images/comfy_core/load3d/menu_camera.jpg) + +This menu provides switching between orthographic and perspective views, and perspective angle size settings +1. **Camera**: Quickly switch between orthographic and orthographic views +2. **FOV**: Adjust FOV angle + +#### Light + +![menu_modelmenu_camera](/images/comfy_core/load3d/menu_light.jpg) + +Through this menu, you can quickly adjust the scene's global illumination intensity + +#### Export + +![menu_export](/images/comfy_core/load3d/menu_export.jpg) + +This menu provides the ability to quickly convert and export model formats + +### 3. Right Menu Functions + + + +The right menu has two main functions: +1. **Reset view ratio**: After clicking the button, the view will adjust the canvas rendering area ratio according to the set width and height +2. **Video recording**: Allows you to record current 3D view operations as video, allows import, and can be output as `recording_video` to subsequent nodes diff --git a/docs.json b/docs.json index 453a823d..e485327a 100644 --- a/docs.json +++ b/docs.json @@ -326,6 +326,12 @@ } ] }, + { + "group": "3D", + "pages": [ + "built-in-nodes/Load3D" + ] + }, { "group": "API Node", "pages": [ @@ -866,6 +872,12 @@ } ] }, + { + "group": "3D", + "pages": [ + "zh-CN/built-in-nodes/Load3D" + ] + }, { "group": "API 节点", "pages": [ diff --git a/images/comfy_core/load3d/load3d_outputs.jpg b/images/comfy_core/load3d/load3d_outputs.jpg new file mode 100644 index 00000000..c722319d Binary files /dev/null and b/images/comfy_core/load3d/load3d_outputs.jpg differ diff --git a/images/comfy_core/load3d/load3d_ui.jpg b/images/comfy_core/load3d/load3d_ui.jpg new file mode 100644 index 00000000..46c22cdc Binary files /dev/null and b/images/comfy_core/load3d/load3d_ui.jpg differ diff --git a/images/comfy_core/load3d/menu.jpg b/images/comfy_core/load3d/menu.jpg new file mode 100644 index 00000000..fc6af16a Binary files /dev/null and b/images/comfy_core/load3d/menu.jpg differ diff --git a/images/comfy_core/load3d/menu_camera.jpg b/images/comfy_core/load3d/menu_camera.jpg new file mode 100644 index 00000000..83a21571 Binary files /dev/null and b/images/comfy_core/load3d/menu_camera.jpg differ diff --git a/images/comfy_core/load3d/menu_export.jpg b/images/comfy_core/load3d/menu_export.jpg new file mode 100644 index 00000000..74684e57 Binary files /dev/null and b/images/comfy_core/load3d/menu_export.jpg differ diff --git a/images/comfy_core/load3d/menu_light.jpg b/images/comfy_core/load3d/menu_light.jpg new file mode 100644 index 00000000..14571045 Binary files /dev/null and b/images/comfy_core/load3d/menu_light.jpg differ diff --git a/images/comfy_core/load3d/menu_model.jpg b/images/comfy_core/load3d/menu_model.jpg new file mode 100644 index 00000000..16e4298d Binary files /dev/null and b/images/comfy_core/load3d/menu_model.jpg differ diff --git a/images/comfy_core/load3d/menu_scene.jpg b/images/comfy_core/load3d/menu_scene.jpg new file mode 100644 index 00000000..9b6fe765 Binary files /dev/null and b/images/comfy_core/load3d/menu_scene.jpg differ diff --git a/images/comfy_core/load3d/recording.mp4 b/images/comfy_core/load3d/recording.mp4 new file mode 100644 index 00000000..5f077f4d Binary files /dev/null and b/images/comfy_core/load3d/recording.mp4 differ diff --git a/images/comfy_core/load3d/render_mode.jpg b/images/comfy_core/load3d/render_mode.jpg new file mode 100644 index 00000000..29a26d47 Binary files /dev/null and b/images/comfy_core/load3d/render_mode.jpg differ diff --git a/images/comfy_core/load3d/view_operations.mp4 b/images/comfy_core/load3d/view_operations.mp4 new file mode 100644 index 00000000..77af5b9a Binary files /dev/null and b/images/comfy_core/load3d/view_operations.mp4 differ diff --git a/zh-CN/built-in-nodes/Load3D.mdx b/zh-CN/built-in-nodes/Load3D.mdx new file mode 100644 index 00000000..d2faf6ae --- /dev/null +++ b/zh-CN/built-in-nodes/Load3D.mdx @@ -0,0 +1,140 @@ +--- +title: "加载3D - ComfyUI内置节点文档" +description: "Load3D 节点是 ComfyUI 中用于加载和预览多种 3D 模型文件的核心节点,支持多格式导入与丰富的三维视图操作。" +sidebarTitle: "加载3D" +icon: "circle" +--- + +Load3D 节点用于加载和处理 3D 模型文件的核心节点,在加载节点时会自动获取 ` ComfyUI/input/3d/` 可用的 3D 资源,你也可以通过上传功能将受支持的 3D 文件上传然后进行预览。 + +**支持格式** +目前该节点支持多种 3D 文件格式,包括 `.gltf`、`.glb`、`.obj`、`.fbx` 和 `.stl`。 + +**3D 节点预设** +3D 节点的一些相关偏好设置可以在 ComfyUI 的设置菜单中进行设置,请参考下面的文档了解对应的设置 +[设置菜单 - 3D](/zh-CN/interface/settings/3d) + +除了常规的节点输出之外, Load3D 有许多相关的 3D 视图相关操作是位于预览区域菜单, 3D 节点 + +## 输入 + +| 参数名 | 类型 | 描述 | 默认值 | 范围 | +|--------------|------------|--------------------------|--------|--------------| +| 模型文件 | 文件选择 | 3D 模型文件路径,支持上传,默认读取 ` ComfyUI/input/3d/` 下的模型文件 | - | 受支持格式文件 | +| 宽度 | INT | 画布渲染宽度 | 1024 | 1-4096 | +| 高度 | INT | 画布渲染高度 | 1024 | 1-4096 | + +## 输出 + +| 参数名称 | 数据类型 | 说明 | +| --------------- | ------------- | -------------------------------- | +| image | IMAGE | 画布渲染渲染图像 | +| mask | MASK | 包含当前模型位置的遮罩 | +| mesh_path | STRING | 模型文件路径在`ComfyUI/input` 文件夹下的路径 | +| normal | IMAGE | 法线贴图 | +| lineart | IMAGE | 线稿图像输出,对应的 `edge_threshold` 可在画布的模型菜单中进行调节 | +| camera_info | LOAD3D_CAMERA | 相机信息 | +| recording_video | VIDEO | 录制视频(仅当有录制视频存在时) | + +对应所有的输出预览如下: +![视图操作演示](/images/comfy_core/load3d/load3d_outputs.jpg) + +## 模型画布(Canvas)区说明 + +Load 3D 节点的 Canvas 区域包含了诸多的视图操作,包括: +- 预览视图设置(网格、背景色、预览视图) +- 相机控制: 控制FOV、相机类型 +- 全局光照强度: 调节光照强度 +- 视频录制: 录制视频并导出视频 +- 模型导出: 支持`GLB`、`OBJ`、`STL` 格式 +- 等 + +![Load 3D 节点UI](/images/comfy_core/load3d/load3d_ui.jpg) + +1. 包含了 Load 3D 节点的多个菜单以及隐藏菜单 +2. 重新`缩放预览窗口大小`以及进行`画布视频录制`菜单 +3. 3D 视图操作轴 +4. 预览缩略图 +5. 预览尺寸设置,通过设置尺寸然后再缩放窗口大小来缩放预览视图显示 + + +### 1. 视图操作 + + + +视图控制操作: +- 鼠标左键点击 + 拖拽: 视图旋转控制 +- 鼠标右键 + 拖拽: 平移视图 +- 鼠标中键: 缩放控制 +- 坐标轴: 切换视图 + +### 2. 左侧菜单功能 + +![Menu](/images/comfy_core/load3d/menu.jpg) + +在预览区域,有些视图操作相关的菜单被隐藏在了菜单里,点击菜单按钮可以展开对应不同的菜单 +- 1. 场景(Scene): 包含预览窗口网格、背景色、缩略图设置 +- 2. 模型(Model): 模型渲染模式、纹理材质、上方向设置 +- 3. 摄像机(Camera): 轴测视图和透视视图切换、透视视角大小设置 +- 4. 灯光(Light): 场景全局光照强度 +- 5. 导出(Export): 导出模型为其它格式(GLB、OBJ、STL) + +#### 场景(Scene) + +![scene menu](/images/comfy_core/load3d/menu_scene.jpg) + +场景菜单提供了对场景的一些基础设置功能 +1. 显示 / 隐藏网格 +2. 设置背景色 +3. 点击上传设置背景图片 +4. 隐藏预览图 + +#### 模型(Model) + +![Menu_Scene](/images/comfy_core/load3d/menu_model.jpg) + +模型菜单提供了一些模型的相关功能 +1. **上方向(Up direction)**: 确定模型的哪个轴为上方向 +2. **渲染模式(Material mode)**: 模型渲染模式切换 原始(Original)、法线(Normal)、线框(Wireframe)、线稿(Lineart) + +#### 摄像机(Camera) + +![menu_modelmenu_camera](/images/comfy_core/load3d/menu_camera.jpg) + +该菜单提供了轴测视图和透视视图切换、透视视角大小设置 +1. **相机(Camera)**: 在轴测视图和正交视图之间快速切换 +2. **视场角(FOV)**: 调整 FOV 视角角度 + +#### 灯光(Light) + +![menu_modelmenu_camera](/images/comfy_core/load3d/menu_light.jpg) + +通过该菜单可以快速调节模型场景的全局光照强度 + +#### 导出(Export) + +![menu_export](/images/comfy_core/load3d/menu_export.jpg) + +该菜单提供了一个快速转换模型格式并导出的能力 + +### 3. 右侧菜单功能 + + + +右侧菜单的两个主要功能为: +1. **重设视图比例**: 点击按钮后视图将根据设定好的宽高按比例调整画布渲染区域比例 +2. **视频录制**: 允许你将当前的 3D 视图操作录制为视频,允许导入,并可以作为 `recording_video` 输出给后续节点