WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Vizard (https://forum.worldviz.com/forumdisplay.php?f=17)
-   -   how to add texture to an object (https://forum.worldviz.com/showthread.php?t=2720)

guof6570969 04-29-2010 05:34 AM

how to add texture to an object
 
Hi all,sorry to trouble you
this is my problem:
the code is :
myTex = viz.addTexture('lake3.jpg')
myScreen = viz.add('screen3.IVE' )#my model,contains a suface named "Plane01"
myScreen.setPosition(0,0, 60)
Plane = myScreen.getChild('Plane01')
Plane.rotate(1,0,0, 45)
import vizmat
matrix = vizmat.Transform()
matrix.setScale([1.5,1.5,1])
Plane.texture(myTex)
Plane.texmat(matrix)

but the result is :

the color of the model is only green

i think may be this is due to the Texture Coordinates
but what should i do now ?

I am a newer!

Jeff 04-30-2010 02:25 PM

Make sure the object is exported with a texture applied. If no texture is applied, then the object does not have UVW coordinates.

In the future please use code tags when posting code. That will preserve any indentation and is easier to read.

guof6570969 05-06-2010 10:18 PM

thank you
Jeff


All times are GMT -7. The time now is 02:11 AM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC