Mesh QR Code Generator
Unity Asset for generating QR codes in 3D.
There are many QR code generators out there. The Mesh QR Code Generator is different. Instead of getting a bitmap, you get a 3D object (respectively multiple objects) to work with.
This gives you more creative opportunities than a flat and boring code. You can omit parts of the code to fit your ideas because of the error correction feature of QR codes. Ideal for mazes.
Possible applications of 3D QR codes:
- Imagine a camera flying through a maze and then taking off to the sky, turning back to the maze it just left and you see a QR code. Take out your smartphone and scan the code.
- Hidden Easter egg hanging on a wall but only recognizable when you look at it at a certain angle.
- Ad with animated QR code at the end flying at you for dramatic effect. Standing still long enough for you to scan it with your phone.
- Your game gives you a secret code for a raffle. The QR code is animated so that people with cheap and slow phones don’t have a chance to win the prize. ]:->
- Showing off the URL to your website. “Can you give me the link to your site?” — “Sure. Here’s a QR code on my phone for you to scan.” — “Why is it moving?” — “Because it’s linked to the gyroscope.”
- You enter some text (can be a URL) and a QR code maze gets generated. Surviving all the dangers in the maze, you win all the fights and reach the exit. Now the camera shows the maze from above with the trail you left. You can save a screenshot and now have a unique QR code you had to fight for.
- A variation of the “build the pattern we show you here” games. Two main differences: 1. it’s lot more complicated and 2. you don’t need to be 100% perfect and complete because of the error correction. Show the pattern with a too difficult contrast for QR code scanners, so it is only possible to scan it after you move blocks with a darker color at the right places.
- Just a display of a QR code maze in a shop window with animated monsters running around in it. Or something specific to the shop like cars, and the QR code is the URL to the company’s website.
The possibilities are endless and more fun than bitmaps.
Let the component generate a QR code automatically or controlled by script.
See more screenshots and videos in the Unity Asset Store.
WebGL Demo Come at me
WebGL Demo Timepiece
User Guide (PDF)
Forum thread (Unity)
Tip: 3D printing and modeling
With ProBuilder installed, you can export generated QR codes in many formats.
Make a scene with a base cube (X:10, Y:1, Z:10, pos 1,0,-1) as a bottom plate and position your container for the QR code in the middle (on surface, pos 5,1,-5) of it. Hit play.
Now go back to the Scene view, select the QR code container in the Hierarchy window, click "ProBuilderize" in the ProBuilder window, then shift-select the base, click "Merge Objects" (ProBuilder). Now you have one object.
"Export" in the ProBuilder lets you export the whole thing in many formats usable for 3D printing or modeling software.
1.3
- Small fixes in documentation.
- Tip about using callbacks together with visual scripting tool Bolt.
- Rotation, scaling, etc. from Parent won’t get ignored anymore.
- New property IsReady to indicate that the generated QR code is complete.
1.2
- Documentation comments for API code.
- New property
HeightScale
to have a fixed height for the generated QR code regardless of the QR code’s size.
1.1
- New methods
Clear
, to remove the currently displayed modules (QR code vanishes), andClearAll
, to remove all modules, including the ones in the object pool. - Tips section in documentation.
Do you have any suggestions or problems? Feel free to use the feedback form for Mesh QR Code Generator!