Problems were in the old multires loading system.
Actually, the sigsev itself was the easy part of the job (simply had to convert from tesselated data to polys/loops), but after that I was getting a horrible bunch of wild stray faces...
It finally turned out it was a mismatch in two different subsurf structs used while computing a mdisps layer from the multires DM, leading to getting complete random normals (null ones, NAN ones...), leading to complete dummy tangent space matrix, leading to absurds mdisps values...
Note: I also moved the copy of first layer's vertex and face data from old me->mr to mesh's v/fdata earlier in multire_load_old(), to be able to use general face_to_poly conversion function (later on we would have to do it by hand, the general function would erase our newly computed mdisps layer...).
Took me the whole week (something like 20h) to track this down: multires + subsurf = C nightmare!
Issue was caused by threading conflict between compositor output node which
is freeing buffers used by render result image and image draw code which
could use buffers at the same time as compositor frees this buffers.
Solved by adding adding lock around viewer image invalidation and image
drawing.
Use renamed LOCK_PREVIEW mutex for this, which si not called LOCK_DRAW_IMAGE.
With new compositor locking for preview is not needed so it could be removed.
Added the same lock around viewer operation which also frees buffers used
by viewer image. It's actually quite difficult to check whether this is
indeed needed. This code seems to be using acquire/release technique, but
somehow acquiring ImBuf before invalidating it in compositor operation
doesn't resolve the issue, so probably it's not actually locking acquire
and things should be checked deeper.
Issue was caused by VBOs using CD_TEXTURE_MCOL for faces colors. This
layer was creating on mesh display (from draw_tface_mapped__set_draw)
in cases there's no such a layer.
If material settings are changing, this layer wasn't updated and old
colors were used.
Fixed by performing an update of this layer in cases it's already
exists. This would give some % of slowdown, but don't think it'll
be dramatically bad.
Would be nice to find a nice way to update such a layer in cases
material is actually changes only, or get completely rid of it/
Issue was caused by performing conversion from FTFaces to materials from
the end of lib_link_mesh, where tesselated faces were cleared already.
This conversion can't be switched to BMesh structures because in future
MTexPolys could be changed in a way, that versioning stuff wouldn't work
any more. Another issue is that making such a conversion per-mesh would
lead to quite a code spagetti, which is difficult to follow.
Solved by splitting per-mesh cycle in lib_link_mesh, so now it consists
of three steps:
- Do linking stuff such as custom data layers, materials. Perform a
Conversion stuff like tessface -> polys.
- Convert all MTFaces to materials. This conversion handles all meshes
and creates needed materials.
- Free tessfaces, mark mesh as linked.
Such a separation shouldn't noticeably affect on speed of linking.
Issue was caused by the code which checked whether snapping should be enabled
on transform init taking into account keymap and special keys state. It was
used for Ctrl-Click on manipulator only.
Check for Ctrl state gave wring result with skin modifier. It was solved
by additional check for which mode transformation is initializing for --
currently manipulator is available for translation/roation/resize only
which doesn't give any keymap issues.
It used to be a dependency cycle which lead to incorrect or
missed tesselation on some circumstances.
Seems to be introduced in rev41627.
This commit seems to behaving properly on simple cases,
probably could fail in some other cases, so need to be
checked further.
Discovered when was looking into:
#32034: Metaball used as render object(group) for particle will display wire only.
Issue was caused by missed value for this enum, fixed by adding check
in tooltip generation.
Default value for this enum should also be fixed, but that would be
in separated commit.
The direction for these are flipped from other end caps, so add a root
flag to indicate whether the cap polygon's vertex output order should be
reversed.
Fixes bug [#32079] Skin-modifier calculates root's normals wrong
projects.blender.org/tracker/index.php?func=detail&aid=32079&group_id=9&atid=498
re-optimized the Defocus node.
* localized MemoryBuffers
* removed read(x,y) calls
* shuffled some lines in the execute pixel
* added a readNoCheck function to the memorybuffer (only use this when
you are certain you are reading a pixel inside the memorybuffer.
Added OpenCL kernel for the directional blur.
This operation always uses the full input image. In the current
implementation this input image is not cached on the device.
Future enhancement could be to cache it on the available opencl devices
The instance modifier needs to access the derived mesh data of the particle parent object to create stuff on the hairs, however the dm does not exist when the particle modifier is hidden. This is a general design problem: Objects accessing another object's derived mesh data is unsafe. For now it just checks valid dm pointer and uses identity transform if NULL.
- Fixed issue with black areas appearing when too many sites
are defined.
Currently tweak epsilon value for this, but probably actual
issue is somewhere else, can't see it yet.
- Fixed issue with bright pixels appearing in the sites, was
caused by accumulating color for pixels, which isn't needed.
Once color for pixel was set stop iterating via triangles.
Could give some speedup too.
- Ignore markers which are outside of frame bounds, they were
giving bad triangulation and they can't affect on gradient
due to color fir such sites is not known.
- Sites used to be created at position without track offset
taken into account.