Hello Community !,
I'v spent many hours regarding terrain, tested many approaches from my side,but I stopped on one and last thing - Indices/Vertices optimization.
So, currently I'm using BiLOD XNA 4.0 LOD Terrain sample by Rene7705.
In my approach, I'v successfully reached stiching, and other required things, but I did not understand or I did not find proper material for Indices/Vertices optimization. Let me explain:
I need to remove duplicated Vertices and prepare indices for buffer.
Can you advice me some methods how can I remove duplicated vertices and use proper order for indices ? This proces is important for me, because when I'm transfering Vertices and indices into the Vertex/Index buffer, it saves me a lot (Yes, I'm using background thread to redetail terrain according current camera position).
Maybe picture will explain it better:
I have vertices from part 1 of the terrain, and vertices from part 2.
It is no problem to build Vertex and Index buffer for part 1 and Part 2 separately.
When I want to merge this parts into the one buffer to final buffer which is drawed, I can see...not seems, but I can see that I have 2 vertices on same place it is side effect of my DUPLICATED VERTICES.
How can I remove, well, remove is easy , but how can I then properly calculate Indices for this Vertices for Part 1 and part 2 ?
So, for example Vertices ABCD will be discarded because I already have E,G,I,K on that position.
Vertices F H J are correctly stitched (height is interpolated between both sides vertices)
I hope, I'm clear.
Many thanks for your responses.
RetroIPMember Since 12 Jan 2012
Offline Last Active Today, 02:45 AM
am I ? Yes, I'm technical person who likes exploring mechanisms and creating them. [Wife,Programming,GameDesign,Snowboarding,Hiking,Music Composing]
- Group Members
- Active Posts 6
- Profile Views 2,486
- Submitted Links 0
- Member Title Member
- Age 31 years old
- Birthday July 28, 1983
- Website URL http://retron.sk