[Interest] Rendering 3d object on webcam video
Mike Krus
mike.krus at kdab.com
Wed Mar 3 17:14:01 CET 2021
Hi
try putting the camera first, then setting the clear colour of your frame graph to “transparent” ?
Mike
> On 3 Mar 2021, at 14:28, Alex john <blackbriar153 at gmail.com> wrote:
>
>
> Hello,
>
> I am trying to overlay a 3d object(.obj file) on top of the video, I could successfully load the .obj file and rendered it by refering to example https://doc.qt.io/qt-5/qt3d-wireframe-example.html, later I changed the code in main.qml by raping Entity from main.qml into Scene3D and tried to get the webcam rendered using QtMultimedia as below.
>
> Rectangle{
>
> Scene3D{
> anchors.fill: parent
> focus: true
>
> Entity {
> id: root
>
> // Render 3d object same code as in https://doc.qt.io/qt-5/qt3d-wireframe-example.html
>
> }
>
>
> }
> Camera {
> id: camera
> imageProcessing.whiteBalanceMode: CameraImageProcessing.WhiteBalanceFlash
> exposure {
> exposureCompensation: -1.0
> exposureMode: Camera.ExposurePortrait
> }
>
> flash.mode: Camera.FlashRedEyeReduction
>
>
> }
>
> VideoOutput {
> source: camera
> anchors.fill: parent
> //focus : visible // to receive focus and capture key events when visible
> }
>
> }
>
> However, what happens is either the camera video is seen or the 3d object based on the sequence whichever is last. How can I get the 3D object on top of the video? any clues?
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> https://lists.qt-project.org/listinfo/interest
—
Mike Krus | mike.krus at kdab.com | Senior Software Engineer & Teamlead
KDAB (UK) Ltd., a KDAB Group company
Tel: UK Office +44 1625 809908 Mobile +44 7833 491941
KDAB - The Qt Experts, C++, OpenGL Experts
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4193 bytes
Desc: not available
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20210303/269b7048/attachment.bin>
More information about the Interest
mailing list