Skip to main content
gamedev.net
🔒 Locked

terrain texturing/transitions optimizations

Started by pasman Sep 10, 2003 at 6:08 PM 1 replies 350+ views
Original Post
pasman
pasman
hi, i''m still working on my terrain engine and i''ve got it running and everything (no LOD) and it''s tile based...meaning i have a texture id for each quad.i know it doesn''t work v good but since it''s a first/3rd person view i don''t have to draw too many polys. But each tile has a different texture so i needed to do a nice transition between them...and i did so but it''s my first atempt...it works corectly just that it''s kinda slow...i mean in the worst case i render each tile 9 times...cuz for each tile i check all the neighbours and if it is a different texture i render a new quad over it,blended,with coresponding vertex alpha values. And also for each tile i render actually 4 quads(from triangle strips) so i can have a little thiner overlayed transition (only a quarter of the tile). anyway....my qustion is...what other tehniques give me the same result (using tiles) and how can i speed up (beside multitexturing of course which is soon to be implemented and maybe vertex arrays). would LOD algos make much difference? i render around 4000 quads for the terrain (when no transition). on my Athlon 750 with GeForce4 MX440 64M i get from around 110FPS(no transitions) to 35(with transitions), but this is the worse case when tiles are randomly placed.In the actual game there won''t be so many transitions needed. Any suggestions are highly appreciated. Thank you.
Rasmadrak
Rasmadrak
I´m working on that to, but what you´re doing doesnt seem right..

Simply make transition tiles - black and white alpha masks of various transitions (depends on how many different you want).

Then you code some algorithm that checks it´s neighboring tiles and then chooses the appropriate transition - and draw the lowest priority tile (texture) first, then the masked higher priority tile (texture)...


-

Maybe I missunderstood you, but wouldn´t transitions between two textures work? since I got the idea you want to do nine texture transitions...

Here´s a link for some more info and some reference mask-tiles:
<link> http://www.gamedev.net/reference/articles/article934.asp

Hope it helped!

/Robert



"Game Maker For Life, probably never professional thou." =)

[edited by - Rasmadrak on September 10, 2003 8:14:55 PM]
"Game Maker For Life, probably never professional thou." =)
Digitalfragment
Digitalfragment
If you start using Binary Triangle Trees for your rendering, what you are doing to create your transitions is impossible. Think about pre-creating all of your possible textures for each tile - dont do your transitions each frame, because that is a waste of your GPU processing abilities. If your GeForce 4 runs it at 30 clicks, what will my Riva TNT2 do it at? (Not that a GF4MX is much better though, go for a GF4 Ti4600)

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.