WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 11-15-2007, 07:53 PM
cade_mccall cade_mccall is offline
Member
 
Join Date: Sep 2004
Posts: 61
transform deprecation problem

I have a module that works in Vizard 2.5 but doesn't work in Vizard 3.0.

Originally, the module used <transform>.mult and <transform>.fullMult. Because 3.0 doesn't have <transform>.mult, I changed that to <transform>.postMult (I was guessing there). The script still works in 2.5 when I do that so it seems like it's the right substitute, but it still doesn't work properly in 3.0.

Also, when I try running it in 3.0, I get a deprecation warning about fullMult, but even when I replace fullMult with postMult (the suggested substitute), the program still fails to work. Any ideas?

Let me know if you want me to send the files.

Thanks,
Cade
Reply With Quote
  #2  
Old 11-16-2007, 10:38 AM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
Can you post a simple example that produces different results between 2.5 and 3.0?
Reply With Quote
  #3  
Old 11-16-2007, 12:07 PM
cade_mccall cade_mccall is offline
Member
 
Join Date: Sep 2004
Posts: 61
The code below prints out different values in the different versions. It also prints out different values if I use postMult instead of fullMult.

import vizmat
t = viz.Transform()
t.set( 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15)
f = viz.Transform()
f.set(.5, 0.0, 0.0, 0.0,0.0,.8, 0.0,0.0,0.0,0.0,.5,1.0,0.0,0.0,-.5, 0.0 )
t.fullMult( f )

print t.getRot()
print t.getTrans()
print f.getRot()
print f.getTrans()
Reply With Quote
  #4  
Old 11-16-2007, 12:53 PM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
Do you have a more practical example that uses reasonable values for the matrix. Performing multiplications with actual rotation matrices seems to work for me.
Reply With Quote
  #5  
Old 11-16-2007, 01:07 PM
cade_mccall cade_mccall is offline
Member
 
Join Date: Sep 2004
Posts: 61
import vizmat

t = viz.Transform()
t.makeEuler(90,0,0)
print t.getRot()
Reply With Quote
  #6  
Old 11-16-2007, 01:49 PM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
Thanks, that gives different results for me too. The results from 2.5 are incorrect. A lot of the code for the vizmat library was rewritten in 3.0 and many bugs were fixed. If you are noticing different behavior, it is most likely caused by bugs in 2.5. If your old code was depending on the incorrect behavior then there is not much you can do other than fix it for 3.0
Reply With Quote
  #7  
Old 11-16-2007, 02:49 PM
cade_mccall cade_mccall is offline
Member
 
Join Date: Sep 2004
Posts: 61
Ahhh. Okay. My module works with the old Vizard because the author of the module hacked fixes for at least one bug. I know he switched the sign of the z-coordinate when using setTrans. When I undo that tweak things look better. I'm still having a problem with rotations, though. From his notes, I think he may have tweaked stuff to fix the fact that setEuler() used to apply roll then pitch then yaw. Does setEuler work differently now (does it apply yaw then pitch then roll)? Or are there other major fixes regarding rotations?
Reply With Quote
  #8  
Old 11-16-2007, 02:59 PM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
The order of eulers with vizmat should be consistent that the euler order of node objects, which is yaw, pitch, then roll. If you tell me more precisely what the code is trying to do I can provide more help.
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
5DT Data Glove 5 Ultra Problem bjgold Vizard 1 08-08-2006 04:08 PM
problem with female animations vmonkey Vizard 1 10-07-2005 10:36 AM
sound problem alaa Vizard 7 09-02-2005 01:13 PM
freeze problem shai Vizard 10 12-01-2004 11:53 AM
PROBLEM: Picture-in-Picture breaks textures?!? vcarlson Vizard 4 10-05-2004 04:22 PM


All times are GMT -7. The time now is 06:20 AM.


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