WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Vizard (https://forum.worldviz.com/forumdisplay.php?f=17)
-   -   viewing issue. (https://forum.worldviz.com/showthread.php?t=547)

cantwelljm 03-25-2006 12:27 PM

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

farshizzo 03-27-2006 12:14 PM

Hi,

By "orbit" do you mean following a pre-determined path or do you want to control the orbit at runtime?

cantwelljm 03-29-2006 06:42 AM

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.

farshizzo 03-29-2006 12:03 PM

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.


All times are GMT -7. The time now is 08:10 AM.

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