Evo Threejs Obj Export logo

Evo Threejs Obj Export

Community
Zhang-Henry
evo-threejs-obj-export

Convert Three.js scene definitions to OBJ format for Blender import. Handles regular Mesh, InstancedMesh, nested transforms with non-uniform/mirrored scales, and coordinate system conversion (Y-up to Z-up via -90 degree X rotation). Use when converting Three.js code to simulation-ready 3D assets.

Overview

PublisherZhang-Henry
RepositoryCoEvoSkills
Skill nameevo-threejs-obj-export
Stars
83
Forks
9
Bundled files
1
LicenseApache-2.0
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 1 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by Zhang-Henry on GitHub. Read the source before you install it.

Installation

Install the Evo Threejs Obj Export AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/Zhang-Henry/CoEvoSkills/tree/main/artifacts/skills/threejs-to-obj/evo-threejs-obj-export
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/Zhang-Henry/CoEvoSkills.git /tmp/CoEvoSkills
mkdir -p .claude/skills
cp -r /tmp/CoEvoSkills/artifacts/skills/threejs-to-obj/evo-threejs-obj-export .claude/skills/evo-threejs-obj-export
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Evo Threejs Obj Export in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Evo Threejs Obj Export on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Evo Threejs Obj Export is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Three.js to OBJ Export Skill

Overview

Converts Three.js scene graphs to Wavefront OBJ format suitable for Blender import.

Key Capabilities

  • Handles regular Mesh objects with full world transform baking
  • Handles InstancedMesh by expanding each instance with its per-instance transform
  • Applies coordinate system conversion (-90° X rotation) from Three.js Y-up to Blender Z-up
  • Properly handles non-uniform and mirrored scales (flips winding order when determinant < 0)
  • Preserves normals with correct normal matrix transformation
  • Manages OBJ 1-based index offsets across multiple objects

Usage

The main export script is scripts/export_obj.mjs. It must be run from a directory that has three in its node_modules/ (e.g., /root/).

javascript
// Fresh agent example - copy and run from /root/
import * as THREE from 'three';
import { createScene } from '/root/data/object.js';
import fs from 'fs';
import path from 'path';

const root = createScene();
const coordConvert = new THREE.Matrix4().makeRotationX(-Math.PI / 2);
root.updateMatrixWorld(true);

let output = '';
let indexVertex = 0;
let indexNormals = 0;
let indexUvs = 0;

function emitMeshGeometry(name, geometry, worldMatrix) {
  const finalMatrix = new THREE.Matrix4().copy(coordConvert).multiply(worldMatrix);
  const normalMatrix = new THREE.Matrix3().getNormalMatrix(finalMatrix);
  const det = finalMatrix.determinant();
  const flipWinding = det < 0;
  const vertices = geometry.getAttribute('position');
  const normals = geometry.getAttribute('normal');
  const uvs = geometry.getAttribute('uv');
  const indices = geometry.getIndex();
  if (!vertices) return;
  output += 'o ' + name + '\n';
  let nbVertex = 0, nbNormals = 0, nbUvs = 0;
  const v = new THREE.Vector3();
  for (let i = 0; i < vertices.count; i++) {
    v.fromBufferAttribute(vertices, i);
    v.applyMatrix4(finalMatrix);
    output += 'v ' + v.x + ' ' + v.y + ' ' + v.z + '\n';
    nbVertex++;
  }
  if (uvs) {
    const uv = new THREE.Vector2();
    for (let i = 0; i < uvs.count; i++) {
      uv.fromBufferAttribute(uvs, i);
      output += 'vt ' + uv.x + ' ' + uv.y + '\n';
      nbUvs++;
    }
  }
  if (normals) {
    const n = new THREE.Vector3();
    for (let i = 0; i < normals.count; i++) {
      n.fromBufferAttribute(normals, i);
      n.applyMatrix3(normalMatrix).normalize();
      output += 'vn ' + n.x + ' ' + n.y + ' ' + n.z + '\n';
      nbNormals++;
    }
  }
  if (indices !== null) {
    for (let i = 0; i < indices.count; i += 3) {
      let a = indices.getX(i), b = indices.getX(i+1), c = indices.getX(i+2);
      if (flipWinding) [b, c] = [c, b];
      const face = [];
      for (const j of [a, b, c]) {
        const vi = indexVertex + j + 1;
        let s = '' + vi;
        if (normals || uvs) {
          s += '/';
          if (uvs) s += (indexUvs + j + 1);
          if (normals) s += '/' + (indexNormals + j + 1);
        }
        face.push(s);
      }
      output += 'f ' + face.join(' ') + '\n';
    }
  } else {
    for (let i = 0; i < vertices.count; i += 3) {
      let a = i, b = i+1, c = i+2;
      if (flipWinding) [b, c] = [c, b];
      const face = [];
      for (const j of [a, b, c]) {
        const vi = indexVertex + j + 1;
        let s = '' + vi;
        if (normals || uvs) {
          s += '/';
          if (uvs) s += (indexUvs + j + 1);
          if (normals) s += '/' + (indexNormals + j + 1);
        }
        face.push(s);
      }
      output += 'f ' + face.join(' ') + '\n';
    }
  }
  indexVertex += nbVertex;
  indexUvs += nbUvs;
  indexNormals += nbNormals;
}

