Obli
04-08-2003, 12:50 PM
All right, this should probably be posted in the advanced forum but even if it is flooded by msgs, I feel those should be left to ppl who's really in business with the GL. I am not so I try to post as less as possible there.
The point of this message is to get some impressions about vertex programs when used for keyframe interpolation. We all know that, computing new frames in GPU is fast. Probably faster than doing it in CPU I think, even if I cannot be sure (still to experiment with that).
Now, the problem is that VPs are a one-way only. You put data in (say, pos0, pos1, weight) and you get nothing. Well, you get something but you don't know what, since the calcolations are done in the GPU. I heard about a future render_to_vertex_array thing that may solve this problem but let's go on.
Now, say I want to do collision detection on a model which is interpolated on GPU. The only way to do this really accurately is to re-blend the frame in CPU. Since it will happen a lot of time, the vertex program is almost useless in this case - computing in CPU and then updating should be faster. Of curse, I could just do the CD on the keyframes only but it would not be such accurate. I am referring to a per-triangle collision detection. Quite sure UT2k3 has it.
This kind of problem is very bad in case of accurate CD but still applies to other things.
Another example: simple shiluette determination. Computing a triangle normal and finding if the normal is facing to the camera or not. In some cases, the interpolated triangle may NOT be facing the camera. This is not really important since shadow volumes are not really important to interactivity, they just make the image better.
However, the keyframe interpolation thing worries me. I would like to hear what other people have to say about this.
Thank you in advance.
The point of this message is to get some impressions about vertex programs when used for keyframe interpolation. We all know that, computing new frames in GPU is fast. Probably faster than doing it in CPU I think, even if I cannot be sure (still to experiment with that).
Now, the problem is that VPs are a one-way only. You put data in (say, pos0, pos1, weight) and you get nothing. Well, you get something but you don't know what, since the calcolations are done in the GPU. I heard about a future render_to_vertex_array thing that may solve this problem but let's go on.
Now, say I want to do collision detection on a model which is interpolated on GPU. The only way to do this really accurately is to re-blend the frame in CPU. Since it will happen a lot of time, the vertex program is almost useless in this case - computing in CPU and then updating should be faster. Of curse, I could just do the CD on the keyframes only but it would not be such accurate. I am referring to a per-triangle collision detection. Quite sure UT2k3 has it.
This kind of problem is very bad in case of accurate CD but still applies to other things.
Another example: simple shiluette determination. Computing a triangle normal and finding if the normal is facing to the camera or not. In some cases, the interpolated triangle may NOT be facing the camera. This is not really important since shadow volumes are not really important to interactivity, they just make the image better.
However, the keyframe interpolation thing worries me. I would like to hear what other people have to say about this.
Thank you in advance.