Quake 3 BSP files
I have succesfully loaded all the correct lumps required to render a map into the required structures. Quake 3 maps contain many types of geometry (Patchs,Polygons,etc) How would I approach renering the file. I only want the geometry for the time been, lightmaps and other stuff don''t matter for the time been.
Can I ignore face data with patchs and only render poylgons?
Thanks alot for the help
~Steve~
IIRC patchs hold the info for curved surfaces thus if u ignore them theres gonna be holes unless the level has no curves
http://members.xoom.com/myBollux
http://members.xoom.com/myBollux
to basiccly render it, i just looped through all the faces(rather than going through the leafs) and drew em. if you need any sample code just ask :]
i could never get it working with the leaf structures, (it just missed bits out, maybe they were the curved bits) but been a bit busy lately to go any further
__________________
graham "red" reeves.
red@deadpenguin.org
www.deadpenguin.org
i could never get it working with the leaf structures, (it just missed bits out, maybe they were the curved bits) but been a bit busy lately to go any further
__________________
graham "red" reeves.
red@deadpenguin.org
www.deadpenguin.org
__________________graham "red" reeves.[email=red@deadpenguin.org]red@deadpenguin.org[/email]www.deadpenguin.org
You can render polygones and Bezier patch in the same way.
There are only few patches in standard quake3 map, and patches are described by their control points, so in that case you will render the control points.
The only problem will be with the connexion of your vertices. A simple way to have right polygone, is to consider that you have a triangle fan:
you take the first row of control points and the last raw of control points and you have a rectangle which "cut" the original curve, but it's not too important for your needs.
You have the patch "control points" size MxN, so you know the points of the first raw which are the M first vertices, et the last raw: the M last vertices of the MxN raw. And with a triangle fans you don't have to bother with the indexing.
Cedric.
Edited by - Cedric Perthuis on July 20, 2001 12:09:03 PM
There are only few patches in standard quake3 map, and patches are described by their control points, so in that case you will render the control points.
The only problem will be with the connexion of your vertices. A simple way to have right polygone, is to consider that you have a triangle fan:
you take the first row of control points and the last raw of control points and you have a rectangle which "cut" the original curve, but it's not too important for your needs.
You have the patch "control points" size MxN, so you know the points of the first raw which are the M first vertices, et the last raw: the M last vertices of the MxN raw. And with a triangle fans you don't have to bother with the indexing.
Cedric.
Edited by - Cedric Perthuis on July 20, 2001 12:09:03 PM
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement