WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Vizard (https://forum.worldviz.com/forumdisplay.php?f=17)
-   -   Mirror only works when close up (https://forum.worldviz.com/showthread.php?t=3722)

hxphan 04-25-2011 12:43 AM

Mirror only works when close up
 
Hello,

I am trying to add a mirror in a new world. I used the provided code for the "addMirror" function, then I used the following to create the mirror and position it in the desired location:

#Adds a textquad to the scene
mirror = viz.addTexQuad()

#set position
mirror.setPosition(3,3,-2)
mirror.setEuler(0,0,0)

#specify the matrix
m = viz.Matrix()
m.setPosition(mirror.getPosition(viz.ABS_GLOBAL))
m.setEuler(180,0,0)


#Apply mirror settings to mirror object
addMirror(mirror,m)

The problem is that the mirror only reflects when the view is about 1 meter from it. Any distance that is further will make the mirror transparent, and all I can see is what's behind the mirror. Do you know what may be the reason for this?

Jeff 04-25-2011 02:15 PM

Does this just happen when you load your own model or also if you use the gallery or court scene?
Code:

court = viz.add('court.ive')
Which version of the code are you using?

hxphan 04-26-2011 07:00 PM

This is the mirror_R3 version, not the stereo one. It works fine in the art gallery scene, but I run into this problem when I am using it in my lab's created model. I have not made any alterations to the mirror code.

Jeff 04-29-2011 12:00 PM

Can you attach the model or upload it here?


All times are GMT -7. The time now is 03:54 PM.

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