Orientated billboards in particle sys

Started by
1 comment, last by VanKurt 20 years, 8 months ago
Hi there! At the moment my billboards are just quads that face the viewer. That is OK if you use textures with spheres (Balls, Glowythings etc.) on them for the particles. But if you have different textures (e.g. with an arrow on it) that looks stupid because all the arrows point into the same direction. It would be much better if the billboard was rotated in a way that it points into the direction that it is moving to. I hope you can understand what I mean... ;-) But I don''t know how to do that because you would have to rotate the quad not around one of the normal axes (XYZ), but an axis that goes from the viewer to the center of the quad...... Anyone knows how to do that?? Thanks!!!
Advertisement
Here''s an image illustrating what I mean:

if you already have them facing the viewer, then i dont see which part is giving you the trouble. just dont even think about "rotating" them in a "lets call glrotate"-way. you know the direction for two vectors. one towards the "camera" and one towards the point. lets call them "forward" and "up". the crossproduct will give a value "right" and another crossproduct between forward and right will give a new valid "up". plug those three and the position into the particles transformation matrix and that should be it.
f@dzhttp://festini.device-zero.de

This topic is closed to new replies.

Advertisement