WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 03-25-2006, 01:27 PM
cantwelljm cantwelljm is offline
Member
 
Join Date: Feb 2006
Posts: 10
viewing issue.

Hi, my issue concerns the viewing of a building which i have imported to vizard. My question is has vizard the functionality to view my building by creating a camera view which orbits the building (fly through) ? I am relatively new to vizard and have limited script knowledge. If there is a solution to my concern, does it require much scripting and does it require much work?? Any help would be greatly appreciated as i've to present my building to an audience next week!!!

Regards, John
Reply With Quote
  #2  
Old 03-27-2006, 01:14 PM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
Hi,

By "orbit" do you mean following a pre-determined path or do you want to control the orbit at runtime?
Reply With Quote
  #3  
Old 03-29-2006, 07:42 AM
cantwelljm cantwelljm is offline
Member
 
Join Date: Feb 2006
Posts: 10
Viewing Issue

Hi,
Thank you for your reply. By "orbit" i mean a predetermined path around the model. Looking forward to your reply...
...regards john.
Reply With Quote
  #4  
Old 03-29-2006, 01:03 PM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
Hi,

You have a couple options. You can use the view.goto function to animate the viewpoint moving to certains predetermined locations. Take a look at the animateview.py example in the [Vizard25]/examples/advanced directory.

You can also create an animation path. Take a look at the animatepath.py script in the same directory. Instead of linking the animation path to the ball, you can link it to the viewpoint.

If you have version 2.53 you can use the vizcam module to create a camera that orbits around a specified location. Here is a sample script using the vizcam module that creates 4 waypoints and cycles through them.
Code:
import viz
viz.go()

viz.add('tut_ground.wrl')
logo = viz.add('logo.wrl')
logo.translate(0,1,0)
viz.clearcolor(viz.SKYBLUE)

import vizcam
cam = vizcam.PivotAnimate()
cam.setPivot(0,1,0)
cam.setAutoMode(0)

CAM_SPEED = 2

locations = [ [0,1,-5] , [3,0.5,0] , [0,1.5,4], [-2,0.1,0] ]

cam.curLocation = 0
cam.gotoPosition(locations[0],CAM_SPEED)

def endcam(e):
	cam.curLocation = (cam.curLocation+1) % len(locations)
	cam.gotoPosition(locations[cam.curLocation],CAM_SPEED)
viz.callback(vizcam.END_PIVOTCAM_EVENT,endcam)
Let me know if you need more information on any of these methods.
Reply With Quote
Reply


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


All times are GMT -7. The time now is 05:31 AM.


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