WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 01-28-2010, 12:34 PM
Josh Josh is offline
Member
 
Join Date: Jan 2010
Posts: 63
Problems creating a mirror

Hi all

I'm trying to create a mirror. I use the example script from http://kb.worldviz.com/articles/243 but I have problems to adapt it to my needs.

I wanted to use my own world (created in 3DSMax), but the script does horrible things to my world!

If anyone would download the stuff and test it for me and maybe correct it, I would be very happy.

http://rapidshare.com/files/342545625/Mirror.zip

The script has the addMirror() function commented out (the last line in the script); uncomment it to see what happens.

Thank you very much for help, I need this for my bachelor assignment.
Josh
Reply With Quote
  #2  
Old 01-28-2010, 12:49 PM
Josh Josh is offline
Member
 
Join Date: Jan 2010
Posts: 63
So far I got it to work using the following code:

Code:
mirrorsurface = viz.addTexQuad()
mirrorsurface.scale(.3,.25,.6)
mirrorsurface.setPosition(0,1.8,1.2)
mirrorsurfacerotation = [0,0,0] #rotation around the Z,Y,X axes #changed from [90,0,0]
mirrorsurface.rotate(mirrorsurfacerotation)
m = viz.Matrix()
m.setPosition(mirrorsurface.getPosition(viz.ABS_GLOBAL))
m.setEuler(mirrorsurfacerotation[0]-180,-mirrorsurfacerotation[1], mirrorsurfacerotation[2]) #Z,X,Y
addMirror(mirrorsurface,m)
But I'd like the mirror to be on the red textured block of the world itself... How could I achieve this?
Reply With Quote
  #3  
Old 01-28-2010, 01:21 PM
Josh Josh is offline
Member
 
Join Date: Jan 2010
Posts: 63
Hrm, it seems I can't edit or delete my own posts here?

Sad, because I proceeded with my work, solved some problems, and got another one... So I'm just attaching it here in a reply to myself.

Now I figured out how to add the mirror. But at the moment the avatar itself is not being displayed in the mirror! Why not?

http://rapidshare.com/files/342564961/Mirror.zip

Thanks a lot for help
Josh
Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem using mirror dan12345 Vizard 3 07-28-2008 05:48 AM
Strange bug concerning a mirror Frank Verberne Vizard 2 05-15-2008 06:09 AM
Eyes that keep looking at the mirror Frank Verberne Vizard 3 05-13-2008 06:39 AM
Mirror issues Frank Verberne Vizard 2 04-08-2008 11:37 AM
Getting a mirror to work in any environment Frank Verberne Vizard 5 03-27-2008 09:21 AM


All times are GMT -7. The time now is 04:39 PM.


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