Zylann / voxelgame

Voxel world prototype made with Godot Engine
Other
557 stars 89 forks source link

Voxels with different texture from texture atlas? #54

Closed Teknologicus closed 6 years ago

Teknologicus commented 6 years ago

In the Godot inspector under VoxelTerrain, Voxel Library, I can define a new voxel (type cube with existing material id specified) but I can't seem to figure out how to get the new voxel to use any texture atlas tile from the material's texture other than the very first texture atlas tile. Am I overlooking some setting or is this a bug in the voxel module?

Zylann commented 6 years ago

The module is experimental and the editor part is fairly unfinished, but there is a way to tell which part of the texture atlas is used for each cube faces, using Voxel::set_cube_uv_side(side, tile_coords). It probably just isn't exposed in the editor, I don't remember. Note that this would be an issue to post on the module, this repo is just a demo.

Teknologicus commented 6 years ago

Thank you. I'll manipulate the voxel UV's programmatically.