Results 1 to 9 of 9

Thread: Perspective Texture Mapping

  1. #1

    Thread Starter
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221

    Talking Perspective Texture Mapping

    Since I'm developing Doom++ in parallell with DoomSharp, I've decided to lend a hand with the nastiest part of it all.. perspective correct rendering

    I'm working on a tutorial that will be available at http://www.abo.fi/~ksugii/ptm.html quite soon..

    Until then I'm going to post a very revealing little artwork I made a while ago trying to figure out the magic numbers:



    Have fun
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  2. #2
    type Woss is new Grumpy; wossname's Avatar
    Join Date
    Aug 2002
    Location
    #!/bin/bash
    Posts
    5,682

    Re: Perspective Texture Mapping

    What are P1, P2 and O, texels?

    Given your penchant for flying over everyones heads with postgraduate incomprehensibles, why not use a few lay terms for us mere mortals eh?

  3. #3

    Thread Starter
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221

    Re: Perspective Texture Mapping

    Check out my tutorial, it goes trough things much more in detail. It's still in the process of being updated again however.
    P1 and P2 happen to be two corners in my triangle in this case, given in 3d space. They are not in the tutorial however which only deals with the texture map so far.
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  4. #4

    Thread Starter
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221

    Re: Perspective Texture Mapping

    Tutorial updated again, almost done now. I would appreciate some feedback though, if there are things that are still unclear, post and I'll update.
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  5. #5
    type Woss is new Grumpy; wossname's Avatar
    Join Date
    Aug 2002
    Location
    #!/bin/bash
    Posts
    5,682

    Re: Perspective Texture Mapping

    Some of the illustrations are a little hard to follow, mainly the ones where you are demonstrating how 3d points pass through the 2d screen towards the eye.
    I don't live here any more.

  6. #6
    type Woss is new Grumpy; wossname's Avatar
    Join Date
    Aug 2002
    Location
    #!/bin/bash
    Posts
    5,682

    Re: Perspective Texture Mapping

    How about giving some code that detects concavity of polygons?
    I don't live here any more.

  7. #7

    Thread Starter
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221

    Re: Perspective Texture Mapping

    Quote Originally Posted by wossname
    Some of the illustrations are a little hard to follow, mainly the ones where you are demonstrating how 3d points pass through the 2d screen towards the eye.
    Eek! And here I thought my illustrations were top class
    There are 5 3d-2d-eye ones, so could you specify more which seems to not make any sense?

    How about giving some code that detects concavity of polygons?
    Ok, that's a great idea, thanks.
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  8. #8
    type Woss is new Grumpy; wossname's Avatar
    Join Date
    Aug 2002
    Location
    #!/bin/bash
    Posts
    5,682

    Re: Perspective Texture Mapping

    The images where you show the frustrum as a yellow area with black lines from the eye to the corners of the screen. The black lines are a bit confusing that's all. Maybe use gray lines instead, or at least make the line that goes to the furthes corner gray so you can tell its in the background.
    I don't live here any more.

  9. #9

    Thread Starter
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221

    Re: Perspective Texture Mapping

    Quote Originally Posted by wossname
    How about giving some code that detects concavity of polygons?
    I almost forgot this, I did post a link in the appendix under convexity to detect it (if its not convex then its concave)
    http://debian.fmi.uni-sofia.bg/%7Ese.../clockwise.htm

    Quote Originally Posted by wossname
    The images where you show the frustrum as a yellow area with black lines from the eye to the corners of the screen. The black lines are a bit confusing that's all. Maybe use gray lines instead, or at least make the line that goes to the furthes corner gray so you can tell its in the background.
    Done.. although not much of a difference.
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

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