WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 02-27-2014, 07:57 PM
mikeb mikeb is offline
Member
 
Join Date: Jan 2014
Posts: 2
Creating Realistic Turns in Vizard using walkTo

I'm working on a project where Vizard is being is being used to visualize various everyday walking scenarios.

A camera is linked to an avatar which is being set through these scenarios.

Initially a path was created for the avatar to follow, however the avatar and camera glitch out when turning the corner. Additionally creating a path seems to have issues with climbing non-level terrain such as slopes.

As a result <vizact>.walkTo was implemented which so far has been working perfectly for slopes. The issue with using walkTo seems to be it's difficult to simulate turns using this command.

Is there a method for creating turns using walkTo that doesn't look choppy and creates a relatively clean curve? If not is there a better way to simulate a curve in Vizard?

Currently our code looks like this for the turn
Code:
b = range(1,91,10)

print(b)
def right_turn_fcn(initX,initZ,radius):
    theta=float(0)
    for theta in ((b)):
        print theta
        Z_new=initZ+(radius*math.cos(theta/(180.0)*(3.14)))-radius

        X_new=initX+(radius*math.sin(theta/(180.0)*(3.14)))
        print(X_new,Z_new)
        avatar.addAction(vizact.walkTo([X_new,ground,Z_new],walkSpeed=speed,turnSpeed = (theta*speed/(2*radius*math.sin(theta/(2.0))))))
right_turn_fcn(-27,17.5,5)

We have tried playing with the parameter turnSpeed, but so far have not been able to achieve a smooth looking curve. Any direction would be greatly appreciated for mimicking a smooth turn.

Thanks,
Mike
Reply With Quote
  #2  
Old 02-28-2014, 05:51 AM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,471
Try linking the avatar to an animation path. If you are using 3ds Max, you can quickly create complex paths that are exported with the model:

http://docs.worldviz.com/vizard5/#ma...tion_paths.htm

You can also create animation paths in Vizard by specifying a series of points:

http://docs.worldviz.com/vizard5/#Animation_paths.htm
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Creating a Vizard Sensor Plugin farshizzo Plug-in development 25 08-01-2019 12:24 AM
Realistic Light and Shadows Using Vizard and 3DS Max jde Vizard 4 07-13-2012 10:58 AM
Vizard 4 Beta Testing farshizzo Announcements 0 02-01-2011 10:46 AM
Vizard 4 Beta Testing farshizzo Vizard 0 02-01-2011 10:46 AM
Vizard tech tip: Using the Python Imaging Library (PIL) Jeff Vizard 0 03-23-2009 11:13 AM


All times are GMT -7. The time now is 06:00 AM.


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