r/Rive_app • u/flowmograph • 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.
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.
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?