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 :D
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:
http://www.abo.fi/~ksugii/Images/magic.GIF
Have fun :afrog:
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?
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.
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.
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.
Re: Perspective Texture Mapping
How about giving some code that detects concavity of polygons?
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 :o
There are 5 3d-2d-eye ones, so could you specify more which seems to not make any sense?
Quote:
How about giving some code that detects concavity of polygons?
Ok, that's a great idea, thanks.
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.
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.