Roam terrain and triangle strips...
Are there any docs out there about using triangle strips(or fans,etc.) to render roam terrains.I have a roam terrain renderer but it uses triangles to output data and as I understand strips are much better(and not that hard to implement).I''m sure that if I got so far I should be able to figure this out myself but I''m also sure there is a better/more efficient way.Thanx in advance for any help...
-=Jimmy=-
-=Jimmy=-
Actually with the today''s and future hardware the ROAM renderer isn''t all that good. It might be faster to send all triangles to the card, or at least use a much simpler algorithm for LOD to free up CPU resources.
In any case, converting the triangles that the ROAM algorithm produces to triangle strips isn''t all that easy, since they are not nicely ordered (due to LOD), you will spend more time arranging the triangles into strips than you save. And stay away from triangle fans at all costs. With triangle fans you can only render a few triangle with each call to the API, where as the typical call should contain hundreds and even thousands of triangles for best performance.
My suggestion to you is to ignore triangle strips for dynamic geometry (like LOD) and only use it on static geometry. By using indexed triangle lists you get almost the same performance as with triangle strips. It''s not worth trying to build triangle strips in realtime.
- WitchLord
In any case, converting the triangles that the ROAM algorithm produces to triangle strips isn''t all that easy, since they are not nicely ordered (due to LOD), you will spend more time arranging the triangles into strips than you save. And stay away from triangle fans at all costs. With triangle fans you can only render a few triangle with each call to the API, where as the typical call should contain hundreds and even thousands of triangles for best performance.
My suggestion to you is to ignore triangle strips for dynamic geometry (like LOD) and only use it on static geometry. By using indexed triangle lists you get almost the same performance as with triangle strips. It''s not worth trying to build triangle strips in realtime.
- WitchLord
AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game
You''re propably right about ROAM terrains,but I''m not using the axct ROAM algorithm but an alternative introduced by (the late)Seumas McNally wich is a lot better for real time apps.For more info check out a paper on ROAM in gamasutra.On that paper On the paper there''s something about using fansas well but it isn''t enough...
-=Jimmy=-
-=Jimmy=-
-=Jimmy=-
Seumas used a split-only version of ROAM and, iirc, used tri fans. IMO, tri strips require a bit more (coding) work than tri fans. With fans, you can get a max of 8 triangles and an average of ~4 tris per fan *(~50% efficiency). Strips can obviously get more than that. For fans, the trick is to generate the tri fan when you traverse down the bin-tri tree as you figure out which tris to render. There are a few tests you must do before you attach a tri to a fan.
Regarding docs: I have not seen any that specifically relate to generating strips or fans in ROAM.
* Edited: I said ~5 tris/fan -> should be ~4. I was thinking 50% efficiency -> 5 , duh. Sorry about that.
Edited by - _shawge on November 27, 2000 8:15:00 PM
Edited by - _shawge on November 27, 2000 8:22:16 PM
Regarding docs: I have not seen any that specifically relate to generating strips or fans in ROAM.
* Edited: I said ~5 tris/fan -> should be ~4. I was thinking 50% efficiency -> 5 , duh. Sorry about that.
Edited by - _shawge on November 27, 2000 8:15:00 PM
Edited by - _shawge on November 27, 2000 8:22:16 PM
5 tris pre fan?Seumas got only an average of 3.5tris.Anyway,I just got my fan renderer working but w/o a test to find the best center vertex.The result is that I mostly get 1 tri/fan( sometimes but rarely 2-4tris) so I get an average fps of 12 instead of 38(with the simple rendering code).So my question is:how do I find out which the best center vertex is?And will I get a fps rating greater than 38 if I get a bigger average of tris/fan(like 3.5,which means does the lack of best-vertex test justify the big performance loss)?
-=Jimmy=-
-=Jimmy=-
-=Jimmy=-
You need a test for best vertex. Fans with 1 tri/fan is the same as drawing the single tri (3 vertices) and is not very efficient. The big gain is seen when drawing 2+ tris per fan but you probably knew that.
12 fps is not good. You should at least be seeing the same fps as the all triangle method if not better. How many tris do you have in your pool? What are your machine specs?
12 fps is not good. You should at least be seeing the same fps as the all triangle method if not better. How many tris do you have in your pool? What are your machine specs?
I have a PIII/600 with a G400MAX but these specs should me somewhat misleading since I''m using linux and the drivers aren''t very optimized.I have a map size of 512 divided into 64 patches of 500 tris per patch(max).
I know 12 fps isn''t that good and I know that the low tri/fan is(mainly) responsible.And the lack of best-vertex test is in turn responsible for the low fans/tri.So what test do I use to choose the best vertex?
-=Jimmy=-
I know 12 fps isn''t that good and I know that the low tri/fan is(mainly) responsible.And the lack of best-vertex test is in turn responsible for the low fans/tri.So what test do I use to choose the best vertex?
-=Jimmy=-
-=Jimmy=-
I have a PIII/600 with a G400MAX but these specs should me somewhat misleading since I''m using linux and the drivers aren''t very optimized.I have a map size of 512 divided into 64 patches of 500 tris per patch(max).
I know 12 fps isn''t that good and I know that the low tri/fan is(mainly) responsible.And the lack of best-vertex test is in turn responsible for the low fans/tri.So what test do I use to choose the best vertex?
-=Jimmy=-
I know 12 fps isn''t that good and I know that the low tri/fan is(mainly) responsible.And the lack of best-vertex test is in turn responsible for the low fans/tri.So what test do I use to choose the best vertex?
-=Jimmy=-
-=Jimmy=-
Post some pseudo-code of your rendering routine and we''ll go over it. I''ll post the same when I get home from work.
Witchlord might be right. Brute-Force T&L on GF2 cards is so fucking fast, it blows away every clever algorithm running on another card ;-) Your main problem is to reduce the AGP bus traffic. Even if you can render a million triangles /s you won''t get them over the bus. But using triangle strips is no the best approach. They are for reducing the bus performance. But they have to recalculated. Maybe you could put everything in vertex arrays so the geometry can be stored on the board and the driver can optimize itself. Then you also limit the CPU usage, your AGP usage is low and the algorithm should be fairly simple... Guess this is the best aproach for T&L HW...
Tim--------------------------glvelocity.gamedev.netwww.gamedev.net/hosted/glvelocity
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement