PDA

View Full Version : Avatar in the mirror


Lenticularis
06-12-2017, 09:59 AM
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:

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! :)