Questions tagged [qtquick3d]

QtQuick3D is a Qt module providing high level 3D scene rendering using OpenGL for Qt/QML applications.

QtQuick3D adds 3D content to QtQuick's cross-platform ability and coding power. Developers of fluid user interfaces can now enhance their applications with 3D content in the same way icons and pixmaps would be used in a 2D application.

QtQuick3D is a product resulting from the project.

QtQuick3D is made up of the QML bindings for Qt3D (called QML3D) plus Qt Creator integration, and other supporting tools. Qt3D may be used to extend QtQuick3D by creating new user-defined QML3D items using C++.

OpenGL hardware was designed for 3D acceleration and QtQuick3D allows applications to utilise that 3D hardware fully.

QtQuick3D is the Qt Quick product for scripting 3D applications in QML. Apps can be 2D QML applications with a small amount of simple 3D content; through to complex 3D scenes, containing 3D assets - such as complex 3D models, and shader effects.

You can find more information on QtQuick3D Reference Documentation

22 questions
4
votes
1 answer

How to draw 3D lines onto a QML scene?

I try to integrate Bullet Physics' debug drawing interface into QML, so I have to implement a drawLine() method. void drawLine(const btVector3 &from, const btVector3 &to, const btVector3 &color); What I tried is that I inherited an item, that is…
danijar
  • 32,406
  • 45
  • 166
  • 297
3
votes
0 answers

How to control size of texture for Node with an Image in Quick3d?

I'm experimenting with QtQuick3D on Qt 5.15. It's feature to embed QtQuick Items is quite awesome. I like to create a rectangle (100 x 100 units) and fill it with an Image (1000 x 1000 pixels). That works nice when I define a Material and assign it…
marsl
  • 959
  • 1
  • 14
  • 25
2
votes
0 answers

lmport/Export .dwg file to Scene3d in qt3d

I have a simple program that has Scene3d in qml like this code : Scene3D { id : scene3d anchors.fill: parent focus: true aspects: ["render", "logic", "input"] hoverEnabled: true cameraAspectRatioMode:…
Parisa.H.R
  • 3,303
  • 3
  • 19
  • 38
2
votes
1 answer

Using QT and QML how to rotate a mesh about a specific origin

I have imported several 3D meshes from blender to form a human figure and I want to rotate the arm-meshes about a specific origin point so that it will look like the normal movement of an arm. In order to display the mesh, it needs to be included in…
1
vote
0 answers

How using gl_PointCoord at fragment shader with QtQuick for points primitive

For example simple fragment shader for circle points: void main() { float size = 0.5; vec2 center = vec2(0.5); vec2 d = gl_PointCoord - center; float distSquared = dot(d, d); if(distSquared < size * size) gl_FragColor =…
1
vote
2 answers

How to perform dynamic conversion between mouse coordinates and world coordinates with QtQuick3D?

Description/ Code I have a Qt Quick 3D View and corresponding scene that was designed to be compiled on Qt 6.3.0 import QtQuick import QtQml import QtQuick3D import QtQuick3D.Helpers Window { width: 800 height: 600 visible: true …
mike510a
  • 2,102
  • 1
  • 11
  • 27
1
vote
1 answer

Qt Quick 3D custom geometry in Qt5/Qt6

I'm trying to build an example project with custom geometry under Qt 5.15.2 (https://doc-snapshots.qt.io/qt6-dev/qtquick3d-customgeometry-example.html) I get all qml ui elements drawn except for the mesh. In Qt 6 all works fine and mesh is…
Valeriia
  • 586
  • 2
  • 4
  • 21
1
vote
0 answers

Qt Quick3D: draw a 3D line between 2 points

I am using the new QtQuick3D from Qt6. I need to draw a line between 2 points, but didn't find a function dedicated for this. Therefore I decided to use a basic cylinder that I can scale and rotate. The scaling works as intended, but the rotation…
uro1012
  • 31
  • 3
1
vote
1 answer

Is it possible to dynamically load .OBJ files using a QML Quick3D View3D?

I am experiencing issues loading and displaying a 3D model (.obj) in QML (Qt 5.15/6.0.0). I have tried the following 3 techniques but they all seem to have unique issues. Using QQuickItem and OpenGL with my own .obj loader. This can work but I'd…
0
votes
0 answers

Set QML node's property other than setProperty

Is it possible to update the property "position" other than QQuick3DObject::setProperty ? myQQuick3DObject->setProperty("position", QVector3D{x, y, z}); I am in a context where I receive from udp socket a large flow of updates per seconds for this…
bitmap kid
  • 181
  • 7
0
votes
0 answers

Render Qt Quick 3D scene to image fails with : No GLSL shader code found

I am trying to render a Qt Quick 3D scene to an image buffer without any window at all (ideally, this has to run on a headless server). I found that class QQuickRenderControl is designed for this purpose (accelerated rendering, no window), and the…
fferri
  • 18,285
  • 5
  • 46
  • 95
0
votes
2 answers

Quick3D: Set color independently from texture / load texture dynamically

I face the problem of a slow response with this code Repeater3D { model: Model { materials: [ DefaultMaterial { id: pieceMaterial diffuseColor: "green" …
0
votes
0 answers

Quick3D fails with software render backend

When I run my Qt project inside a docker container with the environment variable Qt_quick_backend=software (possibly related to https://bugreports.qt.io/browse/QTBUG-102634), the application runs but does not display any QtQuick 3D object. If I…
0
votes
1 answer

How can I shift the Rotation Axis of imported model? (QML, QtQuick3D, View3D)

Introduction In my QtQuick (QML) project I need to use 3D model of dice (a cubic one) that should be rotated during animation process. I use View3D, because rotating dice will be inside of 3D-insertion which is inside my 2D project. I have…
fever
  • 18
  • 4
0
votes
0 answers

QtQuick 3D: Scene3DView is not a type

Before I start pulling my hair out, I thought I might try asking for help here. On a Fedora 36 installation with a stock Qt5 installation, the following code for the main.qml works with no issues. import QtQuick 2.12 import QtQuick.Layouts…
dogear
  • 21
  • 4
1
2