JustAddRobots / shapeshift

Tools for 3D Pipelines
GNU General Public License v3.0
0 stars 0 forks source link

Add lightmap creation option for "Texture" task #31

Closed JustAddRobots closed 2 years ago

JustAddRobots commented 2 years ago

It seems UE4's automatic lightmap creation is "less-than-ideal". Add an option to create a lightmap for the second UV channel.

JustAddRobots commented 2 years ago

OK, so "Llightmap Pack" or any automatic Lightmap generation tool sucks (UV Unwrap, too). Apparently the correct thing is to manually create Lightmap UVs. But unfortunately, Blender only currently supports one set of UV seams. So its not possible to have a set of seams for the texture UVs and a separate set for the lightmap UVs. That makes programatically generating both UV layers difficult.

One workaround may be to use vertex groups. One can select a seam edge then Select > Select Similar > Seam to select all the seams and assign them to the vertex group. The difficulty is that vertex groups are a property of the mesh. So one needs to create a vertex group in each mesh the seam occupies. The only reasonable way is create the vertex group programattically.

Add new task before "Texture" that can create an identically named vertex group across all seamed meshes.

JustAddRobots commented 2 years ago

Unfortunately saving the seam vertices in a vertex group won't work since edges are not preserved when the vertex group is selected. There is no edge group in Blender, so back to the drawing board.

JustAddRobots commented 2 years ago

Until multiple seam sets can be saved, its a bit too much bother. So for now the workflow will be 1) create texture UV seams manually, 2) automatically create texture UV map + lightmap , 3) manually fix lightmap UV seams, 4) re-unwrap lightmap.