Change subdiv from global to cut face, this makes the final result far much better
parent
e9d0696be6
commit
a201d09535
|
@ -121,7 +121,10 @@ void MeshGenerator::process()
|
|||
bool isDisabled = isTrueValueString(disabledString);
|
||||
if (isDisabled)
|
||||
continue;
|
||||
bool subdived = isTrueValueString(valueOfKeyInMapOrEmpty(part->second, "subdived"));
|
||||
int bmeshId = meshlite_bmesh_create(meshliteContext);
|
||||
if (subdived)
|
||||
meshlite_bmesh_set_cut_subdiv_count(meshliteContext, bmeshId, 1);
|
||||
if (MeshGenerator::enableDebug)
|
||||
meshlite_bmesh_enable_debug(meshliteContext, bmeshId, 1);
|
||||
partBmeshMap[partIdIt] = bmeshId;
|
||||
|
@ -220,7 +223,8 @@ void MeshGenerator::process()
|
|||
zMirroredMeshId = meshlite_mirror_in_z(meshliteContext, meshId, 0);
|
||||
}
|
||||
}
|
||||
bool subdived = isTrueValueString(valueOfKeyInMapOrEmpty(part->second, "subdived"));
|
||||
//bool subdived = isTrueValueString(valueOfKeyInMapOrEmpty(part->second, "subdived"));
|
||||
bool subdived = false;
|
||||
if (m_requirePartPreviewMap.find(partIdIt) != m_requirePartPreviewMap.end()) {
|
||||
ModelOfflineRender *render = m_partPreviewRenderMap[partIdIt];
|
||||
int trimedMeshId = meshlite_trim(meshliteContext, meshId, 1);
|
||||
|
|
Binary file not shown.
Binary file not shown.
|
@ -32,6 +32,7 @@ int meshlite_get_halfedge_index_array(void *context, int mesh_id, int *buffer, i
|
|||
int meshlite_get_halfedge_normal_array(void *context, int mesh_id, float *buffer, int max_buffer_len);
|
||||
int meshlite_build(void *context, float *vertex_position_buffer, int vertex_count, int *face_index_buffer, int face_index_buffer_len);
|
||||
int meshlite_bmesh_create(void *context);
|
||||
int meshlite_bmesh_set_cut_subdiv_count(void *context, int bmesh_id, int subdiv_count);
|
||||
int meshlite_bmesh_enable_debug(void *context, int bmesh_id, int enable);
|
||||
int meshlite_bmesh_add_node(void *context, int bmesh_id, float x, float y, float z, float radius);
|
||||
int meshlite_bmesh_add_edge(void *context, int bmesh_id, int first_node_id, int second_node_id);
|
||||
|
|
Binary file not shown.
Binary file not shown.
|
@ -32,6 +32,7 @@ int meshlite_get_halfedge_index_array(void *context, int mesh_id, int *buffer, i
|
|||
int meshlite_get_halfedge_normal_array(void *context, int mesh_id, float *buffer, int max_buffer_len);
|
||||
int meshlite_build(void *context, float *vertex_position_buffer, int vertex_count, int *face_index_buffer, int face_index_buffer_len);
|
||||
int meshlite_bmesh_create(void *context);
|
||||
int meshlite_bmesh_set_cut_subdiv_count(void *context, int bmesh_id, int subdiv_count);
|
||||
int meshlite_bmesh_enable_debug(void *context, int bmesh_id, int enable);
|
||||
int meshlite_bmesh_add_node(void *context, int bmesh_id, float x, float y, float z, float radius);
|
||||
int meshlite_bmesh_add_edge(void *context, int bmesh_id, int first_node_id, int second_node_id);
|
||||
|
|
Loading…
Reference in New Issue