[gameprogrammer] Re: perspective correction

I'm not at home right now to check, but I think my older copy of Java 
Game Programming For Dummies actually walks you through the process of 
rendering perspective-correct polygons and adding textures to them.  It 
may not be true 3D, however.  And just now it occurs to me that some of 
the techniques I remember from it may not translate well into 3D.  But 
if you're not doing any slopes or anything, it would work.

Another idea is to replicate what LucasArts did with Dark Forces -- you 
make the textures work only on the vertical/horizontal 
wall/ceiling/floor geometry, and for other 3D geometry, only apply 
lighting and color.  Nifty.

I bet this is mostly useless to you in this case, however, so you 
should write a tutorial and post it on the wiki when you figure it all 
out!  (3D rendering on mobile devices!!)

Good luck!
--Scott

On 07 Apr, 2005, at 1:11 PM, Bob Pendleton wrote:

> On Thu, 2005-04-07 at 16:26 +0300, Szasz Pal wrote:
>> Hi!
>> I'm working on some simple 3d engine for symbian phones.
>> I made a very simple method to draw a textured triangle, however it's
>> ugly due to the need of perspective correction.
>>
>> What is the best way to implement it?
>>
>> I think in the old days I read that quake implemented perspective
>> correction only for the n-th pixel. That means that when rendering a
>> scan line from the triangle it recalculated the texture coordinates at
>> every n-th pixel, and for teh rest it interpollated?
>
> That works pretty well. You compute the perspective correct coordinates
> for the first pixel and the nth pixel and then interpolate between the
> two points. 'tis best to compute the correct texture coordinates for 
> the
> first and last points on the scan line and for some set of points in
> between.
>
> OTOH, depending on the phone, the number of tris and so on you might
> want to just do perspective correct rendering all the time. If you are
> doing something like an interior walk around kind of game you might 
> just
> want to use some of the tricks from the original DOOM.
>
>               Bob Pendleton
>
>>
>> Thanks in advance for the info!
>>
> -- 
> +--------------------------------------+
> + Bob Pendleton: writer and programmer +
> + email: Bob@xxxxxxxxxxxxx             +
> + web: www.GameProgrammer.com          +
> + www.Wise2Food.com                    +
> + nutrient info on 6,000+ common foods +
> +--------------------------------------+
>
>
>
> ---------------------
> To unsubscribe go to http://gameprogrammer.com/mailinglist.html
>
>



---------------------
To unsubscribe go to http://gameprogrammer.com/mailinglist.html


Other related posts: