ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
A common mistake users tends to do is to subdivide the model to minimize the shading issue, this is NOT good as it increases the poly count of the scene without eliminating the problem!
The right solution is to tweak the shading properties of the mesh; If you have no idea of what shading is please read this little introduction.
You need Blender installed and the Collada I/O add-on (this PPA provides a Blender version with Collada support enabled).
File
> Import
> Collada (Default) (.dae)
Tab
):Ctrl
+Tab
) and select all faces (A
) of the modelSmooth
:Tab
)EdgeSplit
modifier:Result after the smoothing:
2 | No.2 Revision |
A common mistake users tends to do is to subdivide the model to minimize the shading issue, this is NOT good as it increases the poly count of the scene without eliminating the problem!
The right solution is to tweak the shading properties of the mesh; If you have no idea of what shading is please read this little introduction.
You need Blender installed and the Collada I/O add-on (this PPA provides a Blender version with Collada support enabled).
File
> Import
> Collada (Default) (.dae)
Tab
):Ctrl
+Tab
) and select all faces (A
) of the modelSmooth
:Tab
)EdgeSplit
modifier:Result after the smoothing:
You can use this Python script to do the job for you; The script only modifies the selected objects. After that you need to individually tweak the split angle value and apply the modifier on each mesh.
import bpy
import re
# Applies only on selected objects
if len(bpy.context.selected_objects) > 0:
for obj in bpy.context.selected_objects:
if obj.type == 'MESH':
bpy.context.scene.objects.active = obj
bpy.ops.object.editmode_toggle()
bpy.ops.mesh.select_all(action='SELECT')
bpy.ops.mesh.remove_doubles()
bpy.ops.mesh.faces_shade_smooth()
bpy.ops.object.editmode_toggle()
bpy.ops.object.modifier_add(type='EDGE_SPLIT')
# Don't forget to tweak the split angle and apply the modifier!
3 | No.3 Revision |
A common mistake users tends to do is to subdivide the model to minimize the shading issue, this is NOT good as it increases the poly count of the scene without eliminating the problem!
The right solution is to tweak the shading properties of the mesh; If you have no idea of what shading is please read this little introduction.
You need Blender installed and the Collada I/O add-on (this PPA provides a Blender version with Collada support enabled).
File
> Import
> Collada (Default) (.dae)
Tab
):Ctrl
+Tab
) and select all faces (A
) of the modelSmooth
:Tab
)EdgeSplit
modifier:Result after the smoothing:
You can use this Python script to do the job for you; The script only modifies the selected objects. After that you need to individually tweak the split angle value and apply the modifier on each mesh.
import bpy
import re
# Applies only on selected objects
if len(bpy.context.selected_objects) > 0:
for obj in bpy.context.selected_objects:
if obj.type == 'MESH':
bpy.context.scene.objects.active = obj
bpy.ops.object.editmode_toggle()
bpy.ops.mesh.select_all(action='SELECT')
bpy.ops.mesh.remove_doubles()
bpy.ops.mesh.faces_shade_smooth()
bpy.ops.object.editmode_toggle()
bpy.ops.object.modifier_add(type='EDGE_SPLIT')
# Don't forget to tweak the split angle!
Once you are done tweaking the split angle values, select all your meshes again and use this script to apply the modifier!
EdgeSplit
modified:
import bpy
import re
# Apply the EdgeSplit modifier on selected objects
if len(bpy.context.selected_objects) > 0:
for obj in bpy.context.selected_objects:
if obj.type == 'MESH':
bpy.context.scene.objects.active = obj
bpy.ops.object.modifier_apply(apply_as='DATA', modifier="EdgeSplit")
Note that in case something didn't go well, you can easily revert the changes with a Remove doubles
in edit mode and switching back to flat shading.
4 | No.4 Revision |
A common mistake users tends to do is to subdivide the model to minimize the shading issue, this is NOT good as it increases the poly count of the scene without eliminating the problem!
The right solution is to tweak the shading properties of the mesh; If you have no idea of what shading is please read this little introduction.
You need Blender installed and the Collada I/O add-on (this PPA provides a Blender version with Collada support enabled).
File
> Import
> Collada (Default) (.dae)
Tab
):Ctrl
+Tab
) and select all faces (A
) of the modelSmooth
:Tab
)EdgeSplit
modifier:Result after the smoothing:
You can use this Python script to do the job for you; The script only modifies the selected objects. After that you need to individually tweak the split angle value and apply the modifier on each mesh.
import bpy
import re
# Applies only on selected objects
if len(bpy.context.selected_objects) > 0:
for obj in bpy.context.selected_objects:
if obj.type == 'MESH':
bpy.context.scene.objects.active = obj
bpy.ops.object.editmode_toggle()
bpy.ops.mesh.select_all(action='SELECT')
bpy.ops.mesh.remove_doubles()
bpy.ops.mesh.faces_shade_smooth()
bpy.ops.object.editmode_toggle()
bpy.ops.object.modifier_add(type='EDGE_SPLIT')
# Don't forget to tweak the split angle!
Once you are done tweaking the split angle values, select all your meshes again and use this script to apply the EdgeSplit
modified:modifier:
import bpy
import re
# Apply the EdgeSplit modifier on selected objects
if len(bpy.context.selected_objects) > 0:
for obj in bpy.context.selected_objects:
if obj.type == 'MESH':
bpy.context.scene.objects.active = obj
bpy.ops.object.modifier_apply(apply_as='DATA', modifier="EdgeSplit")
Note that in case something didn't go well, you can easily revert the changes with a Remove doubles
in edit mode and switching back to flat shading.
5 | No.5 Revision |
A common mistake users tends to do is to subdivide the model to minimize the shading issue, this is NOT good as it increases the poly count of the scene without eliminating the problem!
The right solution is to tweak the shading properties of the mesh; If you have no idea of what shading is please read this little introduction.
You need Blender installed and the Collada I/O add-on (this PPA provides a Blender version with Collada support enabled).
File
> Import
> Collada (Default) (.dae)
Tab
):Ctrl
+Tab
) and select all faces (A
) of the modelSmooth
:Tab
)EdgeSplit
modifier:Result after the smoothing:
You can use this Python script to do the job for you; The script only modifies the selected objects. After that you need to individually tweak the split angle value and apply the modifier on each mesh.
import bpy
import re
# Applies only on selected objects
if len(bpy.context.selected_objects) > 0:
for obj in bpy.context.selected_objects:
if obj.type == 'MESH':
bpy.context.scene.objects.active = obj
bpy.ops.object.editmode_toggle()
bpy.ops.mesh.select_all(action='SELECT')
bpy.ops.mesh.remove_doubles()
bpy.ops.mesh.faces_shade_smooth()
bpy.ops.object.editmode_toggle()
bpy.ops.object.modifier_add(type='EDGE_SPLIT')
# Don't forget to tweak the split angle!
Once you are done tweaking the split angle values, select all your meshes again and use this script to apply the EdgeSplit
modifier:
import bpy
import re
# Apply the EdgeSplit modifier on selected objects
if len(bpy.context.selected_objects) > 0:
for obj in bpy.context.selected_objects:
if obj.type == 'MESH':
bpy.context.scene.objects.active = obj
bpy.ops.object.modifier_apply(apply_as='DATA', modifier="EdgeSplit")
Note that in case something didn't go well, you can easily revert the changes with a Remove doubles
in edit mode and switching back to flat shading.