WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Vizard (https://forum.worldviz.com/forumdisplay.php?f=17)
-   -   Creating Realistic Turns in Vizard using walkTo (https://forum.worldviz.com/showthread.php?t=4965)

mikeb 02-27-2014 07:57 PM

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 .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

Jeff 02-28-2014 05:51 AM

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


All times are GMT -7. The time now is 02:03 AM.

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