Converting Object Space to Word Space?
by Eric Hartman · in Torque Game Engine · 07/29/2005 (11:22 pm) · 3 replies
Not sure if this is the best place to post this but here goes:
For my game, Blockland, I need to render tons of quad-based bricks really fast. The way I'm doing this right now is each brick adds its quads to a vertex array in world-space and then at the end of the frame, the entire vertex array is rendered. This works well and goes pretty fast.
The trouble is that I can't really rotate the bricks at odd angles because the points have to go into the vertex array as world-space coordinates. Is there any way to efficiently transform the points and normals of each quad into worldspace so that I put them all into a single vertex array?
Now, it's not absolutely necessary that I get this working because for all practical purposes, the bricks never rotate off 90 degree increments. But it would be nice to have them rotate for some special effects purposes.
For my game, Blockland, I need to render tons of quad-based bricks really fast. The way I'm doing this right now is each brick adds its quads to a vertex array in world-space and then at the end of the frame, the entire vertex array is rendered. This works well and goes pretty fast.
The trouble is that I can't really rotate the bricks at odd angles because the points have to go into the vertex array as world-space coordinates. Is there any way to efficiently transform the points and normals of each quad into worldspace so that I put them all into a single vertex array?
Now, it's not absolutely necessary that I get this working because for all practical purposes, the bricks never rotate off 90 degree increments. But it would be nice to have them rotate for some special effects purposes.
About the author
Associate Alex Scarborough