<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="../assets/xml/rss.xsl" media="all"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Mardy (Posts about 3D)</title><link>http://mardy.it/</link><description></description><atom:link href="http://mardy.it/categories/3d.xml" rel="self" type="application/rss+xml"></atom:link><language>en</language><copyright>Contents © 2026 &lt;a href="mailto:info@mardy.it"&gt;Alberto Mardegan&lt;/a&gt; </copyright><lastBuildDate>Sat, 11 Apr 2026 13:53:59 GMT</lastBuildDate><generator>Nikola (getnikola.com)</generator><docs>http://blogs.law.harvard.edu/tech/rss</docs><item><title>Teaser: connecting Nintendo Switch controllers to the Wii</title><link>http://mardy.it/blog/2026/04/teaser-connecting-nintendo-switch-controllers-to-the-wii.html</link><dc:creator>Alberto Mardegan</dc:creator><description>&lt;p&gt;A few months ago I started playing with the Bluetooth controller embedded in
the Nintendo Wii, to see if it was possible to get it to connect to other
devices than just the Wii remotes. If you ask internet forums, you might fall
into the impression that the Wii is not using a standard Bluetooth controller,
or that it has been somehow "crippled" in order to restrict it to connect to
the Wiimotes only, but that's not the case: it's an ordinary controller from
its era, it's just that the Wii software (both the official SDK and the
homebrew libogc) only uses it for the Wiimotes.&lt;/p&gt;
&lt;p&gt;I first started looking into
&lt;a href="https://github.com/devkitPro/libogc/tree/master/lwbt"&gt;&lt;code&gt;lwBT&lt;/code&gt;&lt;/a&gt;, the bluetooth
stack used in libogc, but I quickly realized that it was impossible to get full
control over the controller via this library: it has been adapted to work with
the subset of the HID protocol used by the Wiimotes, and even if you can issue
bluetooth commands to the controller via the HCI layer, you cannot receive the
replies, since they are already intercepted by lwBT and there's no way to hook
into them.&lt;/p&gt;
&lt;p&gt;So I started writing my own little bluetooth stack,
&lt;a href="https://github.com/embedded-game-controller/bt-embedded"&gt;&lt;code&gt;bt-embedded&lt;/code&gt;&lt;/a&gt; which
from the ground up has been designed to be used by embedded devices and
covering the use case of serving different clients running in a single process,
and I've integrated it into
&lt;a href="https://github.com/embedded-game-controller/embedded-game-controller"&gt;&lt;code&gt;embedded-game-controller&lt;/code&gt;&lt;/a&gt;
(though this is not merged into the &lt;code&gt;master&lt;/code&gt; branch yet) in order to allow
connecting to bluetooth controllers. And in the last couple of days I've
written a little ugly program to visualize the controllers in a 3D scene, in
order to better test them:&lt;/p&gt;
&lt;iframe src="https://vkvideo.ru/video_ext.php?oid=-230221529&amp;amp;id=456239018&amp;amp;hash=7f8047b16af7164f&amp;amp;hd=1" width="640" height="360" allow="autoplay; encrypted-media; fullscreen; picture-in-picture; screen-wake-lock;" frameborder="0" allowfullscreen&gt;&lt;/iframe&gt;

