http://GameProgrammer.Com

Programming

GP Mailing List
     Thread Index
     Date Index

ATXGPSIG List
     Thread Index
     Date Index

Google
>

Home

Wise2Food



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: DOOM style rendering - Need help




*** Hello,

>   This is a question of what tricks did they use with the data to provide
> the necessary information. I do not have a complete edge list to use a
> generic affine texture mapper, and doing a ray casting style engine is a
>bit difficult with the data present. Since they obviously have a way of
doing
> it, I am obviously missing something. I am asking those persons who have
> gotten one to work to give me an idea of what I may be missing.

*** yea, raycasting isn't really what Doom used, so that's out of the
question. What do you mean you dont have a complete edge list to feed
to an affine mapper? I am assuming that for some reason when you are
scanning a quad ( ie floor/ceiling with 4 sides; not 2 triagles ), and
storing
the vector instances, and the list is incomplete??? Well, I would suggest
doing something as such:
                                    A __________________ B
                                     /
\
                                   /           typical quad            \
                                  /     of arbitrary dimensions    \
                                /    ( shown as projected           \
                               /   and prepped for rasterizer )     \
                              /
\
                            D___________________________C
1.Interpolate the view space coordinates of each segment AB,BC, CD,DA.

2. Map texture coordinates to each vertex.

3. Interpolate the 2d texture space coordinates in the number of steps == to
the change in values between corresponding, destination quad's segment's
lenght.

4. Feed the buffers created in step 3 to a *perspective correct* mapper.
Else you get the warping artifacts inherient with affine mappers ( which was
one
of Dooms claim to fame ).

    Now that I think about it, you can omitt step one.... Hope this helps.
Refer to Comp graph princ/pract is you dont know you to write a pc t-mapper.
Orrrr you can just  use OpenGL or DX and get accomplished in like 2 lines
of code ( at least in OGL )... I dunno, I still have a thing for software
rendering...

    Josiah


=================================================================
The GameProgrammer.Com mailing list is for the open discussion
of any topic related to the art, science, and business of
programming games. This list is especially tolerant of beginners.
We were all beginners once

To SUBSCRIBE or UNSUBSCRIBE please visit:
http://gameprogrammer.com/mailinglist.html