function traverseAndExport(object) {
  if (object.isMesh && !object.isInstancedMesh) {
    emitMeshGeometry(object.name || 'unnamed_mesh', object.geometry, object.matrixWorld);
  }
  if (object.isInstancedMesh) {
    const instanceMatrix = new THREE.Matrix4();
    for (let i = 0; i < object.count; i++) {
      object.getMatrixAt(i, instanceMatrix);
      const instanceWorld = new THREE.Matrix4().copy(object.matrixWorld).multiply(instanceMatrix);
      emitMeshGeometry((object.name || 'instanced') + '_' + i, object.geometry, instanceWorld);
    }
  }
  for (const child of object.children) traverseAndExport(child);
}

traverseAndExport(root);
fs.mkdirSync('/root/output', { recursive: true });
fs.writeFileSync('/root/output/object.obj', output);
console.log('Export complete');

Architecture

Key Functions

  • emitMeshGeometry(name, geometry, worldMatrix) - Exports a single geometry with baked world transform
  • traverseAndExport(object) - Recursively traverses scene graph, handling Mesh and InstancedMesh

Coordinate Conversion

  • Three.js: Y-up, right-handed
  • Blender: Z-up, right-handed
  • Conversion: Apply -90° X rotation matrix before export
  • Formula: (x, y, z) -> (x, z, -y)

InstancedMesh Handling

The built-in Three.js OBJExporter does NOT support InstancedMesh. This skill:

  1. Detects InstancedMesh via object.isInstancedMesh
  2. Extracts per-instance matrices via getMatrixAt()
  3. Composes: finalMatrix = coordConvert * parentWorldMatrix * instanceMatrix
  4. Emits each instance as a separate named object

Mirrored/Non-uniform Scale Handling

When a transform has negative determinant (mirrored scale), face winding order is flipped to maintain correct surface normals in the output.

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Evo Threejs Obj Export AI skill do?

Convert Three.js scene definitions to OBJ format for Blender import. Handles regular Mesh, InstancedMesh, nested transforms with non-uniform/mirrored scales, and coordinate system conversion (Y-up to Z-up via -90 degree X rotation). Use when converting Three.js code to simulation-ready 3D assets.

Why use Evo Threejs Obj Export on TypingMind?

Because you install it once and use it with any model. Evo Threejs Obj Export is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Evo Threejs Obj Export in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/Zhang-Henry/CoEvoSkills/tree/main/artifacts/skills/threejs-to-obj/evo-threejs-obj-export. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Evo Threejs Obj Export?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Evo Threejs Obj Export?

As many as you like. As long as a model supports skills, you can use Evo Threejs Obj Export with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Evo Threejs Obj Export AI skill free?

Yes. It is published on GitHub by Zhang-Henry under the Apache-2.0 license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