mirror of
https://github.com/Relintai/voxelman.git
synced 2025-04-15 21:06:06 +02:00
More improvements to the readme.
This commit is contained in:
parent
6c656963ba
commit
5bfd8812c7
16
README.md
16
README.md
@ -49,6 +49,8 @@ For example lod level 5 will try to get material index 5, but if you only have 3
|
|||||||
The simplest library, just assign a material with a texture, and using the atlas_rows and atlas_culomns properties to tell the system
|
The simplest library, just assign a material with a texture, and using the atlas_rows and atlas_culomns properties to tell the system
|
||||||
how the UVs should be divided.
|
how the UVs should be divided.
|
||||||
|
|
||||||
|
This is the basic Minecraft-style lib rary. Use this if you just have one texture atlas.
|
||||||
|
|
||||||
### VoxelLibraryMerger
|
### VoxelLibraryMerger
|
||||||
|
|
||||||
You will only have this if your godot also contains https://github.com/Relintai/texture_packer
|
You will only have this if your godot also contains https://github.com/Relintai/texture_packer
|
||||||
@ -80,7 +82,7 @@ The most basic world. It is the Minecraft-style world.
|
|||||||
|
|
||||||
### VoxelWorldMarchingCubes
|
### VoxelWorldMarchingCubes
|
||||||
|
|
||||||
A marching cubes based Voxel World. Actually it uses a modified version of the Transvoxel tables. It is UV mapped.
|
A marching cubes based Voxel World. Actually it uses a modified version of the Transvoxel tables, because it is UV mapped.
|
||||||
|
|
||||||
### VoxelWorldCubic
|
### VoxelWorldCubic
|
||||||
|
|
||||||
@ -100,12 +102,12 @@ You can write your own algorithm by implementing the ``` void _generate_chunk(ch
|
|||||||
|
|
||||||
Producing just a terrain mesh for a chunk is not that hard by itself. However when you start adding layers/features
|
Producing just a terrain mesh for a chunk is not that hard by itself. However when you start adding layers/features
|
||||||
like lod generation, collision meshes (especially since manipulating the physics server is not threadsafe),
|
like lod generation, collision meshes (especially since manipulating the physics server is not threadsafe),
|
||||||
vertex volumetric lights, props, snapping props, props with vertex lights, etc
|
vertex lights, props, snapping props, props with vertex lights, etc
|
||||||
chunk mesh generation can quicly become a serious mess.
|
chunk mesh generation can quicly become a serious mess.
|
||||||
|
|
||||||
VoxelJobs are meant to solve the issue with this complexity.
|
VoxelJobs are meant to solve the issue with less complexity.
|
||||||
|
|
||||||
They also provide a way to easily modularize mesh generation.
|
They also provide a way to easily modularize mesh and lod generation.
|
||||||
|
|
||||||
### VoxelJob
|
### VoxelJob
|
||||||
|
|
||||||
@ -157,6 +159,10 @@ This is done by `setup_chunk(shunk)` in `VoxelWorld`.
|
|||||||
# Setup a blocky (minecratf like) mesher job
|
# Setup a blocky (minecratf like) mesher job
|
||||||
var tj : VoxelTerrainJob = VoxelTerrainJob.new()
|
var tj : VoxelTerrainJob = VoxelTerrainJob.new()
|
||||||
|
|
||||||
|
var s : VoxelMesherJobStep = VoxelMesherJobStep.new()
|
||||||
|
s.job_type = VoxelMesherJobStep.TYPE_NORMAL
|
||||||
|
tj.add_jobs_step(s)
|
||||||
|
|
||||||
tj.add_mesher(VoxelMesherBlocky.new())
|
tj.add_mesher(VoxelMesherBlocky.new())
|
||||||
tj.add_liquid_mesher(VoxelMesherLiquidBlocky.new())
|
tj.add_liquid_mesher(VoxelMesherLiquidBlocky.new())
|
||||||
|
|
||||||
@ -167,6 +173,8 @@ This is done by `setup_chunk(shunk)` in `VoxelWorld`.
|
|||||||
return ._create_chunk(x, y, z, chunk)
|
return ._create_chunk(x, y, z, chunk)
|
||||||
```
|
```
|
||||||
|
|
||||||
|
You can look at the other world implementations for more examples: [VoxelWorldBlocky](https://github.com/Relintai/voxelman/blob/master/world/blocky/voxel_world_blocky.cpp), [VoxelWorldMarchingCubes](https://github.com/Relintai/voxelman/blob/master/world/marching_cubes/voxel_world_marching_cubes.cpp).
|
||||||
|
|
||||||
#### VoxelChunk
|
#### VoxelChunk
|
||||||
|
|
||||||
Stores terrain data, prop data. And mesh data (VoxelChunkDefault), and the mesh generation jobs.
|
Stores terrain data, prop data. And mesh data (VoxelChunkDefault), and the mesh generation jobs.
|
||||||
|
Loading…
Reference in New Issue
Block a user