|
-
Oct 8th, 2005, 05:09 AM
#1
Thread Starter
transcendental analytic
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.
-
Oct 8th, 2005, 03:59 PM
#2
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?
-
Oct 8th, 2005, 04:05 PM
#3
Thread Starter
transcendental analytic
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.
-
Oct 9th, 2005, 10:18 PM
#4
Thread Starter
transcendental analytic
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.
-
Oct 10th, 2005, 03:03 AM
#5
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.
-
Oct 10th, 2005, 03:07 AM
#6
Re: Perspective Texture Mapping
How about giving some code that detects concavity of polygons?
I don't live here any more.
-
Oct 10th, 2005, 03:24 AM
#7
Thread Starter
transcendental analytic
Re: Perspective Texture Mapping
 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.
-
Oct 10th, 2005, 03:48 AM
#8
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.
-
Oct 10th, 2005, 07:57 AM
#9
Thread Starter
transcendental analytic
Re: Perspective Texture Mapping
 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
 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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|