Trees and leaves

Blitz3D Forums/Blitz3D Programming/Trees and leaves

The Forum Archive is locked. These are the original blitzbasic.com forums, kept so their posts can still be read and searched. No new topics, replies or edits can be made here. To join the conversation, head over to the Blitz3D+ forums.

In my experience using the tform commands to rotate the individual quads is almost twice as fast as using sin/cos etc... You may get some speed up using Lookups for sin/cos but very little on modern hardware.



You are correct, the slowdown over 2000 leaves (4,000 polys, 8,000 verts) is only about 4-5 ms on my machine using Tform (which I can live with). Whereas doing a sin,cos operation (just to rotate the verts around a center point) slows the operation down 30-45 ms.

Tform is the way I am going.


I found look up tables were slightly slower. I agree with the tform commands being faster too.


My findings are the same, lookup tables are a bit slower because you still have to do a lot of calculating after you get the sin/cos lookup to rotate the verts and such. Tform converts it into the mesh's local coord, and my merely move the vert to where it should be (so 1 tform, and an XYZ addition to each vertex).