Yotsuba Games
Back to Node List

Surface Export

surface_export

Writes a Surface as a set of PNG texture maps (albedo, normal, height, AO, emission, roughness) for game engines.

Reviewed
Guide available
The node name and summary are available in English. Port, parameter, and article details are currently shown in Japanese.

Input Ports

NameTypeDescription
ใ‚ตใƒผใƒ•ใ‚งใƒผใ‚น
surface
Surface
Required
ใƒ†ใ‚ฏใ‚นใƒใƒฃใ‚ปใƒƒใƒˆใจใ—ใฆๆ›ธใๅ‡บใ™ใ‚ตใƒผใƒ•ใ‚งใƒผใ‚นใงใ™ใ€‚

Output Ports

NameTypeDescription
ใƒ—ใƒฌใƒ“ใƒฅใƒผ
preview
Image
ๆ›ธใๅ‡บใ™ใ‚ตใƒผใƒ•ใ‚งใƒผใ‚นใฎ่ฆ‹ใŸ็›ฎ็”ปๅƒใงใ™ใ€‚
่ญฆๅ‘Š
warnings
Text
็œ็•ฅใƒžใƒƒใƒ—ใ€ไธ–ไปฃๆททๅœจใฎ่ฟฝๅŠ ใ€ใ‚ปใƒƒใƒˆๅ…จไฝ“ใฎใ‚นใ‚ญใƒƒใƒ—ใซ้–ขใ™ใ‚‹่ญฆๅ‘Šใงใ™ใ€‚

Parameters

NameTypeDefaultRangeDescription / Options
ไฟๅญ˜ๅ…ˆ(ใƒ™ใƒผใ‚น)
path
FilePath
โ€”โ€”

ๅŸบๆบ–ใซใชใ‚‹.pngใƒ‘ใ‚นใงใ™ใ€‚ใƒ•ใ‚กใ‚คใƒซๅใซใƒžใƒƒใƒ—ใ”ใจใฎใ‚ตใƒ•ใ‚ฃใƒƒใ‚ฏใ‚นใŒไป˜ใใพใ™(ไพ‹: brick.png โ†’ brick_n.png)ใ€‚

ไฟๅญ˜ใƒขใƒผใƒ‰
save_mode
Enum
Disabledโ€”

ใƒ•ใ‚กใ‚คใƒซใ‚’ไฟๅญ˜ใ™ใ‚‹ใ‹ใ€ๆ—ขๅญ˜ใƒ•ใ‚กใ‚คใƒซใ‚’ไธŠๆ›ธใใ™ใ‚‹ใ‹ใงใ™ใ€‚

  • ็„กๅŠนDisabled
  • ไธ่ถณใƒžใƒƒใƒ—ใ‚’่ฟฝๅŠ CreateIfMissing
    ๆ—ขๅญ˜ใƒ•ใ‚กใ‚คใƒซใ‚’ไฟๆŒใ—ใ€ไธ่ถณใƒžใƒƒใƒ—ใ ใ‘่ฟฝๅŠ ใ—ใพใ™ใ€‚็•ฐใชใ‚‹็”Ÿๆˆๆ™‚็‚นใฎใƒžใƒƒใƒ—ใŒๆททๅœจใ™ใ‚‹ๅฏ่ƒฝๆ€งใŒใ‚ใ‚Šใพใ™ใ€‚
  • ใ‚ปใƒƒใƒˆใŒ็„กใ„ๆ™‚ใฎใฟCreateSetIfMissing
    ๅฏพ่ฑกใƒ•ใ‚กใ‚คใƒซใŒ1ใคใ‚‚ๅญ˜ๅœจใ—ใชใ„ๆ™‚ใ ใ‘ใ€ใƒžใƒƒใƒ—ใ‚ปใƒƒใƒˆๅ…จไฝ“ใ‚’ๆ›ธใ่พผใฟใพใ™ใ€‚
  • ไธŠๆ›ธใOverwrite
ๅ‘ฝๅ่ฆ็ด„
naming
Enum
Suffixโ€”

ใƒžใƒƒใƒ—ใ‚ปใƒƒใƒˆใฎใƒ•ใ‚กใ‚คใƒซๅ‘ฝๅ่ฆ็ด„ใงใ™ใ€‚

  • ็Ÿญ็ธฎๅฝขSuffix
    base.png / base_n.png / base_h.png / base_ao.png / base_e.png / base_r.png
  • UnityUnity
    base_Albedo / base_Normal / base_Height / base_Occlusion / base_Emission / base_Roughness
  • GodotGodot
    base_albedo / base_normal / base_height / base_ao / base_emission / base_roughness
ๆณ•็ทšใฎY่ปธ่ฆ็ด„
normal_convention
Enum
OpenGLโ€”

