WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 06-22-2009, 03:04 AM
tomo_the_third tomo_the_third is offline
Member
 
Join Date: Jun 2009
Posts: 2
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
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
retrieve Object names Geoffrey Vizard 11 12-11-2009 04:26 AM
Randomly and Continuously Change Avatar's Face Texture Karla Vizard 4 08-22-2008 12:14 PM
rotate to object jargon Vizard 1 08-08-2005 12:20 PM
how I can get my texture to appear exactly as is defined mspusch Vizard 1 04-23-2005 12:12 PM
Move texture from one object to another Johannes Vizard 2 02-09-2005 03:55 PM


All times are GMT -7. The time now is 04:12 AM.


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