Re: [Interest] [Qt3d] Rendering 3D object with 2D coordinates

2021-03-25 Thread Alex john
On Mon, Mar 22, 2021 at 10:55 AM Alex john wrote: > Transform { > id: trefoilMeshTransform > translation:Qt.vector3d(Qt.vector2D(100, 100)).unproject( > modelView ,mainCam.projectionMatrix, forwardRenderer.viewportRect) > property real theta: 0.0 > property rea

Re: [Interest] [Qt3d] Rendering 3D object with 2D coordinates

2021-03-24 Thread Alex john
On Mon, Mar 22, 2021 at 10:55 AM Alex john wrote: > > On Thu, Mar 18, 2021 at 5:22 AM Walter Rawdanik wrote: > > > > You can’t convert 2d coordinates to a 3d position because you are missing > > the z coordinate. > > I can have a dummy z value as 1 for the calculation. The problem is > similar

Re: [Interest] [Qt3d] Rendering 3D object with 2D coordinates

2021-03-21 Thread Alex john
On Thu, Mar 18, 2021 at 5:22 AM Walter Rawdanik wrote: > > You can’t convert 2d coordinates to a 3d position because you are missing the > z coordinate. I can have a dummy z value as 1 for the calculation. The problem is similar as described here https://community.khronos.org/t/getting-2d-to-3d

Re: [Interest] [Qt3d] Rendering 3D object with 2D coordinates

2021-03-17 Thread Walter Rawdanik
You can’t convert 2d coordinates to a 3d position because you are missing the z coordinate. It is similar problem like with picking objects in a 3D scene - you can unproject a 2d screen coordinate to a vector/ray in your 3d scene and then do a ray casting to see what you hit but that’s about it.

Re: [Interest] [Qt3d] Rendering 3D object with 2D coordinates

2021-03-16 Thread Alex john
I did the following changes to the wireframe example (Trefoilknot.qml file translation property of transform) but still unable to get the modelView Matrix, and also not sure whether the following changes to translation are right If anyone can confirm and let me know property var mainCam // got

Re: [Interest] [Qt3d] Rendering 3D object with 2D coordinates

2021-03-15 Thread Alex john
> Going the other way round (back-projection) can be done by e.g. > QVector3D::unproject() Thanks, as I'm referring the the wireframe example I was able to get the camera projection matrix from Camera Qml. However, I'm unsure how to get the ModelView matrix and the viewport. As I have loaded my

Re: [Interest] [Qt3d] Rendering 3D object with 2D coordinates

2021-03-15 Thread Federico Ferri
The 3D coordinates are *world coordinates*, and their units is whatever you like, e.g. you can have a cube of size 0.1, 1, or 100, and with appropriate camera settings, it will appear the same onto the window/device. 2D *window coordinates* are another thing. For going to world coords to window c

[Interest] [Qt3d] Rendering 3D object with 2D coordinates

2021-03-15 Thread Alex john
Hello , Im successessfully able to load the obj file in Scene3D, and by using fromEulerAngles I'm able to get the required yaw, pitch and roll.However, I'm not able to use the right translation to get the object rendered. I get the x,y coordinates in pixels from the other module and I need to rend