Jump to content

  • Log In with Google      Sign In   
  • Create Account

RetroIP

Member Since 12 Jan 2012
Offline Last Active Oct 17 2014 02:35 PM

#4956017 LOD Terrain - Indices management

Posted by RetroIP on 05 July 2012 - 10:28 AM

Samoth:Yes, they are same, I just wanted to illustrate same vertice position for Chunk 1 and Chunk2 , I also wrote:

So, for example Vertices ABCD will be discarded because I already have E,G,I,K on that position.

Thank you, this looks better than my approach of handling stitches (Edge grid was created in every Chunk to adapt to neighbour's Chunk . You are right, interpolation was not enough to "hide" very small gaps. OK but this is not main point now.

Martin: I think I got it what do you want to say. For me is important "ordering indices" as you wrote, how is this done.

I'm trying to know simple thing, I understand that my explanations are not clear.
OK, another pic:
lod_illu2.jpg

So what was made by me:
We have Chunk1 and Chunk 2 with it's own VB and IB. When I was preparing main VB and IB, which will be swapped later on with VB and IB for drawing, was:

Fill VB with Chunk's 1 VB and fill IB with Chunk's 1 IB.
Results: VB: A,B,C,D IB: 0,3,2,0,1,3 (ADC,ABD)

Fill VB with Chunk's 2 VB
Results: VB: A,B,C,D,C,D,F,G,H,I,J,K IB: 0,3,2,0,1,3

Fill IB with Chunk's 2 IB + SHIFT INDEX (starting number will be Count of current VB vertices), so:
Results: VB: A0,B1,C2,D3,C4,D5,F6,G7,H8,I9,J10,K11 IB: 0,3,2 (ADC) ,0,1,3 (ABD) , 0+4=4;3+4,=7;2+4=6 (CGF) 0+4,1+4,3+4 ==4,5,7 (CDG) 1+4,4+4,3+4==5,8,7 (DHG)

Yes I can draw this, but in LOD level 4-5 I can have >20 same vertices per chunk. In overall I had around 8x more vertices then current Terrain renderer.

And NOW:
I hope you can see what I'm pointing at.
I have vertice C twice in VB. If I want to remove doubled vertice C on index position 4 (C4) in VB, I need to edit Indice 4 at index position 6 of IB, and set it to 2 (from ib[6]=4 to ib[6]=2), and SHIFT all other indices. This is too complicated process when currently in average I'm rendering 66000 Vertices with 130000 Indices with not my terrain engine (as I linked on my first post).
My approach is not good and I think it is too complicated. There are not so many really working LOD terrains, with available source codes.

Martin: If I keep all Vertices for deepest level, I think it will be too much.

So question,
What is optimal approach to fight with this issue, how it is done in your terrain renderers ? Posted Image
I think I can't compute all indices if I have VB because, there is some order which I dont know (different, LOD per Chunk, different count of primitives)

My data:
Terrain is sized to 8192x8192 units, visibility is to aprox. 3000 units, LOD level max 12

Screens shows my requirements but not my renderer:
show1.jpg
show2.jpg
This is maximum terrain detail, you can compare it to character.

Or I'm missing some knowledge regarding VB,IB, ordering, drawing.

Many thanks for your attention


PARTNERS