Tag: performance

Render Your Own 3D Model in QCAR

Teapot 3D Model

Note: this article is short and doesn’t give detailed answers as much as I would have liked. I started writing it a while ago and realized it had never been published. I haven’t worked with QCAR for a couple of months now, so the subject isn’t so fresh in my mind anymore. Here it goes…

I’ve worked with QCAR for about two months earlier this summer. Using the library is very easy, and it gives pretty good results in terms of responsiveness and robustness. But because my knowledge of OpenGL is very limited, my worst problem has been importing my own 3D model and making it render correctly (with textures and proper lighting).

Use Blender to triangulate

First, mobile devices don’t run the standard OpenGL library, they run OpenGL ES. This means 3D models have to be triangulated or they won’t render at all. Triangulation is the process of dividing all polygons into triangles.

Blender is a free open source 3D graphics application. It can easily be installed on any Ubuntu version by installing the package named blender. Using Blender you’ll be able to triangulate your model when exporting to an .obj file. Then you’ll have to export the .obj file to a .h, which finally can be imported into your QCAR/Android project. This might be “great” for testing, but in the long term, you’ll run into dozens of problems of lighting, reflection, animation, etc.

Texture dimensions

A problem you might run into is using badly dimensioned textures. This problem was kind of hard to find for me as you only get runtime fatal errors which don’t give any relevant detail. But you need to know that almost all mobile devices will only take squares and 2×1 / 1×2 rectangles for texture files. For example, these dimensions would work: 512 x 512, 32 x16 and 128 x 256 pixels. These would not : 1024 x 16, 512 x 64 pixels. Another thing with textures: depending on models, there are limits to the total number of texture files you can load at the same time in an application, and there are limits to their dimensions (1024, 512, and 256 pixels).

I recommend using Unity

According to Wikipedia, “Unity is an integrated authoring tool for creating 3D video games or other interactive content such as architectural visualizations or real-time 3D animations.” In other words: it makes A LOT OF STUFF much better and much faster than an OpenGL developer (or a whole team) would do. What are the downsides? Size (approximately 16 to 20 MB when correctly compiled), cost ($400 for the Android license), and finally, support is not as good on Android as it is on iOS. More information available on Unity’s website.

Even if Unity’s solution isn’t perfect (are there any perfect solutions anyway?), it is in my opinion a million times better than working with your own 3D model and custom OpenGL ES. You’ll be able to simplify your model(s) to enhance performance (which is very important on mobile devices), lighting and other visual effects will be much easier to create, etc. Overall, you’ll get a much better result for way less effort. Everyone wins!

Please visit QCAR’s developer site for SDK download, documentation on how to start a QCAR project, how to integrate the Unity extension, and more.

Best and Easiest Flash Player Setup for Ubuntu

Flash-Aid LogoLike many Ubuntu users out there, you have probably had problems with Flash Player in the past. I’ve had a lot myself, mostly related to poor performance, and sometimes with strange behavior such as videos playing too fast. People at Ubuntu have done a good job at adding better Flash support in the last year or two but I often feel it’s still not enough. This is why I have been using the Flash-Aid plugin for Firefox for many months now.

Helping Firefox, but also Chromium

According to the official page, this Firefox add-on removes conflicting flash plugins from Ubuntu Linux systems, installs the appropriate version according to system architecture and applies some tweaks to improve performance and fixes common issues. All that in a single click! And because Chromium (and I suppose other browsers you may like) uses the same Flash packages, Flash-Aid will also “help” them.

How to install and use in Firefox 4

  1. Open Firefox
  2. Go to Tools / Add-ons menu
  3. In the Add-ons Manage, type “flash-aid” (without the quotes) in the search box locatedĀ  in the top right corner
  4. In the result list, locate Flash-Aid and click its install button located on the same row
  5. Restart Firefox, you should now have the Flash-Aid icon in the top right corner of your browser
  6. Click the icon and follow instructions
  7. You now have one of the best Flash installations possible


If you are also a Windows user, you will notice performance downgrade compared to Windows. At this point, you should mostly blame Adobe who won’t put more effort in their Linux support.

If you have any other tip or trick to Flash tweaking, don’t hesitate to post them.

© 2019 Evil Coding Monkey

Theme by Anders NorenUp ↑