Add Nodes/Image/Texture2DOutput

Chromum 2025-05-09 11:07:52 +00:00
parent 138cdb9abd
commit ab0a11afe5

@ -0,0 +1,43 @@
# Texture2D Output
---
## 🔌 INPUT PORTS
| Name | Type | Description |
|-----------------|-----------------|------------------------------------------------------|
| `inputPixels` | `ImageData` | The input image data to export as a texture. |
| `File Name` | `string` | The name of the exported file (without extension). |
| `File Directory` | `string` | The directory where the file will be saved. |
| `Export Type` | `ExportType` | Defines the export format: `Texture2D` or `PNG`. |
| `Texture Type` | `TextureImporterType` | The texture type for the exported texture (e.g., `NormalMap`, `Default`). |
---
## 📤 EXPORT PORTS
| Name | Type | Description |
|-----------------|-----------------|------------------------------------------------------|
| `Output Texture` | `Texture2D` | The exported texture asset. |
---
## 📝 DESCRIPTION
The **Texture2D Output** node handles the export of texture data, allowing it to be saved as either a `Texture2D` asset or a `PNG` file in a specified directory. This node is capable of handling different export formats and setting custom texture properties for the resulting assets.
This node:
- Converts `ImageData` to a `Texture2D` .asset or exports it as a `PNG`.
- Allows setting custom file names and directories for exporting.
- Provides an option to set the `TextureImporterType` for PNG exports, ensuring proper handling of texture types (such as normal maps or default textures).
This node is derived from [`BaseImageNode`](Nodes/BaseImageNode).
---
## ⚠️ KNOWN ISSUES
- The node assumes valid paths and asset names. If paths or names are invalid, errors may occur during the asset creation or export process.
- Exporting PNG files may cause a delay due to the reimport process.
---