Hi, I'm playing around with the Unity example project and I'm seeing some artefacts when using the stamp_passed_mesh function. Is there some setting I can use to avoid this or is it always going to happen when using this shape?

Another question I have is about UV mapping. Would I be able to apply UV mapping through code? For instance if I wanted the side of the hole to have an earth texture? Would this be particularly bad for performance?

Thanks for your help,
Brian [smile]

0 0
You should not get artifacts when negative-stamping a cylinder:

We will double check this for the Unity example, also if you can send us the actual cylinder mesh you are using it would be a great help. Bottom line is you should not get any artifacts so we will have a second look.

You can apply custom UV mapping to voxels programmatically. In your example, it seems this may not be necessary. If you want just to change the material in some areas, for instance revealing dirt or stone, you can assign the desired material to voxels and leave the UV mapping as automatic. This is equivalent to the paint tool.

0 0
Hmmm, that's interesting. Not sure why that was happening then. I was using the cylinder that comes with Unity, I'm afraid I can't attach it as I don't have access to the actual file. Thanks for the quick reply anyway, I'll see if I can get any more solid repro steps.

Cheers [smile]
0 0
Hi, I've spent some more time playing around and it's actually placing a mesh that is the problem. Removing meshes works fine 99% of the time. Occasionally if I remove several cylinders so that they overlap (such as olympic rings) there's be a bump at the boundary but I'm not worried about that.

I was wondering do you have documentation for public function calls in the voxelfarm dll? I'm afraid I've only been able to find the ones used in the Unity demo and it's not clear what some of them do. Once again, thanks for all your help!

Brian [smile]

0 0
I can now confirm this is a bug in the handling of air voxels. We are working on a fix, we aim to include it in the update scheduled for this week.
0 0
Oh brilliant, thank you Torres!

Any chance you have a link to the public function calls in the voxelfarm dll? The only documentation I can find is
0 0
You can find the latest DLL function list in: SDK\Demo.UnityPlugin\voxelfarm_unity.h

At the moment of this post, here it is:

extern "C"
  void VOXELFARM_API cell_init_project(char* project_file, char* bundle_data);
  void VOXELFARM_API cell_init_bundled_field_project(char* bundlePath, char* project_file, char* bundle_data, char* dataR, char* dataRW, char* field_data, int field_length);
  void VOXELFARM_API cell_init_bundled_project(char* bundlePath, char* project_file, char* bundle_data, char* dataR, char* dataRW);
  void VOXELFARM_API cell_init_bundled_project_engine_load_files(char* project_file, char* bundle_file, char* savedata);
  void VOXELFARM_API cell_init_perlin();
  void VOXELFARM_API idle();
  void VOXELFARM_API shutdown_voxelfarm();
  void VOXELFARM_API set_random_seed(unsigned int seed);
  void VOXELFARM_API is_scene_new(bool* isSceneNew);
  void VOXELFARM_API scene_cells(int* count, __int64** cells);
  void VOXELFARM_API get_next_cell_to_bake(__int64* cellid, __int64* celldata, bool* immediate);
  void VOXELFARM_API notify_cell_baked(__int64 cellid, __int64 celldata);
  void VOXELFARM_API get_next_cell_to_bake_seams(__int64* cellid, __int64* celldata);
  void VOXELFARM_API notify_cell_baked_seams(__int64 cellid, __int64 celldata);
  void VOXELFARM_API get_next_cell_to_destroy(__int64* cellid, __int64* celldata);
  void VOXELFARM_API notify_cell_destroyed(__int64 cellid, __int64 celldata);
  void VOXELFARM_API cell_geometry(int* vertexCount, float** vertices, float** normals, float** face_normals, unsigned int** materials_a, unsigned int** materials_b, __int64 celldata);
  void VOXELFARM_API cell_seam_geometry(int* vertexCount, float** vertices, float** normals, float** face_normals, unsigned int** materials_a, unsigned int** materials_b, __int64 celldata);
  void VOXELFARM_API cell_transform(float* x, float* y, float* z, float* scale, __int64 celldata);
  void VOXELFARM_API unpack_cell_id(int* x, int* y, int* z, int* level, __int64 celldata);
  void VOXELFARM_API cell_instance_references(int* instanceCount, float** instancePositions, float** instanceNormals, float** instanceRotations, float** instanceSizes, int** instanceIndices, __int64 celldata);
  void VOXELFARM_API instance_get_id(char* instanceName, int* id_out);
  void VOXELFARM_API instance_get_name(int id, char** instanceName_out, int* instanceNameLen_out);
  void VOXELFARM_API get_next_mesh_to_bake(__int64* meshdata);
  void VOXELFARM_API notify_mesh_baked(__int64 meshdata);
  void VOXELFARM_API mesh_geometry(int* vertexCount, float** vertices, float** normals, float** face_normals, unsigned int** materials_a, unsigned int** materials_b, const __int64 meshdata);
  void VOXELFARM_API mesh_collision_geometry(int* vertexComponentCount, float** vertices, const __int64 meshdata);
  void VOXELFARM_API set_position(double x1, double y1, double z1);
  void VOXELFARM_API get_position(double* x, double* y, double* z);
  void VOXELFARM_API set_los(double ex, double ey, double ez, double tx, double ty, double tz);
  void VOXELFARM_API update_hit_pos();
  void VOXELFARM_API set_origin(const double x, const double y, const double z);
  void VOXELFARM_API get_origin(double* x, double* y, double* z);
  void VOXELFARM_API set_force_static_origin(bool force_origin);
  void VOXELFARM_API block_add();
  void VOXELFARM_API block_remove();
  void VOXELFARM_API set_build_brush_size(int x, int y, int z);
  void VOXELFARM_API set_build_material(int material);
  void VOXELFARM_API stamp_passed_mesh(int vertCount, float* vertices, bool remove);
  // helper functions
  void VOXELFARM_API material_textures(char* material_textures_file, int* atlasPageNum_out, int** mapSize_array_out, int** mapCount_array_out, char** data_out);
  void VOXELFARM_API material_properties(char* material_properties_file, int* propertyCount_out, int* materialCount_out, float** data_out);

0 0
Thanks Torres. I'm still finding my way around the SDK, thanks for all your help [smile]
0 0