XPS 13 “Developer Edition” Microphone Fix

It seems the microphone doesn’t work out of the box on the XPS 13 “Developer Edition”. Worse, you’ll actually need to re-compile your kernel to make it work… at least the patches are easy to find thanks to Dell’s “Project Sputnik” leader Barton George:

I used those on the Linux 4.0.2 (stable) kernel, recompiled, installed… and voilà! The microphone works!

Hopefully those fixes will soon be in the kernel main line…

XPS13 “Developer Edition”: Updating the graphics driver

Update: I previously indicated to use the “xorg-edgers” PPA. But it’s far too brutal since it will update a lot of other things (such as the X server) and it might just break. I now recommend using the Oibaf PPA to update only the drivers.

Following my article about a few “out of the box” fixes for the XPS 13 “Developer Edition”, I wanted to upgrade the Intel graphics driver and Mesa. Indeed, I noticed some issues with 3D apps:

  • most games were incredibly slow, or at least a lot slower than what ohter got with the same hardware on Windows (and OpenGL performance are supposed to be on-par or close – if not better – on Linux now);
  • WebGL was not available neither on Chromium nor Firefox, even through their latest stable version.

The pre-installed version of Mesa (10.1.3) is pretty old (May 2014). You can upgrade it to the latest version along with the latest Intel drivers using the “xorg-edgers” PPA the Oibaf “Updated and Optimized Open Graphics Drivers” PPA.

Updating the i915 drivers and Mesa should give you a very important performance boost on 3D apps. I noticed “Counter Strike: Global Offensive” went from barely playable to completely smooth. I also noticed WebGL is now properly available on both Firefox and Chrome.

XPS13 Developer Edition Fixes

I recently bought a brand new XPS 13 “Developer Edition” that I want to use as my main machine for development. I’m very happy to see Dell building machines fit for Linux. The Dell XPS 13 has many very very good reviews. And it’s even better when it comes with Ubuntu pre-installed with all the good drivers (or close…).

dell xps13

It’s too soon to draw any conclusions yet: I’ve been using the computer for only 1 day. Still, I must say it works overall very good and I’m satisfied so far (except for the one or two quirks listed below). Especially by the gorgeous incredible “infinity display”, which packs a 3200×1800 touchscreen in a 13′” screen that fits in 11″ case. The XPS 13 “Developer Edition” comes with Ubuntu pre-installed, and it also comes with a “factory reset” feature you come to expect from a brand such as Dell. So if you brick your Ubuntu install, you can easily reset it without much hassle.

The only problem I encountered is some trackpad freezes that happen to be very annoying. It gives you the feeling the rig is not responsive when it’s actually pretty fast. To fix this, I applied this kernel patch:

You can safely apply this patch to the 3.13 Linux kernel that comes with the XPS 13/Ubuntu 14.04 mint install. But as I had to re-compile the kernel, I wanted to try the recently released stable Linux 4.0.2 kernel.

If you do so, you’ll also need to patch the Broadcom drivers. And because they’re not compatible with Linux 4.0 kernels, you’ll have to apply a little patch: bcmwl driver fixed for Linux 4.0 kernel.

After upgrading to Linux 4.0, I noticed the overall computer feels a lot faster and responsive. I don’t know why but it just does. It might be related to the fact the old 3.13 kernel was not using the new Intel P-state CPU governor.

Last, I also encountered kernel panic issues at three occasions:

  1. When changing access-points or simply disconnecting the Wi-Fi. This fix seams to do the trick: fix for the bcmwl kernel panic/crash.
  2. When suspending, but I guess it’s related to the Wi-Fi issue.
  3. When running a VirtualBox VM. I had to use VirtualBox 5.0 beta and patch Vagrant to support it.

Update: You can get more out of the XPS13 battery using the following script:

New Documentation for Collada

Minko’s Collada plugin makes it possible to easily import Collada (*.dae) files using the assets loading API. Working with the API is quite simple and there already is a detailed tutorial about that. But the Collada format has its flaws and it is sometimes very complicated to get your exported files to work properly.

