4

Anyone who has experimented with Qt QML and 3D OpenGL, I am interested in 2 frameworks I've read about, but it is not clear to me if in fact they are the same framework. The most interesting of the two is outlined in this Qt Developer Days 2013 video presentation by Krzysztof Krzewniak:

http://www.youtube.com/watch?v=29wCpA0DBZI

While very interesting, unfortunately I cannot find anywhere else online some source code for this, or even the name of the framework discussed.

There is QtQuick3d:

http://doc.qt.digia.com/qt-quick3d-snapshot/

However, I cannot tell if in fact this is describing the same framework from Dev Days or if they are separate (and apparently somewhat similar) frameworks? My initial look at the API in comparison to the video suggests they are different, which seems rather redundant to have 2 significant projects in the Qt community attempting to do the same thing.

Can anyone with some knowledge in this area of QML provide some pointers here?

László Papp
  • 51,870
  • 39
  • 111
  • 135
johnbakers
  • 24,158
  • 24
  • 130
  • 258

3 Answers3

8

Right, so let us start with some history behind...

Qt was initially a 2D framework for rendering computer graphics UI for simple desktop applications.

Qt3D was developed earlier than qml became mature as an extension to the 2D world provided by the QtGui module, or even QtOpenGL.

It was a 3D Qt api for rendering 3D content on the screen. It had different aspects to deal with 3D objects, build them, put them on the screen, compute intersection, and so on.

The idea was to bring easy to create application concept into Qt rather than always going through QtOpenGL or lower-level API for creating games, simulators, cad applications, and so on.

enter image description here

Right, when QML came out and kept maturing, the Qt3D contributors in Brisbane thought that it would be nice to put a QML API on top of the existing Qt3D C++ API for easy use in QML application. That is how we come to QtQuick3D.

enter image description here

When Nokia decided to shut the Brisbane office done, the Qt3D module pretty much became unmaintained and abandoned only getting a few bugfixes from the community every now and then.

There is some work in progress by KDAB to re-architecture and re-design the module, but it is not mature yet, and it can be found in a separate branch.

The video you are referring to is not dealing with the unmaintained Qt3D module. Rather, it tries to build 3D based on the new scene graph introduced in Qt. Since, there is no Qt3D module working nicely with the new SG in Qt 5, people become pragmatic and move on. That is what you see in the video.

Now, as you can see this is not quite a duplication, but... In the future, the new Qt3D architecture might be acting better with the new scene graph. In fact, KDAB has put a lot of effort into bringing the OpenGL support into QtGui up to real world.

That was the foundation for the Qt3D module which will probably be used in the future (hopefully) by 3D applications written based on Qt, but in the meantime... the video shows how to build hardware accelerated 3D UI based on what we have today.

László Papp
  • 51,870
  • 39
  • 111
  • 135
  • It is written in the answer... Krzysztof also clearly states at the beginning of the video that it is based on Scene Graph. – László Papp Apr 26 '14 at 11:51
  • I do not see any information about where to actually get this framework or what it is called in your answer. – johnbakers Apr 26 '14 at 11:52
  • You have never used QtGui and QtQuick, really?! – László Papp Apr 26 '14 at 11:53
  • QtQui and the Qt Scenegraph are the underlying frameworks, but what is this kit described in the video? – johnbakers Apr 26 '14 at 11:54
  • No, there is no such a thing as "Qt Scenegraph" (cannot recall it writing in the answer either, nor in the video). Scene Graph is the technique of the module. – László Papp Apr 26 '14 at 11:55
  • This video describes a specific library for QML that abstracts many OpenGL functions. I am curious where I can find this library. All you have described is the underlying framework of Qt's scene graph functionality, not the specific tool described in this video. – johnbakers Apr 26 '14 at 11:56
  • There is no "specific tool". It is using the core technology in Qt. Anybody can do that. There are even 3D qml examples in Qt proper. – László Papp Apr 26 '14 at 11:57
  • 1
    Let's not mince words, even digia refers to it as a "Qt Scenegraph" : https://blog.qt.digia.com/blog/2010/05/18/a-qt-scenegraph/. I think you know what I am asking, it is fine for you to say that you don't know the answer, but all the exposed QML types like "Camera" etc in that video are present in the presenter's QML library he discusses, so I'm curious where I can get this. – johnbakers Apr 26 '14 at 11:58
  • OK, in that case, this is off-site resource request, which is off-topic, and thanks for your downvote after helping you, it is appreciated. – László Papp Apr 26 '14 at 11:59
  • 1
    That's completely ridiculous. The question is very valid. – johnbakers Apr 26 '14 at 12:00
  • 1
    The question is valid, and you got the answer for that. I am sorry for not providing answer for what is not in the question, and effectively off-site resource request: where can I get a third-party proprietary company's source code. The fact that you give -1 instead of +1 or 0 for this, is a bit outstanding, however. – László Papp Apr 26 '14 at 12:10
  • @LaszloPapp I'm not sure why you say "there is no such thing as Qt Scenegraph." That is what everyone calls it that I've talked to. It means the scene graph built into QML as of Qt Quick 2. – Jerome Baldridge Apr 26 '14 at 12:19
