WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 04-08-2008, 05:18 PM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
Does the video show up fine when you apply it to a texture quad, like in the following example?
Code:
import viz
viz.go()

video = viz.add('Trailer1.mpg')
video.play()

viz.addTexQuad(texture=video,pos=(0,1.8,2))
If so, then your Thing.ive model might now have correct texture coordinates. You will need to add the texture coordinates in your modeling software and re-export it.

Also, here is an example that shows how to perform functions while a button is pressed:
Code:
import viz
viz.go()

viz.add('gallery.ive')

#Add buttons for turning viewpoint left/right
lbutton = viz.addButtonLabel('Turn Left',pos=(0.4,0.1,0))
rbutton = viz.addButtonLabel('Turn Right',pos=(0.6,0.1,0))

#Setup timers for turning viewpoint
TURN_SPEED = 90.0
def TurnView(speed):
	viz.MainView.setEuler(speed*viz.elapsed(),0,0,viz.HEAD_ORI,viz.REL_LOCAL)
turnLeftTimer = vizact.ontimer(0,TurnView,-TURN_SPEED)
turnRightTimer = vizact.ontimer(0,TurnView,TURN_SPEED)

#Disable timers initially
turnLeftTimer.setEnabled(False)
turnRightTimer.setEnabled(False)

#Enable turn left timer while turn left button is down
vizact.onbuttondown(lbutton,turnLeftTimer.setEnabled,True)
vizact.onbuttonup(lbutton,turnLeftTimer.setEnabled,False)

#Enable turn right timer while turn right button is down
vizact.onbuttondown(rbutton,turnRightTimer.setEnabled,True)
vizact.onbuttonup(rbutton,turnRightTimer.setEnabled,False)
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
Jump to video frame? Jerry Vizard 1 10-09-2006 01:43 PM
Video Texture Not Working on Some Objects paulgoldberg Vizard 1 04-17-2006 12:41 PM
How to synchronize play/pause of 2 video streams in stereo Gilliard Vizard 1 09-01-2005 08:58 AM
video buffer cade_mccall Vizard 6 08-16-2005 01:48 PM
video jebber Vizard 1 09-28-2004 05:20 PM


All times are GMT -7. The time now is 09:51 AM.


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