Hi guys
I accidentally learned an interesting method of creating a game like Minecraft
For optimization, the game does not draw each individual cube, but combines blocks of cubes (chunks) 16 * 16 * 16 cubes into separate 3D models.
So when you add a new cube to the world, you don't add a new 3D model, you just move the chunk's polygons.
I hope that the Google translator correctly translated my opinion.
MY QUESTION - is it possible to use such technology in GIDEROS? Is it possible to move individual polygons and combine them into 3d objects?
I saw the following technique in this guide:
Comments
Fragmenter - animated loop machine and IKONOMIKON - the memory game
I just did not work with 3d in gideros, I know that it can add ready-made 3D objects. But I don't know if it is possible not to add objects and to create in the middle of gideros.
https://play.google.com/store/apps/developer?id=razorback456
мій блог по гідерос https://simartinfo.blogspot.com
Слава Україні!
Fragmenter - animated loop machine and IKONOMIKON - the memory game
Unfortunatelly the link to the zip file is broken. I have it on my computer for you to explore, how can I send it to you?
excerpt:
ok zip files are working againnope zip files don't work on the forum
https://play.google.com/store/apps/developer?id=razorback456
мій блог по гідерос https://simartinfo.blogspot.com
Слава Україні!
The first problem is the removal of invisible polygons.
And with each renewal of the world we spend a lot of resources
The second problem is the inability to create an LOD, because a cube is the simplest form
The system with chunks works very well because if the chunk is a separate 3D model, instead of 4096 cubes you can display 1 cube on the chunks farthest from the player. And change the LOD to another as the player approaches them..
On "cgpeers" there are full lessons, if you are interested to see
https://www.minecraftforum.net/forums/minecraft-java-edition/suggestions/2996005-dynamic-lod-more-chunks-at-a-lower-price
https://play.google.com/store/apps/developer?id=razorback456
мій блог по гідерос https://simartinfo.blogspot.com
Слава Україні!
I think it could even be done in the vertex shader, by a clever use of instancing.
Btw, I plan to implement back face culling in Gideros for meshes.
Likes: MoKaLux, oleg, SinisterSoft
If you combine the cubes into one mesh(chunk)- then inside there will be internal faces - which need to be dynamically removed or waited when the chunk changes.
It's just translation difficulties between different languages
Rejection of back faces - it is not always necessary, for example on a grass and leaves on trees - faces do not need to be rejected. -I think it will be possible to choose?
https://play.google.com/store/apps/developer?id=razorback456
мій блог по гідерос https://simartinfo.blogspot.com
Слава Україні!
Likes: oleg
LODs don't have to be constantly generated, I think they should be stored on disk when the world is generated, and then just read from disk
Only the "chunk" in which the player is located will change dynamically. And the other 1728 "chunks" (meshes) just have to be loaded from the hard drive.
https://play.google.com/store/apps/developer?id=razorback456
мій блог по гідерос https://simartinfo.blogspot.com
Слава Україні!
The vertex shader could also compute the distance of the mesh from the view point, and decide to reduce LOD dynamically by merging cubes together on the fly and culling unused ones (by making degenerate triangles).
Likes: oleg
Since the world consists of cubic chunks and their ordinal numbering - the distance to the objects for LOD does not need to be calculated. Just the chunk number where the player is +3 = LOD1 +3 = LOD2 + 3 = lod3 + 3 = lod4
That is 12 chunks from itself - the player will see LOD 4 - where there will be only 1 cube instead of 4096 cubes. And 3 chunks from himself the player will see LOD1 - where there will be 512 cubes instead of 4096.
I rejected the idea of generating an LOD on the fly - it will be costly if the tailor moves around the world, the world will not have time to generate.
Although you led me to think that you can do the opposite -generate first a low-polygonal world LOD4, and then randomly divide each cube into 4 cubes. But it will be necessary to think of some system that the same cubes were always divided in the same way
https://play.google.com/store/apps/developer?id=razorback456
мій блог по гідерос https://simartinfo.blogspot.com
Слава Україні!
That would give you what you describe - a single mesh with all the exposed faces of all the cubes, or at least the ones in a given region. You could do variable LOD in that too, having the code reduce the number of polygons for very distant chunks of cubes, like having one polygon represent a plane or near-constant slope of cubes. Again, non-trivial in any system, but the biggest challenge might be developing or finding the algorithm to simplify the mesh. But it's perfectly feasible in Gideros.
Likes: oleg
https://play.google.com/store/apps/developer?id=razorback456
мій блог по гідерос https://simartinfo.blogspot.com
Слава Україні!
I was thinking of trying to optimally reduce the mesh without changing the shape, so if you have a plane, say a layer of 2x2 cubes laying horizontally, you could discard the vertexes where they meet in the middle to have a single surface each for the tops and bottoms of all four. You could also drop the vertexes in the middle of each edge. But removing any vertexes would break the textures, unless you only did that where you could repeat each texture (twice in that example) across the combined surface. It might not be worth making it that sophisticated just to save some polygons. You'd have to do that sort of thing if you were going to simplify the mesh for low LOD, though.
Ooh, but if you did... Suppose you had a chunk of cubes that basically make up a steady slope - 10 wide, 1 high at the first row, 2 high at the second, etc up to 10. You have over 500 cubes, but only a couple hundred exposed, and roughly 1,000 vertexes. For low LOD you could simplify that mesh down to a simple wedge shape with only 6 vertexes. Then to preserve the texture you could build the mesh in full detail, draw that to a render target, once for each side of it that corresponds to a face of the LOD version. Then on the simplified mesh you could use those rendered images as the textures for each face.
In the case of a chunk you can represent reasonably well with a cube or wedge, that would be pretty straightforward and would give you very simple meshes that represent lots of cubes quite nicely at a distance. Doing that more generally (for less simple chunk shapes) would get more complicated, but it could be done.
For LOD - it is not necessary to do it. The task is to see a beautiful landscape from afar -and accuracy is not required at all. Because approaching will load the exact model instead of LOD
1 generated game level - weighs about a gigabyte on the hard drive - if you generate unique textures - then no media will have enough space for this file size.
Also together with LOD, mipmaping will be used for texture - therefore the texture needs to be left by tiles
The farthest LODs will be completely textured and filled with vertex color.
https://play.google.com/store/apps/developer?id=razorback456
мій блог по гідерос https://simartinfo.blogspot.com
Слава Україні!