0

These two 3d libraries are not the same, you are correct.

There is plenty of reference information you've already linked to online regarding Qt3d 1.0 and QtQuick 3d which are similar and related.

The OpenGL work in the video presentation is something much newer. It is directly laid on top of the QSceneGraph and QQuickWindow functionality.

My recommendation is to not use the approach in this video or the Qt3d/QtQuick3d library. Instead, wait for the KDAB to finish Qt3d 2.0 (which may already be out, you should check). Qt3d 2.0 is a full library for QML that will let you do what is demonstrated in this video. (http://qt-project.org/wiki/Qt3D-wip-newapi-Overview, http://prezi.com/u-ewejoqxqj2/qt3d-20/)

Community
  • 1
  • 1
Jerome Baldridge
  • 518
  • 2
  • 13
  • Thank you for your contribution. I would like to note that, while not necessarily a problem, you can also answer posts that do not come from OpenLearner. There are plenty of users out there who could use your insights. – Bart Apr 26 '14 at 12:20
  • 1
    Very interesting and suspicious account. This account seems to appear in OpenLearner's history several time with poor and selected answers with -1 score where there are alternative upvoted answers with 4-5 scores etc. This account stopped at 125 reputation a few months ago before it lost the rep. Not to mention, I wrote this as part of my answer with more explanation already. Also, one upte on OpenLearner's comments under my answer once this account showed up. The suspicious level is growing... – László Papp Apr 26 '14 at 12:20
  • LOL that might be because we share the same office. If that makes me suspicious, well, I'm just a suspicious kinda guy! Actually I don't use SO much but whenever he is talking about a conversation on there, I like to check it out. – Jerome Baldridge Apr 26 '14 at 12:23
  • Fair enough. Make sure you don't end up voting too much on each other's content. That will attract moderator attention and could end up hurting the both of you. Just a word of advice. – Bart Apr 26 '14 at 12:24
  • Yeah @JXB, stop being a troublemaker! :) – johnbakers Apr 26 '14 at 12:25
0

There are quite a lot of outdated info floating around wikis, and finding useful info and a non-obsolete repository was a pain. So here's what I learned a few months back:

The correct and, as far as I know, the only currently valid git repo is this:

git://gitorious.org/qt/qt3d.git

The "There is some work in progress by KDAB...not mature yet...found in a separate branch." paragraph of Laszlo Papp's answer seems to refer to wip/newapi branch, while master branch seems to be maintained in compilable state (meaning, I have been able to compile it the few times I've tried, YMMV). Master branch should be fine for playing around with Qt3D, but looks like API is going to change.

I played with it a few months ago on Windows 8.0, the MinGW toolchain that is installed with SDK, and using native full OpenGL drivers (which I had to fetch from ATI web site for my card, default Windows drivers are not enough). And looks like it has not broken to bit rot, an example still built and I have a moon rotating on this screen.

It has README file, which will tell you how to build it, starting with building Qt5. Here another good link for that, since the qt3d README is not very comprehensive. And if you're on Windows, just skip Webkit and its deps, unless you really need it, because those extra deps can be a bit of hassle.

hyde
  • 60,639
  • 21
  • 115
  • 176