Search found 100 matches
- Jun 15, 2009 17:59
- Forum: Game Dev
- Topic: Perspective Correct Texture Mapping?
- Replies: 1
- Views: 2139
I figured it out. I have to interpolate the U and V with respect to z with respect to y on the outside also. In other words (U/Z)/Y and (V/Z)/Y. Here's the code: Type Vect3D x As Single y As Single z As Single End Type Type Vect2D x As Single y As Single End Type Type Poly3D p1 As Vect3D p2 As Vect3...
- Jun 14, 2009 1:34
- Forum: Game Dev
- Topic: Perspective Correct Texture Mapping?
- Replies: 1
- Views: 2139
Perspective Correct Texture Mapping?
I looked up how to do this recently, and I tried to implement this method http://www.gamedev.net/reference/articles/article331.asp with Rel's Affine Texture Mapper. It draws as if it was Affine. =/ Help please? The main subroutine that the problem is in is PolyFillTexPerspective. Honestly, I know it...
- May 24, 2009 13:07
- Forum: Game Dev
- Topic: Raycaster screws up?
- Replies: 0
- Views: 1843
Raycaster screws up?
I have been mostly successful at writing a raycaster, yet if you try this and move around a bit (using the wasd keys), you notice that the walls become screwy at some places due to a screwed up distance, I think. But really, I'm not sure what to attribute this to. 'Rhyno's Raycaster '© 2009 by Ryan ...
- Feb 13, 2009 17:11
- Forum: Game Dev
- Topic: Raycaster doesn't work?
- Replies: 1
- Views: 1947
Raycaster doesn't work?
I was using F. Permadi's raycasting tutorial as a guide for one, and for some reason my raycaster likes to hang up at certain points and crash. I was figuring it was anywhere there's a divide by zero, and so I tried to set it up so that it didn't happen anywhere. Also, I get a reversed-fisheye effec...
- Feb 03, 2009 2:48
- Forum: Game Dev
- Topic: Projection Matrix camera center?
- Replies: 7
- Views: 4782
- Feb 02, 2009 0:46
- Forum: Game Dev
- Topic: Resurrecting old game engine
- Replies: 4
- Views: 2575
- Feb 01, 2009 23:51
- Forum: Game Dev
- Topic: Projection Matrix camera center?
- Replies: 7
- Views: 4782
Maybe you're right...The whole reason I was switching anyways is because of a routine I made that I was going to use for staying above a certain level of ground on a map (say, 10 units up). For some reason, it doesn't like any of the values I give it... Here's the code for both 2-D and 3-D. It's pre...
- Feb 01, 2009 22:52
- Forum: Game Dev
- Topic: Projection Matrix camera center?
- Replies: 7
- Views: 4782
- Feb 01, 2009 22:41
- Forum: Game Dev
- Topic: Projection Matrix camera center?
- Replies: 7
- Views: 4782
When you multiply your world-space object vectors <x,y,z,w> by that matrix, you can then just divide <x, y> by the w coordinate, and you'll have your 2D projection! If you transform the world-space coordinates by the projection matrix, then your camera (or eye) is at (0,0,0). You are missing a key ...
- Jan 31, 2009 22:39
- Forum: Game Dev
- Topic: Projection Matrix camera center?
- Replies: 7
- Views: 4782
Projection Matrix camera center?
I was looking at the math articles (in particular, the Matrix articles) on GameDev.net, and I ran across a rather nice PDF file which explained 3d-graphics concepts (vectors, matrices, transformations, object space, world space, & camera space) rather well. The guy even had a rather simplified p...
- Jan 31, 2009 18:17
- Forum: Game Dev
- Topic: gluPerspective style matrix?
- Replies: 3
- Views: 2411
I've got it working, thanks to an explanation from this article: http://www.cs.kuleuven.ac.be/cwis/research/graphics/INFOTEC/viewing-in-3d/viewing-engels.html However, the Frustum matrix doesn't work well at all. The Perspective one works perfectly though (albeit I can't figure out where the camera ...
- Jan 31, 2009 8:00
- Forum: Game Dev
- Topic: gluPerspective style matrix?
- Replies: 3
- Views: 2411
Hey all, I realized I had rows-columns reversed, and so I switched them out. Now I can do stuff directly... however I still can't divide by z without screwing up. Oh, and I added a glFrustum style matrix function. Technically, the way it's set up it acts like an orthographic projection because the Z...
- Jan 30, 2009 16:22
- Forum: Game Dev
- Topic: gluPerspective style matrix?
- Replies: 3
- Views: 2411
- Jan 30, 2009 16:21
- Forum: Game Dev
- Topic: gluPerspective style matrix?
- Replies: 3
- Views: 2411
gluPerspective style matrix?
I went here: http://www.opengl.org/sdk/docs/man/xhtml/gluPerspective.xml And I saw that they had the specification for the matrix itself that they made, so I went ahead and coded it in one of my own routines. After that, I tried multiplying my model matrix by it and then dividing the result by the z...
- Jan 28, 2009 0:36
- Forum: General
- Topic: Creating a compiler in FreeBASIC?
- Replies: 6
- Views: 2244
Creating a compiler in FreeBASIC?
I was contemplating at one time creating a small-language compiler in FreeBASIC for Windows. However, what kind of exe format does Windows use, and from what I've seen towards the end of executables (viewed in a hex editor), there's a whole list of functions... how's all that tie together?