&lt;p&gt;Yes, the 3D model sucks, it was a nice model when I downloaded it from a free
site, but then heavily reduced the number of polygons using Blender and went a
bit too far; I'll do a better model later. The accelerometer information is not
shown yet (I'd like to use it to actually tilt the controller, instead of using
the joystick), but that will not be hard.&lt;/p&gt;
&lt;p&gt;At the moment, the only supported controllers are the Nintendo Switch Pro
controller (I'm using a clone here) and the Joy-cons, so there's still quite
some work to do to add more.&lt;/p&gt;
&lt;p&gt;It's been a journey in which I learned a lot about Bluetooth and USB and, who
knows, maybe this will come handy in the future too.&lt;/p&gt;</description><category>3D</category><category>curiositates</category><category>english</category><category>informatica</category><category>kdeplanet</category><category>Linux</category><category>planetmaemo</category><category>programmation</category><category>video</category><category>Wii</category><guid>http://mardy.it/blog/2026/04/teaser-connecting-nintendo-switch-controllers-to-the-wii.html</guid><pubDate>Sat, 11 Apr 2026 13:13:06 GMT</pubDate></item><item><title>Caption generator addon for Blender</title><link>http://mardy.it/blog/2017/07/caption-generator-addon-for-blender.html</link><dc:creator>Alberto Mardegan</dc:creator><description>&lt;div style="text-align: center;"&gt;&lt;iframe allowfullscreen="" frameborder="0" height="270" src="https://www.youtube.com/embed/wW1jVhHRU0I" width="480"&gt;&lt;/iframe&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;br&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;Doing &lt;a href="http://blog.mardy.it/2017/07/evolution-of-qml-application.html" target="_blank"&gt;yesterday's video&lt;/a&gt; was fun, but one thing that frustrated me a lot was the preparation of the subtitles; it frustrated me to such a point, that after doing just a couple of subtitles I decided to write a Blender addon which would do much of the hard work for me. So, welcome the &lt;a href="https://gitlab.com/mardy/blender-addons" target="_blank"&gt;Caption generator&lt;/a&gt;!&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;br&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;You can watch the video or read the description (or the code!) in Gitlab if you want to learn how to use it; what I care about writing here, is my impressions after writing my first Blender addon. Well, thanks to the easiness of the Python language and to a &lt;a href="https://docs.blender.org/api/blender_python_api_current/" target="_blank"&gt;well documented internal API&lt;/a&gt;, writing this addon was very easy.&lt;/div&gt;&lt;div style="text-align: left;"&gt;What I did find hard, and made me waste quite some time without even finding a good solution, was how to open the file selection dialog only after the user had clicked over a "Generate" button on the addon's side panel. The addon API's &lt;tt&gt;invoke()&lt;/tt&gt; method doesn't seem to be well documented, and the &lt;a href="https://blender.stackexchange.com/questions/42193/how-to-delay-execution-of-execute-function-in-an-addon" target="_blank"&gt;example I found in the Blender stackexchange&lt;/a&gt; did fix that issue while introducing new ones. So I gave up on this, and just let my addon fire up the file selection dialog as soon as it's activated.&lt;br&gt;&lt;br&gt;
&lt;br&gt;&lt;br&gt;
Summing up, &lt;b&gt;writing an addon for Blender is extremely easy&lt;/b&gt;; polishing it to make it behave exactly as you wish might be a challenge (depending on your requirements, of course). But all in all, I suspect that I'll write more Blender addons, should I find some actions which I wish to automate.&lt;/div&gt;</description><category>3D</category><category>english</category><category>programmation</category><guid>http://mardy.it/blog/2017/07/caption-generator-addon-for-blender.html</guid><pubDate>Wed, 26 Jul 2017 11:36:00 GMT</pubDate></item><item><title>Making snap packages of photogrammetry software</title><link>http://mardy.it/blog/2017/03/making-snap-packages-of-photogrammetry.html</link><dc:creator>Alberto Mardegan</dc:creator><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
Some time ago I got vaguely interested into &lt;a href="https://en.wikipedia.org/wiki/Photogrammetry" target="_blank"&gt;photogrammetry&lt;/a&gt;, that is the reconstruction of a 3D model out of a set of plain 2D photographs. I just thought that it was cool, and wanted to try it.&lt;br&gt;
&lt;br&gt;
Unfortunately, the most popular of these tools, &lt;a href="http://ccwu.me/vsfm/index.html" target="_blank"&gt;VisualSFM&lt;/a&gt;, was not packaged for Ubuntu and didn't come with ready binaries. Furthermore, the steps to build it are far from trivial: they include modifying a few of the source files!&lt;br&gt;
&lt;br&gt;
So, while I was going through this ordeal in order to compile it, I though of how I could avoid running through all this pain once more, had the need emerged to build this program again in the future. I initially thought of writing a shell script to automate it, but then I realized that there exists a much better solution: a &lt;a href="https://snapcraft.io/" target="_blank"&gt;snapcraft&lt;/a&gt; recipe!&lt;br&gt;
This solution has the big advantage that the resulting binary (called a "snap" package) can be shared with other Linux users, by publishing it into the snap store. Therefore, one doesn't need to be a programmer or a computer expert anymore in order to install the software.&lt;br&gt;
&lt;br&gt;
As I quickly found out, other "structure from motion" and "multi-view stereo" (the two parts of the 3D reconstruction pipeline) programs are also unavailable as binaries for Linux, and require quite some effort to be built. As a matter of fact, this problem is quite common for scientific and academic software: always written by authentic geniuses in the field of research, but who often are not as experienced (or interested) in software distribution.&lt;br&gt;
&lt;br&gt;
So I thought — well, given that I've just made a snap package (and that I've even enjoyed the process!), why stop here? :-)&lt;br&gt;
&lt;br&gt;
And here you have it: most of this photogrammetry software is now available as snap packages, which makes it trivial to install them and try them out. Though indeed, the 3d reconstruction can take a lot of time, so that's another thing to be considered.&lt;br&gt;
&lt;br&gt;
To help you out in deciding which software to use, I made a video review of structre from motion and multi-view stereo tools; without any pretense of scientificity, — be it clear! — just with the goal of giving an overview of what is available out there, and how easy (or difficult!) to use it is:&lt;br&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;br&gt;&lt;/div&gt;
&lt;iframe allowfullscreen="" frameborder="0" height="360" src="https://www.youtube.com/embed/ELHOjC_V-FE?ecver=1" width="640"&gt;&lt;/iframe&gt;&lt;br&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;br&gt;&lt;/div&gt;
I also "snapped" a couple of other programs related to 3D reconstructions. One of them is &lt;a href="http://www.cloudcompare.org/" target="_blank"&gt;CloudCompare&lt;/a&gt;, a 3D point cloud and mesh processing software.&lt;br&gt;
&lt;br&gt;
I might be making more videos on this subject, so stay tuned. :-)&lt;br&gt;
&lt;h3 style="font-family: Arial, Helvetica, sans-serif;"&gt;
&lt;br&gt;&lt;/h3&gt;
&lt;/div&gt;</description><category>3D</category><category>english</category><category>Linux</category><category>photogrammetria</category><category>photographia</category><category>programmation</category><category>Ubuntu</category><guid>http://mardy.it/blog/2017/03/making-snap-packages-of-photogrammetry.html</guid><pubDate>Fri, 24 Mar 2017 18:11:00 GMT</pubDate></item></channel></rss>