![]()  | 
	
| 
		 
			 
			#1  
			
			
			
			
			
		 
		
	 | 
|||
		
		
  | 
|||
| 
		
	
		
		
			
			 
				
				Applying texture or colour to an on-the-fly object
			 
			
			
			Hello I am sorry that this must seem a very low-tech question compared to the others in this forum but I'm trying to meet a deadline and I'm getting frequently frustrated by the Vizard tutorials.  
		
		
		
		
		
		
		
		
	
	I am creating an "on-the-fly" object and need to add texture or colour to its faces. I wish to make the faces of the corner a different colour or different texture. How do I go about doing this? I include the code for my object here: #start corner RADIUS = 0.12 #topandbottom vertices viz.startlayer(viz.LINES) viz.vertexcolor(0, 0.6, 0) viz.vertex(-RADIUS, -RADIUS, -RADIUS) viz.vertex(-RADIUS, -RADIUS, RADIUS) viz.vertex(-RADIUS, -RADIUS, -RADIUS) viz.vertex( RADIUS, -RADIUS, -RADIUS) viz.startlayer(viz.LINES) viz.vertex(-RADIUS, RADIUS, -RADIUS) viz.vertex(-RADIUS, RADIUS, RADIUS) viz.vertex(-RADIUS, RADIUS, -RADIUS) viz.vertex( RADIUS, RADIUS, -RADIUS) #Sides viz.startlayer(viz.LINES) viz.vertex(-RADIUS, -RADIUS, -RADIUS) viz.vertex(-RADIUS, RADIUS, -RADIUS) viz.vertex( RADIUS, RADIUS, -RADIUS) viz.vertex( RADIUS, -RADIUS, -RADIUS) viz.startlayer(viz.LINES) viz.vertex(-RADIUS, -RADIUS, RADIUS) viz.vertex(-RADIUS, RADIUS, RADIUS) macorner = viz.endlayer() #position corner 1.5m away macorner.translate(0, 1.8, 1.5) macorner.setAxisAngle( [0, 1, 0 , -45] ) #end corner  | 
| 
		 
			 
			#2  
			
			
			
			
			
		 
		
	 | 
|||
		
		
  | 
|||
| 
		
	
		
		
		
		 
			
			You could add two on-the-fly quads inside your lines as the faces you want to apply texture or color to.  This page in the docs show an example of applying a texture to an on-the-fly quad. 
		
		
		
		
		
		
		
		
	
	http://www.worldviz.com/vizhelp/VizH..._and_sizes.htm  | 
![]()  | 
	
	
		
  | 
	
		
  | 
			 
			Similar Threads
		 | 
	||||
| Thread | Thread Starter | Forum | Replies | Last Post | 
| retrieve Object names | Geoffrey | Vizard | 11 | 12-11-2009 05:26 AM | 
| Randomly and Continuously Change Avatar's Face Texture | Karla | Vizard | 4 | 08-22-2008 01:14 PM | 
| rotate to object | jargon | Vizard | 1 | 08-08-2005 01:20 PM | 
| how I can get my texture to appear exactly as is defined | mspusch | Vizard | 1 | 04-23-2005 01:12 PM | 
| Move texture from one object to another | Johannes | Vizard | 2 | 02-09-2005 04:55 PM |