Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Textures rendering slanted #265

Open
mmoyes opened this issue Aug 28, 2023 · 0 comments
Open

Textures rendering slanted #265

mmoyes opened this issue Aug 28, 2023 · 0 comments

Comments

@mmoyes
Copy link

mmoyes commented Aug 28, 2023

Trying various versions of planes to render a simple grid texture. They are all appearing slanted as below
preview

texture_image = Image.open(texture_file)
texture = pyrender.Texture(source=texture_image, source_channels='RGB' )
material = pyrender.MetallicRoughnessMaterial(
    metallicFactor=0.0,
    roughnessFactor=1.0,
    baseColorTexture=texture
)
mesh = pyrender.Mesh.from_trimesh(trimesh.load(mesh_file), material=material)
mesh_node = pyrender.Node(mesh=mesh, matrix=np.eye(4))
scene.add_node(mesh_node)

Example obj;

g 
v -2.13227844 22.9894409 -0.773106873
v -11.9992619 24.4212971 2.73649788
v -1.09123707 38.4404907 -4.15004826
v -10.9582205 39.8723488 -0.640443385
v -1.98518133 23.0633278 -0.389698267
v -11.8521652 24.495182 3.11990643
v -10.8111229 39.9462357 -0.257034779
v -0.944139957 38.5143776 -3.76663971
vt 1 0 0
vt 0 0 0
vt 1 1 0
vt 0 1 0
g 
f 1/1 4/4 3/3
f 5/1 7/4 6/2
f 1/1 6/2 2/2
f 2/2 7/4 4/4
f 4/4 8/3 3/3
f 3/3 5/1 1/1
f 5/1 3/3 8/3
f 8/3 4/4 7/4
f 7/4 2/2 6/2
f 6/2 1/1 5/1
f 7/4 5/1 8/3
f 4/4 1/1 2/2

Camera Pose:

array([[ 1.,  0.,  0.,  0.],
       [ 0.,  1.,  0., 24.],
       [ 0.,  0.,  1., 32.],
       [ 0.,  0.,  0.,  1.]])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant