WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 12-07-2006, 10:18 AM
Gladsomebeast Gladsomebeast is offline
Member
 
Join Date: Mar 2005
Location: Isla Vizta, CA
Posts: 397
Interesting idea to have the view look at a preceding model. A quick and dirty way to get some additional smoothing.

Of course, a smoother view can certenly be acheaved by tweeking the control points. When the view is jumpy, increase the time difference between the two points. If you want to keep the same time between points, you could also add a few more control points in the problem area.

Bellow is a simple script which has the setup for an animation path that a view could use.

Code:
import viz
viz.go()

viz.add('court.ive')

path = viz.add(viz.ANIMATION_PATH)

#Initialize an array of control points
positions = [ [0,1.8,-3], [-3,1.6,1], [3,1,-0.1], [0,0.3,0] ]

for x in range(0,len(positions)):
	#Add a ball at each control point and make it
	#semi-transparent, so the user can see where the
	#control points are
	b = viz.add('ball.wrl')
	b.setPosition(positions[x])
	b.alpha(0.2)
	#Add the control point to the animation path
	#at the new time
	cp = viz.add(viz.CONTROL_POINT)
	cp.setPosition(positions[x])
	path.add(cp,x*5 + 5)

path.translatemode(viz.CUBIC_BEZIER)
path.loop(viz.CIRCULAR)
path.computetangents()
path.autorotate(viz.ON)
path.play()

view = viz.addView()
view.eyeheight(0)
viz.link(path,view)

viz.MainWindow.viewpoint( view )
__________________
Paul Elliott
WorldViz LLC
Reply With Quote
  #2  
Old 12-10-2006, 03:13 PM
k_iwan k_iwan is offline
Member
 
Join Date: May 2006
Posts: 115
Talking Smooth!!!

Nice!!! this one is somewhat smoother then our "look-at-the-quad/polygon" trick, I will try this one with more control points
Thank you for your explanation.

-e1-
Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

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 03:09 AM.


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