Controlling a 3d model
-
Hi, we are creating a 3D model of a robotic arm using blender tool, so we would like add that model to our qt application and control its movements. so please help me out about this on how to import that 3D model(.stl file) and best way to control the model using c++.
-
Hi and welcome to devnet,
Did you consider the Qt3D module ?
-
Personally I would not use Qt3D module yet due to luck of documentation (unless there was a recent change I did not notice).
There are a few available 3D graphics related libraries on the marked which can simplify visualization.
One of them is VTK. You might consider Bullet if you need help with physics. -
-
@SGaist Thank you for the reply.Yes I'm considering the Qt3D module but can we visualize the application for the controls and the 3D model in the same window? As Iam beginner here can you give me a link for any tutorial for doing this task..?
@hareeshqt said:
can we visualize the application for the controls and the 3D model in the same window?
You mean like this: kinematics demo?
-
@hareeshqt said:
can we visualize the application for the controls and the 3D model in the same window?
You mean like this: kinematics demo?
-
@hareeshqt Great. So, yes it's possible, just what I did in the demo :-) Easiest way is to have a Qt3D scene in QML and use QtQuick controls as overlay, like:
main.qml
import QtQuick 2.5 import Qt3D.Core 2.0 import Qt3D.Render 2.0 import QtQuick.Scene3D 2.0 import QtQuick.Window 2.2 import QtQuick.Controls 1.4 Window { id: mainWindow visible: true width: 800 height: 600 // ... // Qt3D scene Scene3D { // ... } // Overlay... Button { // ... } }
-
@hareeshqt Great. So, yes it's possible, just what I did in the demo :-) Easiest way is to have a Qt3D scene in QML and use QtQuick controls as overlay, like:
main.qml
import QtQuick 2.5 import Qt3D.Core 2.0 import Qt3D.Render 2.0 import QtQuick.Scene3D 2.0 import QtQuick.Window 2.2 import QtQuick.Controls 1.4 Window { id: mainWindow visible: true width: 800 height: 600 // ... // Qt3D scene Scene3D { // ... } // Overlay... Button { // ... } }
-
@hareeshqt should we have Qt3D module and opengl for doing this...?
-
@hareeshqt should we have Qt3D module and opengl for doing this...?
@hareeshqt In the .pro file you need
QT += qml quick 3dcore 3drender
. -
@hareeshqt In the .pro file you need
QT += qml quick 3dcore 3drender
. -
@hareeshqt "Qt Quick Controls Application"
-
@hareeshqt "Qt Quick Controls Application"
-
@Wieland but if we use the Qt Quick Controls Application, we are not getting the .pro file is there any method.....?
@hareeshqt In Qt Creator, click "New project", select "Qt Quick Controls Application", click "Choose", enter a project name, click "Next", click "Next", click "Next", click "Finish". Your project folder now contains some files, include a .pro file.
-
@hareeshqt In Qt Creator, click "New project", select "Qt Quick Controls Application", click "Choose", enter a project name, click "Next", click "Next", click "Next", click "Finish". Your project folder now contains some files, include a .pro file.
-
I'm pretty sure you didn't select "Qt Quick Controls Application" but "Qt Quick Controls UI".
-
I'm pretty sure you didn't select "Qt Quick Controls Application" but "Qt Quick Controls UI".
-
@hareeshqt Ok so how can I import my 3d model from blender to Qt ?
-
@hareeshqt Ok so how can I import my 3d model from blender to Qt ?
@hareeshqt Take a look at the examples. Maybe start with this one.
-
@hareeshqt Take a look at the examples. Maybe start with this one.