WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 03-26-2003, 02:02 PM
david david is offline
Member
 
Join Date: Mar 2003
Posts: 23
viz.noprojection()

Hi,

Andy Beall tried to implement a new function for the project I am working on but it does not work and he is currently away. I thought maybe you could help me with it. Basically you will find attached the files he sent me and following is the email he sent along. However the new function viz.noprojection is not working since, as soon as an object is loaded, it is viewed correctly, when it should not.

David

Here's the updated version of winviz and viz.py
You'll need to use these to replace their existing counterparts in the
/vizard folder (in the /vizard/bin and /vizard folders, respectively).


There's a new viz command called viz.noprojection(). Calling that
toggles between locking the GL_PROJECTION matrix as the identity or the
standard perspective camera. Applying the command pretty much
obliterates the rendering for now until you figure out how to combine
the PROJECTION and MODELVIEW together.


There's a script called matrices.py in the /vizard/tutorial folder that
shows how to use transform object and the update() command to replace
the MODELVIEW matrix with an arbitrary 4x4 matrix.


Since I haven't actually tried updating with a combined PROJECTION and
MODELVIEW myself, I'd suggest doing a few real simple examples (maybe
see GL Redbook) to just verify that the overall theory does indeed work.
If you're having trouble, then either we are off on how to go about this
or there's something wrong with what I've done. Anyway, let me know
before you spend too much time thrashing.


Andy-
Attached Files
File Type: zip viz.zip (119.8 KB, 2853 views)
Reply With Quote
  #2  
Old 03-26-2003, 04:34 PM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
Hi David,

Andy never told me about this, so I'm not sure exactly how this is supposed to work, but I went ahead and played around with it a little. Here's the new 'winviz.exe' file. Place it in the Vizard/bin directory. Please get back to me once you've tried it out so that I know it worked.

Good luck!

-- farshid
Attached Files
File Type: zip winviz.zip (102.3 KB, 2674 views)
Reply With Quote
  #3  
Old 03-27-2003, 10:10 AM
david david is offline
Member
 
Join Date: Mar 2003
Posts: 23
Thumbs up

thanks Farshid,

It seems not to be working, which is a good start ;o) I have to do some more testing though to check that everything is going as expected and I'll keep you informed.

David
Reply With Quote
  #4  
Old 03-27-2003, 05:50 PM
david david is offline
Member
 
Join Date: Mar 2003
Posts: 23
Well after a few test I am more and more puzzled. What Andy told me was that the noprojection() method would disable the perspective projection matrix by setting it to the identity. So I called the method and tried to update the viewing matrix by :
1- creating the matrix R generated by the OGL code glfrustrum(l,r,b,t,n,f). I found its expression in the red OGL book (appendix F of second edition) This is the perspective matrix that should have been set to the identity with viz.noprojection()
2- updating objects and/or main view point with R hoping that I will get the same result as when I just load the objects without the command noprojection()

But with none of these cases I get what I expect... Which brings those questions:

Where exactly is the viewing matrix hidden? Is it really what I am updating when I say <child>.update(matrix) or <viewpoint>.update(matrix)?
Is the perspective matrix right before the view matrix in the order of matrices multiplications?
Is the matrix in the red book correct and if yes, is it consistent with what viz uses?
Did I miss an important point?

Thanks a lot for trying to answer those questions

David
Reply With Quote
Reply


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


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


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