KinjO it works now i am adding the addon. It’s in the n menu though, but i think it’s better this way to not have too much options in the t menu. Can i use your script as a base to include my scripts?
BluePrintRandom: for the first script there is the decimation modifiers with the Vertex Group option, to share the vertex group with your weight of the bones, the problem is that each bone has it’s own vertex group.
For the second i’ll see if i can create a script to Unwrap, correct ngons, optimize the texels, bake the Normal, AO, and Bent normal map in a relative path folder from two selected meshes.
Update
- Generate LP now rebuild the topology (non destructive!)
I did some tests, if i switch to edge mode, select the sharp edges at 30.1, invert the selection, use the limited disolve (the polygon will stay attached, and the awesome software that is Blender will not dissolve edges that impact a lot the geometry, for example an edge that pushes the geometry will remain) and run the Generate LP script the faces will be reorganized and the extra edges not needed removed, the ngons fixed. So i have gathered the two techniques in the Generate LP script.
When to use it? All the time for hard surface models:
- applies the modifier, remove the doubles, clear the normales
- optimize your polycount, remove your ngons, create edges between booleans
- add seams automatically
- auto unwrap your model while optimizing your texel density for your bake/texture/painting
- Smooth your model and applies an edge split modifier
Demonstration (as you can see Blender keep the edges at the extremity that deform the shapes, that’s why this technique is non-destructive):
Model ready to be exported in your game in one click!
Also if i use the bisect tool in face mode i am able to delete the faces on the symmetrical axis, then i redo a bisect in edge mode to mark the seams. The script also correct your normals.
If you don’t want your model to be cut by half move it to the right along the x axis, apply the location (Ctrl + a) use Generate LP then Cut Half.
You can also play with the subdivision and the extrude tool to make holes, use booleans everywhere, Dark Blender will clean the mesh and you will still be able to generate a High Poly from the new low poly (doesn’t work everytime):
Source:
#Generate LP
import bpy
bpy.ops.object.mode_set(mode= 'OBJECT')
bpy.ops.object.convert(target='MESH')
bpy.ops.object.join()
bpy.context.object.location[0]= 0
bpy.ops.object.transform_apply(location=False,rotation=True, scale=False)
bpy.ops.object.mode_set(mode = 'EDIT')
bpy.ops.mesh.reveal()
bpy.ops.mesh.select_mode(type="EDGE")
bpy.ops.mesh.select_all(action = 'DESELECT')
bpy.ops.mesh.edges_select_sharp(sharpness=0.525344)
bpy.ops.mesh.select_all(action='INVERT')
bpy.ops.mesh.dissolve_limited()
bpy.ops.object.mode_set(mode= 'EDIT')
bpy.ops.mesh.select_all(action= 'SELECT')
bpy.ops.mesh.remove_doubles()
bpy.ops.mesh.normals_make_consistent(inside=False)
bpy.ops.mesh.quads_convert_to_tris()
bpy.ops.mesh.tris_convert_to_quads()
bpy.ops.mesh.select_mode(type="EDGE")
bpy.ops.mesh.mark_seam(clear=True)
bpy.ops.mesh.select_all(action= 'DESELECT')
bpy.ops.mesh.edges_select_sharp(sharpness=0.525344)
bpy.ops.mesh.mark_seam(clear=False)
bpy.ops.mesh.select_all(action= 'SELECT')
bpy.ops.mesh.bisect(plane_co=(0,0, 0), plane_no=(1, 0, 0), clear_inner=True, clear_outer=False,xstart=376, xend=381, ystart=133, yend=62)
bpy.ops.mesh.delete(type='FACE')
bpy.ops.mesh.select_all(action= 'SELECT')
bpy.ops.mesh.bisect(plane_co=(0,0, 0), plane_no=(1, 0, 0), clear_inner=True, clear_outer=False,xstart=376, xend=381, ystart=133, yend=62)
bpy.ops.mesh.mark_seam(clear=False)
bpy.ops.mesh.select_all(action= 'SELECT')
bpy.ops.uv.unwrap(method='ANGLE_BASED',margin=0.02)
bpy.ops.mesh.select_all(action= 'DESELECT')
bpy.ops.object.mode_set(mode= 'OBJECT')
bpy.ops.object.shade_smooth()
bpy.ops.object.modifier_add(type='MIRROR')
bpy.ops.object.modifier_apply(apply_as='DATA',modifier="Mirror")
bpy.ops.object.modifier_add(type='EDGE_SPLIT')
bpy.context.object.modifiers["EdgeSplit"].split_angle= 0.525344
- Script from KINjO to match the transforms of another mesh has been added in the Addon folder.
BUG: with Select > Hard Edges some edges aren’t selected