I am building assets in blender for use in UE4.
For UV maps and light maps I need to have 2 texels spacing around each island (i.e. 4 texels minimum between islands). To calculate what spacing I need in 0-1 space I use the formula
1/[lightmap size]*2 (e.g. 1/64*2 = 0.032 for a 64x64 map) to convert.
At first I naively plugged this value into the "Margin" parameter of the Unwrap function but this gave me a much too small margin in 0-1 space. Actually, A value of 1 (the maximum) for "Margin" translates into a margin of 0.111 in 0-1 space. Hmm.
- What is the math behind the "Margin" parameter of the Unwrap function?
- What is the process to get a margin of a given number of texels (besides trial and error which is time consuming)?