Jump to content
  • Advertisement
Sign in to follow this  
gxsh

Something wrong in Quake 3 map rendering

This topic is 4263 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

These Days I am working at Quake3 Map Rendering. When I enable visBitData Check ,some faces disappear improperly. That is: A face is just in front of the camera ,but disappears.The count of the strange faces is about 2% of total. There is no other visibility check ,such as BoundingBoxCheck.Just only the visData in .bsp file. typedef struct { int nVecCount ; // Number of vectors. int vecSize ; // Size of each vector, in bytes. unsigned char* vecs ; // Visibility data. // One bit per cluster per vector. }VisData; VisData *m_pVisData; bool CQuakeMap::CheckVisDependOnBitInfo( int from ,int to) { unsigned char* pTemp = m_pVisData->vecs ; int order = from * m_pVisData->vecSize ; pTemp += order ; int colum = to / 8 ; pTemp += colum ; int bitPos = to % 8 ; unsigned char cmp = 1 << bitPos ; if( *pTemp & cmp ) return true ; return false ; } Could any experienced friend give me a clew? Thanks!

Share this post


Link to post
Share on other sites
Advertisement
I found the answer.
The faceIndex in the Face Struct is not the index in the face lump,but the ones in the leaf_face lump.I took the wrong indices.

Share this post


Link to post
Share on other sites
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!