[prev in list] [next in list] [prev in thread] [next in thread]
List: pykde
Subject: [PyQt] Ambient texture map
From: Paul <pyqt () paulkoppen ! com>
Date: 2017-01-23 22:09:35
Message-ID: 35fd0036f065a4e164b2cb2dee3dd8f2 () paulkoppen ! com
[Download RAW message or body]
Hello,
I have an object in .obj format with a .mtl which defines an ambient
texture map using map_Ka. Could it be that Qt3D does not support ambient
texture maps?
My Python code looks something like this:
#-----
app = QGuiApplication([])
view = Qt3DWindow()
sceneRoot = QEntity()
# Scene camera.
basicCamera = view.camera()
basicCamera.set...
# Load scene.
scl = QSceneLoader(sceneRoot)
scl.setSource(QUrl.fromLocalFile('10097.obj'))
sceneRoot.addComponent(scl)
view.setRootEntity(sceneRoot)
view.show()
app.exec()
#-----
But the object renders near black (screenshot attached). Only texture
seems to come from diffuse light (with a default light set up
somewhere?). I am looking for a way to see the mesh without light in the
scene.
I found this page listing all sorts of materials
(https://doc-snapshots.qt.io/qt5-5.6/qt3drender-qmaterial.html) but
ambient is always QColor rather than QAbstractTextureProvider.
Any help greatly appreciated.
Regards,
Paul
["pyqt-qt3d-render-black.png" (image/png)]
[Attachment #4 (text/plain)]
_______________________________________________
PyQt mailing list PyQt@riverbankcomputing.com
https://www.riverbankcomputing.com/mailman/listinfo/pyqt
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic