Questions tagged [qt3d]

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

Qt3D provides functionality for near-realtime simulation systems with support for 2D and 3D rendering in both Qt C++ and Qt Quick applications.

The functionality in Qt3D is divided into three modules: Qt3DCore, Qt3DInput and Qt3DRenderer.

Official documentation can be found here.

413 questions
3
votes
1 answer

Qt3D draw lines consumes too much memory

how to draw line with Qt3D? how to delete the painted line? I found the following code consume too much memory if you draw many lines, although it works. this method allocates too much storage for drawing only one line and it does not free them. if…
ulookabit2
  • 41
  • 2
3
votes
2 answers

Text2DEntity renders opaque and hides other entities behind it

I draw some 2d text entities in a Qt3D QML scene but some of the texts always render opaque, i.e hide the contents behind them. When looking at the scene from behind ( changing the position of the camera to Qt.vector3d(0,0,-40) ) all texts render…
vre
  • 6,041
  • 1
  • 25
  • 39
3
votes
1 answer

How to send QImage to Qt3D Entity from C++ to QML for using it as texture?

I need to change the texture of a plane in a 3D scene. In the BackEnd class in C++ I make a new QImage for setting it on a texture. I want to send it as a signal to my QML and there assign it to the planes material property. But it looks like…
3
votes
1 answer

Disable all light sources in Qt 3d

In my company there is a shift from an old 3D engine to Qt3d. One goal of this undertaking is to compare the rendered view of the old 3D engine with the Qt3d rendering. For this I wrote a small example application, where I can compare old and new…
Aleph0
  • 5,816
  • 4
  • 29
  • 80
3
votes
1 answer

How/where does Qt3d assign default values to shader uniforms?

In Qt's Qt 3D Wireframe QML example, the vertex shader code looks as follows: #version 330 core in vec3 vertexPosition; in vec3 vertexNormal; out EyeSpaceVertex { vec3 position; vec3 normal; } vs_out; uniform mat4 modelView; uniform mat3…
user4072916
3
votes
1 answer

Signal to slot connection: triggering signal iteratively inside a loop

Setting up ray-caster I add QRayCaster to my root entity and connect its signal to a slot: void MySceneClass::createRootEntity() { // ... // Add ray caster to root entity m_rayCaster = new Qt3DRender::QRayCaster(m_rootEntity); …
Megidd
  • 7,089
  • 6
  • 65
  • 142
3
votes
2 answers

How to make color of a section be different on a 3D object

I have the following 3D object: The material of my 3D object is coded like this with Qt3D: void MyClass::addMaterial(Qt3DCore::QEntity *entity) { Qt3DExtras::QPhongMaterial * material = new Qt3DExtras::QPhongMaterial(); …
Megidd
  • 7,089
  • 6
  • 65
  • 142
3
votes
2 answers

QScreenRayCaster not finding entity. What am I doiong wrong?

The description of the new QScreenRayCaster in Qt3D looks like its exactly what I want to use, but I cannot get it to work for me. I guess that there is something I need to do in the initialization but I cannot find any examples online to point me…
Bill Sellers
  • 436
  • 3
  • 9
3
votes
1 answer

Contained 3D Window in PyQt5

I'm using PyQt5 and trying to implement a contained 3D window into a python file generated from a .ui file. I made a contained3dWindow class which inherits from QWidget that just creates a 3D window, and I am trying to add the contained window to a…
sth8119
  • 353
  • 1
  • 4
  • 12
3
votes
1 answer

How do I set up multiple viewports using Qt3D without having to use QML

I'd like to set up a multiple view port scene akin to https://doc.qt.io/archives/qt-5.10/qt3d-multiviewport-example.html without having to use QML. At the moment I've got a single view working with: Qt3DExtras::Qt3DWindow* createView (…
Xxomen
  • 33
  • 4
3
votes
1 answer

Qt3D transparency in offscreen renderer

I'm using Qt3D with a combination of this offscreen renderer and modified the framegraph to include a background image, like here. Unfortunately, adding transparency to the objects drawn over the background image using QPhongAlphaMaterial only…
Florian Blume
  • 3,237
  • 17
  • 37
3
votes
2 answers

Qt 3d c++ animation

I have recently started playing with the Qt Framework 3D Module. I however was unable to find any good example for animation in C++ most of them being in QML. I am trying to apply an animation I imported from blender( simple cube translation) using…
3
votes
1 answer

Numpy array via QBuffer to QGeometry

My goal is to create a numpy array and convert its bytes data to QBuffer. I am wondering how to set properly DataSize, ByteStride, and Count. See my code below: self.mesh =…
Matphy
  • 1,086
  • 13
  • 21
3
votes
0 answers

Qt3D How to move the rotation axis to the centre of the object?

I am working on a simple 3D application where I am rotating the 3D object based on the Quaternion values that I read from the MPU6050 sensor. I used the below code from simple-qml example as reference: Entity { id: sceneRoot property real x:…
jxgn
  • 741
  • 2
  • 15
  • 36
3
votes
0 answers

Left-handed to right-handed coordinate system in Qt3D

How to mirror coordinate system in Qt3D? I've loaded panorama using slightly modified (to be able to use metainformation (tilt and heading values to adjust initial view) and unpack individual faces from custom format *.360 (just six *.jpg-s))…
Tomilov Anatoliy
  • 15,657
  • 10
  • 64
  • 169