That’s why I’ve compiled a new documentation article that explains how to properly export Collada files from 3D Studio Max:

Export Collada files from 3D Studio Max on Aerys Hub

The article details the export procedure itself but also provides guidelines to make sure the exported file will display properly with Minko. It also give details about the supported features, including material, material properties and how the engine will use them. Similar articles will be released for different editors and formats according to the community’s needs.

Of course, as soon as the Minko editor and the MK format will be available we will strongly discourage the use of Collada files in production for many reasons (mainly performances). But you will still need to import those Collada files into the editor first… So here is a little video to show how simple importing assets is with the editor:

Yes: it’s as simple as a drag’n’drop! You will also notice that the textures load automatically and that the editor will let you play the animations and make sure everything works out of the box. The editor will be available in open beta in March…

Minko Weekly Roundup #4

Features

  • The JointsDebugController makes it possible to display the joints and bones of a skinned mesh in order to check if everything works as expected.
  • The VertexPositionDebugController will display the position of each vertex of a mesh.
  • The VertexNormalDebugController will display the normal of each vertex. You can use it with the VertexNormalShader to display and debug the normals of a mesh.

Examples

Answers

Tutorials

Fixes

  • minko-collada will now load the vertex RGBA data when it’s available
  • min/max computation is always possible upon creation of a VertexStream regardless of its StreamUsage
  • frustum culling will now also test the center of the bounding box and not only the 8 corners

Tutorial: Add pixel-perfect 3D mouse interactivity

In this tutorial we’re going to see how you can add pixel-perfect 3D mouse interactivity. I’ve already introduced a technique called “ray casting” in another article. But it works only with very basic static shapes. And sometimes, testing very complex shapes can be very painful performance wise. It’s even more expensive when you want it to be very precise.

In this article, we will see a technique called “pixel picking”. This technique uses hardware acceleration to provide pixel perfect mouse interactivity. It works very well for both static and animated models. The concept is very simple: we render the scene with one color per mesh. Then, we just have to get the pixel under the mouse cursor to know what mesh is “interactive”. Of course, things are much more complicated in the real life: this kind of stunts are pretty hard to push properly in a general purpose rendering pipeline.

But Minko provides everything required out of the box! Even better, the minko-picking extension features a simple controller – the PickingController – that provides all the mouse signals we might need! This tutorial will explain how to setup the PickingController and listen for the mouse signals.


Pixel picking test application (sources)

Create and setup the PickingController

The first step is to instanciate a new PickingController:

The constructor takes only one argument: the “picking rate” of the controller. This value will determine how many times per second the controller will try to execute the picking pass and the relevant mouse signals. The lower the picking rate, the better the performances. A picking rate of 30 should be more than enough for 99% of the applications. You can also set that value at any time using the PickingController.pickingRate property:

Setting the picking rate to the half of the frame rate will work just fine for most applications and should be completely painless performance wise. By default, the picking rate is fixed to 15.

Set the mouse events source

The job of the PickingController is to listen for the mouse events on one (or more) specific dispatcher(s) and re-dispatch them as mouse signals. The difference between the original events and the signals executed by the PickingController is that the signals are aware of the 3D scene. To setup the dispatcher to listen, you just have to call the PickingController.bindDefaultInputs() and provide the IDispatcher object to listen:

Setup the PickingController on the 3D scene

In most cases, you don’t want the whole 3D scene to be mouse interactive. Sometimes it’s just a Mesh or a Group. The PickingController can be added to any Mesh/Group so it’s easy to target precisely what is interactive and what is not. The basic use case is to add mouse interactivity on a single Mesh:

BUt you also might want to listen for the mouse signals trigerred by a whole sub-scene instead of a single mesh. For example, some skinned 3D assets have multiple meshes animated by a single skeleton. To do this, we can add the PickingController on Group:

In the code snippet above, the PickingController will execute mouse signals for all the Mesh descendants of the target group. You don’t have to worry about the descendants of the groups targeted by a PickingController: it will listen for the Group.descendantsAdded and Group.descendantsRemoved to start/stop tracking any descendant Mesh added to this part of the scene.

