Results 1 to 6 of 6

Thread: [RESOLVED] World to screen coordinates. [Left handed coord]

  1. #1

    Thread Starter
    Retired G&G Mod NoteMe's Avatar
    Join Date
    Oct 2002
    Location
    @ Opera Software
    Posts
    10,190

    Resolved [RESOLVED] World to screen coordinates. [Left handed coord]

    Grrrr...first time I actualy need this, then I have forgotten my book back in Norway..hmm...well I need to transform world coordinates to screen coordinates. So if I am not wrong, this will have to go through eye coordinates:

    World -> Eye/Camera -> Screen

    I think I remember how to transform from Eye to Screen now, but I can't remember exactly how to go from World to Eye. Any help here?

    If I am not wrong, it is something like:
    Eye-coordinates = Camera-Matrix * World-Coordinate

    But how does the world matrix look like then? I guess it is a 4*4matrix, and 3 of the rows/colums are LookAt-vector, Up-vector, and something else (cross product of the two?). but in what order are they? Is it something like this?
    ---------------------------
    - View Reference Point (VRP)
    - View Plane Normal (VPN)
    - View Up (VUP)
    ---------------------------
    Matrix:
    Code:
    VUP*VPN    0 
       VUP     0
       VPN     0
    0  0   0   1

    or are they ordered in colums or is it an other order of them. Any shed of light on this would be nice.. Even a link to a tutorial that goes through it step by step with an example would proably help me at this point..

    Thanks
    - ØØ -
    Last edited by NoteMe; Aug 3rd, 2005 at 04:41 AM.

  2. #2
    Addicted Member Rassis's Avatar
    Join Date
    Jun 2004
    Location
    Lisbon
    Posts
    248

    Re: World to screen coordinates. [Left handed coord]

    I am not sure if this link to an article entitled "World to Screen Projection Transformation" will be of any help. Nevertheless, it seemed to me so. It includes the source code.

    http://astronomy.swin.edu.au/~pbourk...ion/transform/

    Good luck
    Last edited by Rassis; Aug 3rd, 2005 at 03:16 PM.
    ...este projecto dos Deuses que os homens teimam em arruinar...

  3. #3

    Thread Starter
    Retired G&G Mod NoteMe's Avatar
    Join Date
    Oct 2002
    Location
    @ Opera Software
    Posts
    10,190

    Re: World to screen coordinates. [Left handed coord]

    i all ready saw that page..but they never explained the math behind it, so it is hard to test if it really works as it should. Since I have to port the code to an other language anyway. But thanks for the link. I might use it as a last resort...


    - ØØ -

  4. #4
    Addicted Member Rassis's Avatar
    Join Date
    Jun 2004
    Location
    Lisbon
    Posts
    248

    Re: World to screen coordinates. [Left handed coord]

    And what about this?
    http://www.cs.fredonia.edu/~barneva/...t462/lect8.ppt
    and this? http://www.newtek.com/products/light...icles/w2s.html
    I am sorry if I didn’t succeed in helping you to solve your problem.
    Last edited by Rassis; Aug 3rd, 2005 at 04:55 PM.
    ...este projecto dos Deuses que os homens teimam em arruinar...

  5. #5

    Thread Starter
    Retired G&G Mod NoteMe's Avatar
    Join Date
    Oct 2002
    Location
    @ Opera Software
    Posts
    10,190

    Re: World to screen coordinates. [Left handed coord]

    Thanks, yeah the second one was helping a bit. Even if it doesn't explain it all. But I think I am geting closer. But I hate that they are not even telling what kind of coordinate system they are using. I think this is right handed...but not 100% sure...


    - ØØ -

  6. #6

    Thread Starter
    Retired G&G Mod NoteMe's Avatar
    Join Date
    Oct 2002
    Location
    @ Opera Software
    Posts
    10,190

    Re: [RESOLVED] World to screen coordinates. [Left handed coord]

    I managed to fix it in the end...and yes it is beautifull...


    - ØØ -

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width