Page MenuHome

Inset: VCol not correctly initiated for new vertices
Closed, ResolvedPublic

Description

System Information
Windows 10, NVidia GeForce GTX 765M

Blender Version
Broken: (example: 2.69.7 4b206af, see splash screen)
Worked: (optional)

Short description of error

After an inset the normals of the surface start acting weird, having shadows where it's not suposed to.

This only happens when insetingn though, and when creating geometry with extrude or any other tool this doesn't happen:

Further more, I can clean the results and make the shadows disappear by removing the edges that hold the faces in the region together and recreating the faces, like this:

But new face is in contact with one "broken" face when created it gives even wronger looking results

Haven't been able to reproduce it in any other project so I don't know if its a proper bug or something I've done through the modeling processing.

Exact steps for others to reproduce the error

  1. Selecting at least three faces
  1. Inseting them

Event Timeline

Sorry for forgetting the version:

2.75a c27589e

Bastien Montagne (mont29) lowered the priority of this task from 90 to 50.Aug 29 2015, 9:41 PM

This is not normals, but vertex colors, which does not get correctly initiated (or even better, interpolated?) it seems…

Bastien Montagne (mont29) renamed this task from Normals weird shading after inset to Inset: VCol not correctly initiated for new vertices.Aug 29 2015, 9:41 PM

Issue is actually rather simple - interpolation as done in bm_loop_customdata_merge() cannot work well with char-based data, like CD_MLOOPCOL (a = a + b will easily overflow…).

@Campbell Barton (campbellbarton) quick and dirty fix would be to do a = a * 0.5; b = b * 0.5; a = a + b; b = a; instead. Other solution would be to use CustomData_data_mix_value instead of lower-level add/multiply… Will let you decide what's best here.