Thus, if your whole 3D scene is interactive, you can add the PickingController directly on the Scene node:

Listen for the mouse signals

To catch 3D mouse events, you just have to add callback(s) to any of the PickingController.mouse* signals. The available signals are:

  • mouseClick, mouseDown, mouseUp: executed when the left button is clicked, down or up
  • mouseRightClick, mouseRightDown, mouseRightUp: executed when the right button is clicked, down or up
  • mouseMiddleClick, mouseMiddleDown, mouseMiddleUp: executed when the right button is clicked, down or up
  • mouseDoubleClick: executed when the user makes a double click
  • mouseMove: executed when the mouse moves
  • mouseWheel: executed when the mouse wheel turns
  • mouseRollOver, mouseRollOut: executed when the mouse roll over/out a mesh

The following code sample will catch the left and the right click signals:

It would be too difficult to use the PickingController if the mouse signals where triggered only when an actual 3D object is under the cursor. For example, it would be pretty hard to select/unselect objects without listening to some actual 2D mouse events. The code would then quickly become very complicated to mix both 2D mouse events and 3D mouse signals.

Therefore, the mouse signals are triggered whenever the corresponding mouse event is dispatched (and when the picking rate allows it of course). As a direct consequence, the mesh : Mesh argument is null when there is no actual interactive 3D object under the mouse cursor.

Conclusion

You can find the complete source code of the picking example demo in the minko-examples repository on github. If you have questions/suggestions regarding this comment, you can ask them in the comments or on Aerys Answers, the official support forum for Minko.

Tutorial: your first mobile 3D application with Minko

As you already know I’m sure, you can build Android and iOS devices with the Flash platform. And Stage3D is also available on those devices! As a matter of fact, Stage3D was especially designed to work on mobiles. And so was Minko! We put a lot of efforts in building a robust and fast engine that will work on most mobile devices. This tutorial will start where the “Your first Minko application” tutorial stopped and explain what needs to be done to get it working on mobile.

Create your mobile project

The first thing to do is – of course – create a mobile project. With Flash Builder it is very simple: you just have to go into File > New > ActionScript Mobile Project. If you need a little reminder of how to bootstrap your project/development environment, you can read the “Getting started with Minko” tutorial. The only difference compared to creating a desktop/wepp application is to uncheck “BlackBerry Table OS” in the Mobile Settings panel: Stage3D is not yet available on BlackBerry devices. There is an issue opened on the BlackBerry tracker if you want to vote for it!

Configure the application

Now our project has been created we just have to make sure it can use the Stage3D API. It implies two little changes in the app.xml file (this file is named after your main class, most of the time it’s Main-app.xml):

  1. renderMode has to be set to “direct”
  2. depthAndStencil has to be set to “true”

Here is a basic example of a properly setup app.xml file for AIR 3.2:

Bootstrap the Main class

That’s the beauty of the Flash platform, Stage3D and Minko: the project boostrap aside, the code of the application is exactly the same whether you are working on a desktop, web or mobile application! Therefore, you can bootstrap your Main class by following the “Your first Minko application” tutorial!

Basically, you just have to copy/paste the MinkoApplication sample class…

… and make your Main class extend it:

Run your mobile application for the first time

If you use Flash Builder, it will display the Debug Configurations panel when you will try to run/debug your mobile application for the first time. This panel does not have anything special regarding Stage3D or Minko, but it’s still a good thing to see the basics! There are two important fields on the panel:

  1. The “Target platform” field will specify what device you want to target for this debug session.
  2. The “Launch method” field will specify whether you want to run the application in the desktop device emulator or directly on the device. Of course, the “On device” method is better if you want to have a preview of the actual performances.

Display your first 3D object

Now that our project is setup and that we can launch it on the device or in the emulator, we will display our first 3D object. You just have to follow the “Display your first 3D object” tutorial for your mobile project. Here is what you’ll get if you choose to run it on the desktop emulating the iPhone4 device:

You can also directly download the sources for this project!

If you have questions/suggestions regarding this tutorial, please post in the comments or on Aerys Answers, Minko’s official support forum.