Ben
Ben

Reputation: 33

Adding Textures to Objects in Vizard Python

I am trying to add a wood texture to a table. Table is an object and the texture is a .jpg. The problem that I am getting is that when the texture is applied to the object, it doesn't seem to 100% work. The table with no texture is a solid red color. When the texture is applied it is a red table with what appears to be the texture of wood on it. But the texture in .jpg form is brown, and I would like the table to be brown. Here is my code:

table = viz.addChild('table.wrl')
table.collideMesh()
wood = viz.addTexture('tile_wood.jpg')
table.texture(wood)

I know that the texture is in the right folder because I am calling it and not getting an error and the table does appear to change a little. But I would like 100% of the texture to cover the table and change the color to brown, not red.

Any help is appreciated! Thanks.

Upvotes: 0

Views: 315

Answers (1)

You may check your table.wrl UV Coordinates and repeat, maybe you apply the texture successfully and your problem is with texture scaling

Upvotes: 0

Related Questions