Triangles vs Blocks

Started by
3 comments, last by SuperVGA 12 years, 10 months ago
Well, for my indie team's game, we are going to need a level that you can dig down in and that is randomly generated. We have considered very small block particles that are almost impossible to notice and then a regular terrain that is just one layer but copied and repeated downwards.

Technique 1 (Blocks):
[color="#333333"][font="arial, helvetica, clean, sans-serif"] ?[/font][color="#333333"][font="arial, helvetica, clean, sans-serif"] ?[/font][color="#333333"][font="arial, helvetica, clean, sans-serif"] ?[/font][color="#333333"][font="arial, helvetica, clean, sans-serif"] ?[/font][color="#333333"][font="arial, helvetica, clean, sans-serif"] ?[/font][color="#333333"][font="arial, helvetica, clean, sans-serif"] ?[/font][color="#333333"][font="arial, helvetica, clean, sans-serif"] ?[/font][color="#333333"][font="arial, helvetica, clean, sans-serif"] ?[/font][color="#333333"][font="arial, helvetica, clean, sans-serif"] ?[/font][color="#333333"][font="arial, helvetica, clean, sans-serif"] ?[/font][color="#333333"][font="arial, helvetica, clean, sans-serif"] ?[/font]
[color="#333333"][font="arial, helvetica, clean, sans-serif"] ?[/font][color="#333333"][font="arial, helvetica, clean, sans-serif"] ?[/font][color="#333333"][font="arial, helvetica, clean, sans-serif"] ?[/font][color="#333333"][font="arial, helvetica, clean, sans-serif"] ?[/font][color="#333333"][font="arial, helvetica, clean, sans-serif"] ?[/font][color="#333333"][font="arial, helvetica, clean, sans-serif"] ?[/font][color="#333333"][font="arial, helvetica, clean, sans-serif"] ?[/font][color="#333333"][font="arial, helvetica, clean, sans-serif"] ?[/font][color="#333333"][font="arial, helvetica, clean, sans-serif"] ?[/font][color="#333333"][font="arial, helvetica, clean, sans-serif"] ?[/font][color="#333333"][font="arial, helvetica, clean, sans-serif"] ?[/font]
[color="#333333"][font="arial, helvetica, clean, sans-serif"] ?[/font][color="#333333"][font="arial, helvetica, clean, sans-serif"] ?[/font][color="#333333"][font="arial, helvetica, clean, sans-serif"] ?[/font][color="#333333"][font="arial, helvetica, clean, sans-serif"] ?[/font][color="#333333"][font="arial, helvetica, clean, sans-serif"] ?[/font][color="#333333"][font="arial, helvetica, clean, sans-serif"] ?[/font][color="#333333"][font="arial, helvetica, clean, sans-serif"] ?[/font][color="#333333"][font="arial, helvetica, clean, sans-serif"] ?[/font][color="#333333"][font="arial, helvetica, clean, sans-serif"] ?[/font][color="#333333"][font="arial, helvetica, clean, sans-serif"] ?[/font][color="#333333"][font="arial, helvetica, clean, sans-serif"] ?[/font][color="#333333"][font="arial, helvetica, clean, sans-serif"] [/font]
[color="#333333"][font="arial, helvetica, clean, sans-serif"] [/font]
[color="#333333"][font="arial, helvetica, clean, sans-serif"]Technique 2 (terrain vbo repeated)[/font]
[font="arial, helvetica, clean, sans-serif"][color="#333333"]---------------------------------[/font]
[font="arial, helvetica, clean, sans-serif"][color="#333333"]---------------------------------[/font]
[font="arial, helvetica, clean, sans-serif"][color="#333333"]---------------------------------[/font]
[font="arial, helvetica, clean, sans-serif"] [/font]
[font="arial, helvetica, clean, sans-serif"][color="#333333"]Both of those characters are supposed to be closer together but I think you get my point. I think that the blocks idea is going to require more verts and culling could be harder, but with the terrain idea, the terrain would have to be made of many small triangles (about the same size as the blocks).[/font]
[font="arial, helvetica, clean, sans-serif"] [/font]
[font="arial, helvetica, clean, sans-serif"][color="#333333"]So I was wondering, what would be more efficient for digging and later building, triangles or blocks?[/font]
[font="arial, helvetica, clean, sans-serif"] [/font]
[font="arial, helvetica, clean, sans-serif"][color="#333333"]PS: Display lists or VBOs for rendering this?[/font]
Advertisement
If possible, you could make the terrain out of a single layer of triangles and when you dig, it removes triangles inside the dug area, and covers the surface of the digging shape with triangles if its on the "in ground" side.

That would propably be hard to make and you have to calculate the colors of the triangles based on some other data...


I think this would work the best if you want very precise digging, but if you make the ground out of billions of cells, it might be easier to do. (though it might lag more)

o3o


If possible, you could make the terrain out of a single layer of triangles and when you dig, it removes triangles inside the dug area, and covers the surface of the digging shape with triangles if its on the "in ground" side.

That would propably be hard to make and you have to calculate the colors of the triangles based on some other data...


I think this would work the best if you want very precise digging, but if you make the ground out of billions of cells, it might be easier to do. (though it might lag more)


Ya I know that is the predicament I am in. I am thinking it will be easier to use blocks, but then only render them if they are the "top" layer. So in some areas the top layer goes down if you dig. Hmm, I am not sure about this though. Any other ideas other than these two or for these two?
You would only render blocks wich are connected to a transparent (so they are not completely hidden by other blocks)

o3o

Sounds like you want to be using Marching Cubes, or maybe even marching tetrahedons?
If you like a more rough but higher-res terrain without caring if the player can precisely shape the terrain, i recommend it. If you need an Infiniminer sort of behaviour, it will cost you more polys, obviously, but it might look nicer at lower resolutions.

This topic is closed to new replies.

Advertisement