WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 09-10-2010, 07:48 AM
tsgk tsgk is offline
Member
 
Join Date: Mar 2010
Posts: 7
Post 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)
	
	
	viz.vertex(x+(1.5), 0.02, 0)
	
	viz.vertex(x+(1.5), 0.02, straight_road)
        i = 0
	while i < 3142:
		x2[i] = (r-(1.5))*cos(right_array[i])
		z2[i] = (r-(1.5))*sin(right_array[i])
		viz.vertex(x2[i]+r, 0.02, z2[i]+9)
		i += 1
	

	viz.vertex(r-(1.5), 0.02, 9)
	viz.vertex(r-(1.5), 0.02, 0)
	viz.vertex(x+(1.5), 0.02, 0)

	myPolygon = viz.endLayer()
The while loop is used to generate a semi-circular side to the polygon.

I am not sure how to apply the
Code:
viz.texcoord
command since at the best with four [x,y] coordinates I can draw a square.

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
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
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


All times are GMT -7. The time now is 09:30 PM.


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