#### Archived

This topic is now archived and is closed to further replies.

# billboarding problem

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

## Recommended Posts

Hi, Has anyone had problems with billboarding, namely with the fact that the billboarded face starts to "wrap" or "break" under certain angles if something else besides itself (and other billboarded faces) is drawn into the scene (as if one of the triangles in the quad is drawn under a right angle to the other one, leaving only 1 triangle visible)... This is giving me quite a headache. Maybe it''s my billboarding code which I wrote with the help of the GameTutorials article:

TGLMatrix ModelViewMatrix;
glGetFloatv(GL_MODELVIEW_MATRIX, ModelViewMatrix);

TVector3f Right = TVector3f(ModelViewMatrix[0], ModelViewMatrix[4], ModelViewMatrix[8]);
TVector3f Up = TVector3f(ModelViewMatrix[1], ModelViewMatrix[5], ModelViewMatrix[9]);

TVector3f v1 = Position + ((-Right - Up) * Magnitude * 8);
TVector3f v2 = Position + ((Right - Up) * Magnitude * 8);
TVector3f v3 = Position + ((Right + Up) * Magnitude * 8);
TVector3f v4 = Position + ((-Right + Up) * Magnitude * 8);

though it seems to work all by itself... And another question: the above code only allows billboarding of quads. What if I need to deal with random polygons? Can anyone give me directions where to look as Google seems to be scarce on billboarding info as it is. Thanks, Crispy

1. 1
Rutin
25
2. 2
3. 3
4. 4
5. 5

• 10
• 13
• 19
• 14
• 9
• ### Forum Statistics

• Total Topics
632943
• Total Posts
3009352
• ### Who's Online (See full list)

There are no registered users currently online

×