WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Vizard (https://forum.worldviz.com/forumdisplay.php?f=17)
-   -   Avatar in the mirror (https://forum.worldviz.com/showthread.php?t=6026)

Lenticularis 06-12-2017 09:59 AM

Avatar in the mirror
 
There's an example script called "renderNodePlanarReflection.py" in Vizard which creates a mirror and an avatar that is reflected in the mirror and is linked to the viewpoint.
However, this only works with the special "Steve" avatar. How do I do this with the standard avatars (e.g. vcc_female.cfg)?

I want users to experience having an avatar body that they can see only in the mirror. Any ideas?

Jeff 06-13-2017 09:45 PM

Try adding the following code. Use WASD to move the avatar:

Code:

import vizcam
keyTracker = vizcam.addKeyboard6DOF()

avatar = viz.addAvatar('vcc_female.cfg')
avatar.state(2)
# illuminate the avatar
avatar.emissive([8]*3)
avatar.renderToAllRenderNodes(excludeMainPass=True)

link = viz.link(keyTracker,avatar)
viewLink = viz.link(avatar,viz.MainView)
viewLink.preTrans([0,1.6,0])


Lenticularis 06-19-2017 08:53 AM

Works! Thanks! :)


All times are GMT -7. The time now is 07:32 PM.

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