Overview
The camera that converts a Solid SDF volume into a pixel-art asset. It uses orthographic projection with one ray per pixel and outputs a Surface, a pixel-art G-buffer containing normals, height, depth, and material IDs. This node sits at the center of the 3D ā pixel-art lane for 2:1 isometric blocks and eight-direction characters.
- Does not perform lighting: downstream nodes such as
ćµć¼ćć§ć¼ć¹å ćć¬ćć„ć¼add light.
Usage tips
- The minimum setup is
ć½ćŖćććććÆć¹ ā ć½ćŖććć¬ć³ććŖć³ć° ā ćµć¼ćć§ć¼ć¹å ćć¬ćć„ć¼. Start here to learn how a volume becomes pixel art. - Set pixel density with
pixels_per_unit: at 16, a 1Ć1Ć1 box is approximately 16px. Match asset size with this value, not by moving the camera. - The fastest way to find an angle is to drag in the 3D viewer, then write it back with
ćć®č§åŗ¦ćę”ēØ. - Use
AutoFitfor one still image; always useFixedCanvasfor animation, eight directions, or a turntable. Auto-fitting changes dimensions with orientation and makes multiple frames jitter. - The flat
imageoutput is for checking coverage. The primary output issurfacefollowed by lighting nodes.
Common pitfalls
- Frame dimensions or center shift between frames: rotation is still using
frame_mode = AutoFit. Switch toFixedCanvasand makeframe_world_*large enough for the subject in every frame. - The screen is plain white/black with no depth: this node intentionally does not
light. Connect
surfacetosurface_light_previewor a lighting definition. - Eight-direction angles are slightly off: set
camera_angle_snap = 45to round them and absorb floating-point drift during animation. - The outline is blurry: this node cannot blur because it has no AA and uses point sampling. Check enlargement filtering in the display.
Technical details
AutoFitfits output dimensions to the volume bounds, up to 1024px.FixedCanvasfixes output dimensions and look-at center; use it for turntables and eight-direction assets.- One output pixel = one ray, with point sampling and no AA for pixel art.
- normal_map is view-space: x right, y down in the image, z toward the viewer. This
matches the
ćµć¼ćć§ć¼ć¹å ćć¬ćć„ć¼contract. - height_map is normalized world z, white = high; depth_map is view depth, white = near.
- curvature_map is screen-space curvature: 0.5 = flat, >0.5 = convex edge. It is used for edge highlights.
- face_ids use
{solid_id}:top/:left/:right/:front/:back/:bottom. If a generator'ssolid_idis blank, an automatic ID such assolid:0is used. - Implementation is
crates/pxn-core/src/sdf_render.rswith rayon parallelism. Reference performance: about 3.3ms for 129Ć81px with 20 primitives in release mode.
3D viewer integration
- The 3D view in the inspector or preview window ray-marches the connected Solid input
directly in
Solid3DStage. - Drag in the viewer to find an angle, then press
ćć®č§åŗ¦ćę”ēØto write backazimuth,elevation_preset=Custom, andcustom_elevation. - The viewer checker and light gizmo are display-only and are not baked into
surfaceorimageoutput.
Examples
ć½ćŖćććććÆć¹ ā ć½ćŖććć¬ć³ććŖć³ć° ā ćµć¼ćć§ć¼ć¹å ćć¬ćć„ć¼is the minimum isometric-block setup.TimeSource ā SawtoothWave ā ć½ćŖććå¤ę.å転Z ā ć½ćŖććć¬ć³ććŖć³ć°.image ā AnimationRendercreates a turntable sprite sheet.- For eight directions, use
VariantRange(key=render:azimuth, start=0, end=315, count=8) ā BatchRender.itemstogether withcamera_angle_snap=45andFixedCanvas. - Connect
ćµć¼ćć§ć¼ć¹ęøćåŗćto produce a map set for an HD-2D engine.
Recommendations for animation
frame_mode = FixedCanvas- Set
fixed_canvas_width/fixed_canvas_heightto final single-frame dimensions. - Make
frame_world_width/depth/heightlarge enough to contain the subject in every frame. - For eight-direction assets, use
camera_angle_snap = 45.
Related nodes
solid_box/solid_sphere/solid_combineā build the volume to photographsurface_light_previewā the go-to next step for lighting the output Surfacemodel_renderā equivalent camera for the Model mesh lane with shared parameter vocabularysurface_exportā export the Surface as a game-engine texture set