Jump to content
  • Advertisement
Sign in to follow this  
maya18222

Help with Quake Bezier Patches

This topic is 3054 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Ive trying to read in a quake 3 BSP file. And have successfully managed to get most of it working. Im currently stuck with the mesh patches bit. According to this they should be used as 3x3 bezier patches. So when reading a 5x5 patch im supposed to treat it as 4 3x3's. 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 which would then be .. 01 02 03 | 03 04 05 06 07 08 | 08 09 10 11 12 13 | 13 14 15 -------------------- 11 12 13 | 13 14 15 16 17 18 | 18 19 20 21 22 23 | 23 24 25 But Im not sure how this is going to work. If i treat them separatly like that, when putting them back togeather the curves arent going to flow. Am I supposed to be calculating the patch as a whole instead? Im not sure how to do that. Ive only coded 3x3 and 4x4 patches, as the tutorials I found only told you how to code Quadratic and Cubic Bezier's. From wikipedia, they mention using the Bernstein polynomial to calulate a bezier with any number of control points, using :- How do I code that? Edit : Shortly after posting this, I think I misunderstood the link. When they said treat it as a 3x3, I take it they meant figure out which 3x3 the point in question is enclosed in, in the 5x5, and just compute the point in said 3x3. [Edited by - maya18222 on February 11, 2010 8:46:30 AM]

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!