View Single Post
  #2  
Old 01-04-2008, 10:08 AM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
Here is some sample code that will connect to a webcam, add a delay of 30 frames to the live feed, and apply the texture to a quad:
Code:
import viz
viz.go()

#Create VideoCamera extension
video = viz.add('VideoCamera.dle')

#Connect to webcam
cam = video.addWebcam()

#Add delay of 30 frames to live feed
cam.setDelay(30)

#Apply camera texture to a quad
quad = viz.add(viz.TEXQUAD,pos=(-1,1.8,4),texture=cam)
We rewrote the webcam plugin to support multiple webcams and DV cameras. This new version will be documented and available in the next release, which should be in a few weeks.
Reply With Quote