Reputation: 1050
I'm trying to implement an type of feature which uses camera stream as a background where all rendering logic is handled by SceneForm. To render camera stream I'm using SceneForms ExternalTexture
. Camera stream is loaded using CameraX Preview
component and the ExternalTexture.surface
.
ExternalTexture
).Preview
rendered into
SurfaceView
MediaPlayer
video test for checking if the
ExternalTexture.surface
is rendering anything.I'm expecting the ExternalTexture.surface
CameraX stream source orientation to be the same as MediaPlayer
stream source.
I've tried several things from rotating the Nodes
in ScenForm to changing the UV cordinates of the material to which ExternalTexture
is bound. The problem seems to be somewhere between the ExternalTexture
and CameraX Preview
stream but can't pinpoint where it might be.
Any help would be appreciated.
Upvotes: 0
Views: 267
Reputation: 1050
Fixed by changing my plane obj vertices to
# Blender v2.91.0 OBJ File: ''
# www.blender.org
mtllib surface.mtl
o Plane
v -1.000000 -1.000000 0.000000
v 1.000000 -1.000000 0.000000
v -1.000000 1.000000 0.000000
v 1.000000 1.000000 0.000000
vt 1.0000 0.0000
vt 1.0000 1.0000
vt 0.0000 1.0000
vt 0.0000 0.0000
vn 0.0000 0.0000 1.0000
usemtl None
s off
f 1/1/1 2/2/1 4/3/1 3/4/1
Upvotes: 1