![]() |
#2
|
|||
|
|||
Texturing an on-the-fly object is possible. You'll want to set the texture coordinate assosiated with each vertex with the viz.texcoord command. Apply a texture to the completed object with
Code:
roadTexture = viz.add('road.jpg') myPolygon.texture(roadTexture) Code:
viz.startLayer(viz.POLYGON) viz.texcoord(0,2) viz.vertex(-1,1,0) viz.texcoord(2,2) viz.vertex(1,1,0) viz.texcoord(2,0) viz.vertex(1,-1,0) viz.texcoord(0,0) viz.vertex(-1,-1,0) q = viz.endLayer() t = viz.add('ball.jpg') t.wrap(viz.WRAP_S,viz.REPEAT) t.wrap(viz.WRAP_T,viz.REPEAT) q.texture(t)
__________________
Paul Elliott WorldViz LLC |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to render a texture of the transparent object and then blur it | whj | Vizard | 1 | 09-25-2012 03:15 PM |
How to apply shader and render texture to an object | whj | Vizard | 0 | 04-23-2010 12:23 PM |
Translating a texture and its Alpha | shivanangel | Vizard | 5 | 12-02-2008 04:52 PM |
Randomly and Continuously Change Avatar's Face Texture | Karla | Vizard | 4 | 08-22-2008 12:14 PM |
how I can get my texture to appear exactly as is defined | mspusch | Vizard | 1 | 04-23-2005 12:12 PM |