ๆ›ธใๅ‡บใ—ๅ…ˆใ‚จใƒณใ‚ธใƒณใฎใƒŽใƒผใƒžใƒซใƒžใƒƒใƒ—่ฆ็ด„ใงใ™ใ€‚ๅ†…้ƒจใฏOpenGL่ฆ็ด„ใงไฟๆŒใ—ใฆใ„ใ‚‹ใŸใ‚ใ€DirectXใ‚’้ธใถใจGใƒใƒฃใƒณใƒใƒซใ‚’ๅ่ปขใ—ใพใ™ใ€‚

  • OpenGL (Godot็ญ‰)OpenGL
    GใƒใƒฃใƒณใƒใƒซใŒไธŠๅ‘ใ(+Y)ใงใ™ใ€‚Godot ใ‚„ Blender ใงไฝฟใ‚ใ‚Œใพใ™ใ€‚
  • DirectX (Unity็ญ‰)DirectX
    GใƒใƒฃใƒณใƒใƒซใŒไธ‹ๅ‘ใ(-Y)ใงใ™ใ€‚Unity ใ‚„ Unreal ใงไฝฟใ‚ใ‚Œใพใ™ใ€‚
ๆ‹กๅคงๅ€็އ
scale
Int
11โ€“16

ๅ…จใƒžใƒƒใƒ—ใซ้ฉ็”จใ™ใ‚‹ๆ•ดๆ•ฐๅ€ใฎๆœ€่ฟ‘ๅ‚ๆ‹กๅคงใงใ™ใ€‚

่ฆ‹ใŸ็›ฎใ‚’ๆ›ธใๅ‡บใ™
export_albedo
Bool
trueโ€”

่ฆ‹ใŸ็›ฎใฎ็”ปๅƒใ‚’ๆ›ธใๅ‡บใ—ใพใ™ใ€‚

ๆณ•็ทšใ‚’ๆ›ธใๅ‡บใ™
export_normal
Bool
trueโ€”

ๆณ•็ทšใƒžใƒƒใƒ—ใŒใ‚ใ‚Œใฐๆ›ธใๅ‡บใ—ใพใ™ใ€‚

้ซ˜ใ•ใ‚’ๆ›ธใๅ‡บใ™
export_height
Bool
trueโ€”

้ซ˜ใ•ใƒžใƒƒใƒ—ใŒใ‚ใ‚Œใฐๆ›ธใๅ‡บใ—ใพใ™ใ€‚

ใใผใฟใ‚’ๆ›ธใๅ‡บใ™
export_ao
Bool
trueโ€”

ใใผใฟใƒžใƒƒใƒ—ใŒใ‚ใ‚Œใฐๆ›ธใๅ‡บใ—ใพใ™ใ€‚

็™บๅ…‰ใ‚’ๆ›ธใๅ‡บใ™
export_emission
Bool
trueโ€”

็™บๅ…‰ใƒžใƒƒใƒ—ใŒใ‚ใ‚Œใฐๆ›ธใๅ‡บใ—ใพใ™ใ€‚

ใ–ใ‚‰ใคใใ‚’ๆ›ธใๅ‡บใ™
export_roughness
Bool
trueโ€”

ใ–ใ‚‰ใคใใƒžใƒƒใƒ—ใŒใ‚ใ‚Œใฐๆ›ธใๅ‡บใ—ใพใ™ใ€‚

Overview

Exports a Surface as a set of PNG textures for a game engine, including albedo, normal, and height. This is the exit for engine-side HD-2D rendering, with selectable naming conventions for Godot/Unity and normal-map Y-axis convention.

  • Side effect: yes (has_side_effects: true, writes files)

Usage tips

  • Go-to engine settings: Godot StandardMaterial3D โ†’ naming=Godot / normal=OpenGL; Unity Lit โ†’ naming=Unity / normal=DirectX. See Examples below.
  • Follow the standard export-node workflow: use save_mode = Disabled while building, and switch to Overwrite only when exporting.
  • CreateIfMissing adds only missing maps to an existing set and warns when that mixes generations. Use CreateSetIfMissing for all-or-none creation of the set.
  • Set integer enlargement with scale here when pixel art should display larger in the engine.
  • Choose the exit by responsibility: for one fully lit PNG from PixPipeline, use surface_light_preview โ†’ batch_export; for engine-side lighting, use this node.

Common pitfalls

  • Normals look recessed in the engine: the normal Y-axis convention does not match. Choose OpenGL/DirectX for the engine. Internal storage is OpenGL; G is flipped only for DirectX.
  • No files are written: save_mode is still Disabled, as with the other Export nodes.
  • Some selected maps are missing: the input Surface has no data for those maps. Check warnings and the internal _omitted_maps result for their stable map IDs.

Technical details

  • Internal normal maps use the OpenGL convention (+Y up). Only DirectX output flips G with flip_normal_map_y() from pxn-core.
  • Enlargement uses nearest-neighbor interpolation through scale_image_nearest() from pxn-core.
  • Enabled maps absent from the input Surface are explicitly omitted; no neutral textures are synthesized. warnings and _omitted_maps: List<Text> report their stable IDs. _written_maps: List<Text> contains only maps actually written by this run, while unchanged / already-exists remain distinguishable through _effect_outcome.

Examples

  • Use Image To Surface โ†’ Surface Export to create a map set that an HD-2D engine can load as a material.
  • For Godot StandardMaterial3D, use naming=Godot / normal=OpenGL. For Unity Lit, use naming=Unity / normal=DirectX.

Related nodes

  • solid_render / model_render / image_to_surface โ€” supply the Surface to export
  • surface_light_preview + batch_export โ€” alternate route for a lit PNG from the app
  • model_gltf_export โ€” import the mesh itself
  • tiled_tileset_export โ€” export in tileset format
Back to Node List
Surface Export โ€” PixPipeline Node Reference