Re: [Interest] Qt3D How to draw 2D-Text always facing the Camera

2018-12-19 Thread david crémoux
Then I would stay with the first solution I proposed, it will be more flexible in your case: regular text2dentity with custom frame graph branch and custom camera. There is just one thing to be aware about the text2dentity, the entity doesn't do the rendering itself: it contains another entity

Re: [Interest] Qt3D How to draw 2D-Text always facing the Camera

2018-12-19 Thread Volker Enderlein
The number of Text2D elements is not known in advance and may differ. It's a simulation environment, where some textual information is added to a fairly high number of elements. To avoid the data management for different kinds of entities my first idea was to create a specialized Text2d  entity

Re: [Interest] Qt3D How to draw 2D-Text always facing the Camera

2018-12-18 Thread david crémoux
You're welcome. I will most probably have to implement the same feature in a near future for the project I'm currently working on. If making the custom camera is too much complex, there is a more basic way but involving more data management (depending on how much 2d text entities you have to

Re: [Interest] Qt3D How to draw 2D-Text always facing the Camera

2018-12-18 Thread Volker Enderlein
Hi David, thanks for the answer. I wasn't thinking of that, as my knowledge about framegraphs is very limited. But this helps me further. Cheers Volker Am 18.12.2018 um 14:53 schrieb david crémoux: Hello Volker, I guess you can achieve it with regular QText2DEntity, with a specific frame g

Re: [Interest] Qt3D How to draw 2D-Text always facing the Camera

2018-12-18 Thread Jason H
Enderlein" > To: interest@qt-project.org > Subject: [Interest] Qt3D How to draw 2D-Text always facing the Camera > > Hi all, > > when building a rather complex Qt3D-Scene I needed some 2D-Text that has > a 3D position, is always facing the camera, and fixed in size, >

Re: [Interest] Qt3D How to draw 2D-Text always facing the Camera

2018-12-18 Thread Philip Schuchardt
If you rendering in QtQuick you can use a Text{} item and project it's position into screen space. On Tue, Dec 18, 2018 at 10:46 AM Volker Enderlein < volker.enderl...@ifm-chemnitz.de> wrote: > Hi Oleg, > > thank you so much for your comment. I saw your entry in the bug tracker > and therefore I

Re: [Interest] Qt3D How to draw 2D-Text always facing the Camera

2018-12-18 Thread Volker Enderlein
Hi Oleg, thank you so much for your comment. I saw your entry in the bug tracker and therefore I tried to go the way with the custom material. Unfortunately I cannot access the underlying material definition of the utility classes that are used to render the text in Text2DEntity. As they are

Re: [Interest] Qt3D How to draw 2D-Text always facing the Camera

2018-12-18 Thread david crémoux
Hello Volker, I guess you can achieve it with regular QText2DEntity, with a specific frame graph branch in your rendering for your 2d text, a layer filter and a custom camera (based on your main camera). david On 18-Dec-18 14:37, Volker Enderlein wrote: Hi all, when building a rather compl

Re: [Interest] Qt3D How to draw 2D-Text always facing the Camera

2018-12-18 Thread Oleg Evseev
Hi Volker, Yes, you have to add custom material because Qt3DRender::QShaderProgram s of default materials are inside private class, so you can't change shaders' code source. Take a look at https://codereview.qt-project.org/#/c/182053/ (that was for including in qt 3d, but you could easily use it

[Interest] Qt3D How to draw 2D-Text always facing the Camera

2018-12-18 Thread Volker Enderlein
Hi all, when building a rather complex Qt3D-Scene I needed some 2D-Text that has a 3D position, is always facing the camera, and fixed in size, independent of the camera settings. While looking over the components provided by Qt3D I stumbled across Text2DEntity and thought about how it can b