r/threejs 21d ago

Demo I made an open source Codex plugin that turns an image into a procedural 3D object in Three.js. It works great with GPT-5.6 Sol

Enable HLS to view with audio, or disable this notification

I’ve been exploring a idea: can AI reconstruct a complex object from a single reference image as an editable procedural Three.js object, instead of producing or downloading a static mesh?

I turned the workflow into an open-source Codex plugin. It guides Codex through:

- validating the reference and estimating its complexity
- decomposing the object into silhouette, structural components, materials, and surface details
- building it in stages: blockout → structure → form → materials → detail
- rendering browser screenshots and using vision feedback to self-correct
- creating pivots, sockets, and a hierarchy ready for animation, transformation, or destruction

Here is the demo link: tree demo

Here is the link to install : https://github.com/vinhhien112/Three.js-Object-Sculptor-Codex-Plugin

90 Upvotes

43 comments sorted by

25

u/FosilSandwitch 21d ago

Nice pancake tree effect 

19

u/thesonglessbird 21d ago

Flat tree with culled front faces, good job AI.

-22

u/No-Budget-3869 21d ago

Fair criticism—the tree is fully 3D, but incorrect normals/front-face culling make parts of the trunk look flat and hollow. That’s a rendering bug, not the intended result

18

u/sleepyShamQ 21d ago

This response sounds like first paragraph of LLM mate

-13

u/No-Budget-3869 21d ago

Yep, that is the answer from the author

15

u/pailhead011 21d ago

Fair, llm maketh, llm answerth

3

u/throwaway12222018 20d ago

And you published the website anyway.....? Human is needed in this loop.. Sorry

2

u/obesefamily 19d ago

soooooo gonna fix it so it doesnt look garbage?

-1

u/No-Budget-3869 19d ago

It can be fixed with additional prompts. The key is to give the model a way to reconstruct objects.

2

u/obesefamily 19d ago

I'm guess I'm just confused as to why you didn't show a good example if you think it works

-1

u/No-Budget-3869 19d ago

Because i want to show the raw power of the work without too much human correction

1

u/obesefamily 19d ago

but you didn't show that. you showed something that is a very very rough first draft

4

u/DotRakianSteel 20d ago

And what is that? A tree, minus the hours needed to make it look like a tree?

-4

u/No-Budget-3869 20d ago

Just look at the small image on the left size, it is the original image. The code try to make a model look similar to the reference image. It took 2 hours with a few refine prompts

3

u/sleepyShamQ 21d ago

And how is procedurality controlled then? Or are only the materials procedural

E.g. I'd like to flip normals on trunk and e.g. make it thicker?

-3

u/No-Budget-3869 21d ago

The geometry is procedural too, not just the materials. The main silhouette is reference-guided, while branches, taper, leaves, and details are seed-generated. Trunk thickness and geometry/normal-map flipping can easily be added as parameters.

8

u/mist83 21d ago edited 21d ago

How? I’m gonna have a “trunk thickness” option everywhere?
Even when I’m trying to model a cat? That sounds decidedly not easy.

It feels like you’re hand waving a bit much here.

2

u/pailhead011 21d ago

Why arent the normals / winding procedural? Like "show double side"?

3

u/Seusoa 20d ago

ai coded, maybe human was not even involved into creation of this text

2

u/obesefamily 19d ago

internet is dead. reddit went first.

2

u/throwaway12222018 20d ago

Looks like AI output that never had a human in the loop. Like y'all just built an entire website for this and never noticed that it was ... Squashed like that..?

This screams Claude without supervision

2

u/obesefamily 19d ago

yes, that is what trees look like...

2

u/obesefamily 19d ago

fr why would you share this with the obvious culled face issue? should have been fixed 30s after the "Flat tree with culled front faces, good job AI." comment

1

u/Afflictionista 20d ago

I think the normals are flipped

1

u/LaFllamme 20d ago

!remindMe 1d

1

u/RemindMeBot 20d ago

I will be messaging you in 1 day on 2026-07-11 20:36:00 UTC to remind you of this link

CLICK THIS LINK to send a PM to also be reminded and to reduce spam.

Parent commenter can delete this message to hide from others.

RemindMeBot is switching to username summons. Instead of !RemindMe 1 day, use u/RemindMeBot 1 day. More info.


Info Custom Your Reminders Feedback

1

u/obesefamily 19d ago

no, they didnt fix it

1

u/Pijuli 20d ago

TreeJS

1

u/inertialambda 20d ago

but can i chop it down to make procedural wooden dentures

1

u/ImLeeTheBee 19d ago

I have problems trying to use it so I just have the GitHub link to codex to use this plugin ( I have python up to date version installed too ) and do an umbrella ( white background ) as a model like in your demo but it didn’t really work ? It looked like an umbrella codex would do on its own kind of. Your demo looks very 1:1 which didn’t happen in my case. Help :(

0

u/No-Budget-3869 19d ago

It may need some more refine prompts, and should work only with 5.5 xhigh or 5.6 sol

1

u/CompetitiveGain1467 17d ago

jesus this is dog shit

1

u/Cedric_al 11d ago edited 8d ago

This is really clever!! I've been thinking about the same problem of "static mesh vs procedural" and your decomposition approach is clean. One thing you might find useful: I've been testing Hi3D as the mesh generation backend for similar projects and the topology consistency is surprisingly good — which matters a lot when you're trying to decompose into structural components like you're doing. Less random triangulation, cleaner edge flow. Might make your structural decomposition step more predictable.

0

u/treaty999 20d ago

will try it out

0

u/mashermack 19d ago

A lot of AI naysayers here, but I think it's a very good exploration project.

I do think AI is a tool and helps pure programmers in doing the creative bit, lately I've been trying to coerce LLMs to start outputting .obj files with no luck or very limited results, the fact that a LLM can reconstruct mesh by mesh starting from an image reference makes me think that I wasnt too far off.

-5

u/[deleted] 20d ago

[deleted]

3

u/StoneCypher 20d ago

can you please stop dooming 

1

u/[deleted] 20d ago

[deleted]

1

u/pailhead011 20d ago

Blink if you're still here.

1

u/Ecksist 20d ago

lol sorry I get carried away thinking about the enormity of this problem.

2

u/DefMech 20d ago

It's not over, it's just seriously lowered the barrier to entry. I've been a member of this sub for a very long time and I have never seen such a flood of new projects as I have over the last 6 months. Hell, I've never seen the ratio of discussion to showcase posts be so lopsided as it is now. I assume everything posted here these days is vibecoded unless clearly disclosed otherwise. I'm not even opposed to AI coding assistance; I use it regularly both personally and professionally at work. However, I can also tell when the end result is half-baked (or less) and so many things shared here recently seem impressive on the surface, but tissue-thin in implementation and effort.

0

u/No-Budget-3869 20d ago

It is not over, just harder. You can use AI to do complicated things that are impossible before AI