Blueprint to 3D Pipeline
This skill automates the process of converting a dirty blueprint or sketch into a 3D model by chaining two distinct AI tools.
The Master Pipeline
When a user asks you to convert a blueprint or sketch into a 3D model, you MUST follow this precise 3-step pipeline:
Step 1: Clean and Solidify (via Nano Banana Pro)
- Read the user's uploaded blueprint image file path.
- Run the Nano Banana Image-to-Image editing script to convert the sketch into a clean, solid render.
Use the following command format:
uv run {baseDir}/../nano-banana-pro/scripts/generate_image.py --prompt "Reference the outer shell and proportions of this blueprint. Ignore and remove ALL text, arrows, grids, and transparent internal mechanical structures. Generate a solid, opaque, hyper-realistic, photorealistic 3D external render of this object against a pure clean white background." --filename "C:\Users\Hymira\Desktop\nanobanana\step1_blueprint_solid.png" -i "path_to_user_blueprint.png" --resolution 2K - Verify that
C:\Users\Hymira\Desktop\nanobanana\step1_blueprint_solid.pngwas created successfully. Do NOT read it back.
Step 2: Image to 3D Generate (via Neural4D)
- Using the saved image
C:\Users\Hymira\Desktop\nanobanana\step1_blueprint_solid.png, trigger the 3D generation. - Matting: Submit the image via
multipart/form-datato/api/mattingImage. Extract therequestId. - Get Matting Result: Send the
requestIdto/api/getMattedResult. Extract a preferredfileKey. - Generate: Send the
fileKeyto/api/generateModelWithImageto start generation and receiveuuids.
Step 3: Asynchronous Handoff (CRITICAL)
DO NOT use blocking scripts, while-loops, or Start-Sleep to wait for the 3D generation to complete!
- Immediately after getting the
uuidfrom Neural4D in Step 2, end your tool execution. - Reply to the user that Phase 1 (2D solid render) is complete and saved to their desktop (
step1_blueprint_solid.png). - Inform the user that Phase 2 (3D generation) has been started with the specific
uuid, and ask them to manually instruct you to "Check 3D progress" in a few minutes.
API Endpoints Reference
Neural4D API paths (Base URL: https://alb.neural4d.com:3000/api with Bearer <NEURAL4D_API_TOKEN>):
/mattingImage/getMattedResult/generateModelWithImage/retrieveModel(Only call when asked to check progress)