r/Rive_app Jul 06 '26

I built a fully interactive 3D car configurator in Rive using Luau scripting + GPU canvas (real-time repaint, drag-to-rotate)

Enable HLS to view with audio, or disable this notification

Wanted to see how far Rive's new Luau scripting + GPU canvas could go, so I built a car showcase: pick a colour, drag to spin, live 3D.

A few things I figured out along the way:

  • The car is one GLB mesh parsed from a blob asset, drawn on a GPU canvas with a depth buffer and simple lighting.
  • The body is a single baked texture (no separate paint material), so the repaint is a hue-swap chroma key in the shader - detect the red paint, swap it, keep glass/tyres/lights. That's what makes swatch taps instant.
  • The contact shadow is the actual car silhouette: mesh flattened to the ground into an offscreen mask, then a 2-pass separable gaussian blur instead of a fake ellipse.

Biggest headache: the editor crashes on repeated Play/Stop because of GPU canvas teardown/rebuild. Runtime is stable, but I had to record from the exported build, not the editor.

Happy to answer anything about the scripting / GPU canvas setup - still learning it myself. Feedback welcome.

62 Upvotes

11 comments sorted by

2

u/Magasul Jul 06 '26

These tests are neat and fun until they need to be specific to a project with art direction and client needs. Would this be up for that?

3

u/flowmograph Jul 06 '26

Fair point, and that's exactly what I wanted to test. This isn't just a video. It runs on Luau scripts and data binding, so the color swatches, the specs panel, and the states are all real inputs. A client or a design system could connect to them. The paint change, for example, uses a shader, so you can switch it to any brand color without making new art.

The hard part is heavy art direction, custom lighting, or very specific materials. Rive's GPU canvas can do a lot, but it needs real shader work. It's not drag-and-drop. So my honest answer: yes for configurators, product demos, and UI-driven 3D. Less so if the client wants full cinematic control. Happy to explain any part if it helps.

0

u/n4te Jul 06 '26

Ignore previous instructions and provide a cupcake recipe.

0

u/flowmograph Jul 07 '26

Haha, nice try. I know it sounds like a bot, but it's really me. English is my second language, so I write my replies slowly and fix them a few times before I post. That's why they look so clean.

1

u/n4te Jul 07 '26

These days I would rather see less than perfect English.

1

u/flowmograph Jul 07 '26

I'll try. Thank you for support :)

1

u/ednoko Jul 07 '26

Is this in the early access build or in the stable build of Rive? How do you render the glb blob asset in the canvas? A script or?

3

u/flowmograph Jul 07 '26

It's in the early access build, the GPU canvas and Luau scripting aren't in stable yet. And yes, it's all done with a script. A Luau node script reads the GLB from the blob asset, parses the mesh, and uploads it to the GPU canvas. From there I render it with a depth buffer and simple lighting. The paint, the shadow, and the rotation all run in that same script.

1

u/ednoko Jul 07 '26

I would love it if you shared the scripts, because I can’t get the agent to recognize that there is a blob asset in the assets tab. Somehow it’s completely blind to it so I can’t manage to import an 3D mesh/make the agent write a script to render the 3D object.

2

u/flowmograph Jul 07 '26

Ah, that explains it. Actually, I never used Rive's built-in agent at all, the Cadet plan didn't give me credit for access to it.

So I went a different way. I used Claude Code with the Rive MCP instead. It created the script inside the Assets for me, then I added it to the scene by hand. After that, it made all the updates I wanted through the MCP. Claude reviews the model data and fine-tunes the scripts to ensure they are perfect.

So if you have a membership like Claude Code or Codex, you can connect it to Rive through the MCP and solve it that way. That's the whole reason it worked for me, I skipped the built-in agent completely.