Posts

Showing posts from 2012

Qt5 and normal mapping - reloaded

(This is part II of the normal mapping journey, check the part I first for details.) So you have all now played with Qt5 NMapper tool, right? Goody, that means we have gained experience of normal mapping and created some perfectly tuned normal mapped textures. Now it's time to use these in a separate application. Let's assume that you are working on a 2D QML application, but would want 3D-looking effect into some part(s) of the UI. To visualize, here's an example NMapCarousel demo application: (Qt5 NMap Carousel, running on PC and on Raspberry Pi) Here normal mapping is used to make the carousel icons more dynamic by applying lighting. To increase the 3D impression, there are also extra shadows reflected behind the icons. To implement something similar, here's how to proceed: If not already, setup Qt5 to your PC/Mac/RPi or equivalent platform. Create normal maps of your graphic assets using Gimp, Blender, Photoshop etc. tool of your choice. Name the n

Qt5 and normal mapping

This one has been on my "blog at some point" back burner for some time now... ' Normal mapping ' is a graphics rendering technique used for faking the lighting conditions. In 3D software it is often used for bringing small bumps and dents of textures visible to achieve more realistic graphical appearance without using huge amount of polygons. Normal mapping is kinda advanced version of preceding ' Bump mapping '  technique. Where bump mapping uses just one channel for 'bumps', normal mapping uses 3-channel (RGB) bitmaps and can therefore contain more detailed normal vector information. Normal mapping technique can also be used in 2D applications to get 3D'ish looking UI elements, which means it can be used also in normal non-Qt3D QML applications. Combining image textures with specifically made normal map textures using a suitable shader is all you need. And normal maps can be automatically created with Gimp, Blender, Photoshop etc. drawing too

Qt5 & Raspberry Pi

I received a Raspberry Pi this week (thanks Nokia & QtonPi!) and naturally baked Qt5 into it as the first thing. Started by just installing premade RPi Qt5 package, but as qmlscene is not yet included, went for building Qt5 following loosely these instructions . About 2 hours later, I had system setup with latest Raspbian image running Qt5 QML apps. Last month when Qt5 first beta was coming together I prepared this " Qt5 Cinematic Experience " technology demo and got some good feedback. Samuel Rødal (btw check out his awesome " Qt 5 based 3D Wayland compositor " video!) kindly tested that it works also in RPi. Yes, it worked and was pretty fast also, but not even close to perfect... Now armed with RPi I wanted to spend some quality time with it, experimenting what the GPU (Broadcom VideoCore IV) likes and hates. So here comes "Qt5 Cinematic Experience - Raspberry Pi Edition": The changes made for this RPi version are: Original version was qu

Qt5 Cinematic Experience

During the past ~20 months I've made several blog posts about Qt5, QML Scene Graph, shaders and whatnot. As Qt5 beta is getting reeeeally close, I thought this would be a good time for a fresh Qt5 technology demo. This one is called 'Cinematic Experience' and looks a bit like this: (best viewed in HD ) Cinematic Experience collects many of the new Qt5 QtQuick 2.0 features into the same UX demo application. It uses particles, sprites, path animation, custom shaders etc. features which Qt5 introduces for QML UIs. As usual, source codes are available from here . Performance note: The GPU in N9 (SGX530, released Jul 2005) is showing its age. Especially fragment shaders need to be very conservative as the GPU just isn't powerful enough for the N9 screen resolution. To get the application perform in N9, some optimizations were required like disabling the normal-mapping lighting and reducing the amount of fog particles. As seen in the video, after these tw

Qt5 LedScreen component

Howdy! Do you remember the time before HD, amoled etc. super sharp screens? When pixels were so big that you could easily count them and any colors were luxury? This is your ticket back to these good ol' times: LedScreen Qt5 & QtQuick 2.0 component! Here is a video presenting it with example applications: This component allows you to use any QML content as the source for the ledscreen, define led size and color or use colors from the source item. So it doesn't contain kitchen sink yet, but there's only so much you can fit into 60 lines of QML + GLSL with API documentation.. ;-) Feel free to grab sources from here & modify & use as you want! PS: Hoping to be able to develop & demo Qt5 soon on Raspberry Pi!

Smoke The Bugs!

Smoke the Bugs is now available to download from Nokia Store for Harmattan N9 and for Anna/Belle . No bugs (except software bugs!) were harmed while developing the game, but to know whether this virtual bug smoking is suitable for you, check this video of game play on N9: As explained here earlier , this was partly an expedition on making a game with pure QML + JavaScript + shader effects. Plan was to make it totally without C++ (excluding the launcher which Qt SDK generates automatically) and to see what the outcome would be. So summing up some random development notes here: Harmattan version of the game utilizes Qt-components for portrait main window and for disabling swipe while playing. Symbian version does not use Qt-components as pure QML was enough. It's good to use Loader for separating rest of the UI from initial "splash screen" for faster startup. Another option on Harmattan would be to show static splash screen image with invoker . In this game, loaders are