#1
|
|||
|
|||
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 |
#2
|
|||
|
|||
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 |
Thread Tools | |
Display Modes | Rate This Thread |
|
|
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 |