How to add texture to a polygon
Hello,
I am trying to create a textured on-the-fly polygon but have not much luck yet. The polygon I am using has the following vertices: Code:
viz.startLayer(viz.POLYGON) I am not sure how to apply the Code:
viz.texcoord Is there a way of adding a .jpg or .bmp file as a texture in this kind of shape? What I intend of using is a seamless texture image that will repeat itself, so the orientation will not be important. Any help will be greatly appreciated!! George |
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') Code:
viz.startLayer(viz.POLYGON) |
All times are GMT -7. The time now is 05:10 PM. |
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC