Regression: Hair Particle Edit on model with Mirror Modifier not working properly #107677
Labels
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser Project (Legacy)
Interest
Asset System
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
4 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#107677
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
System Information
Operating system: Windows 10 Home. 100.19044 Build 19044
Processor: Intel Core i7-8750H
RAM: 16 GB
Graphics card: GTX 1060 6GB
Blender Version
Broken: version: 3.1.0, branch: master, commit date: 2022-03-08 18:16, hash:
rBc77597cd0e15
Worked: version: 3.1.0 Beta, branch: master, commit date: 2022-02-20 22:00, hash:
rB1a0a22f95a22
Caused by
2fb31f34af
Short description of error
Add hair Particle on Particle Edit mode not working properly on model with Mirror Modifier. The mirrored particle root appear offset too much from expected.
Please check the attached Video and Blend File.
Exact steps for others to reproduce the error
a. Set Emission > Number = 0 to add manually later.
b. Set Emission > Source > Check USE MODIFIER STACK.
a. On the option panel, check Mirror X.
The mirrored particle will appear on the wrong place.
I've tested this on Blender 3.4, 3.2, 3.1 and this behavior also appear.
But it just work fine on Blender 3.0.1 just like on the video
Hair Particle Edit on model with Mirror Modifier not working properlyto Regression: Hair Particle Edit on model with Mirror Modifier not working properlyMost likely this will not be fixed, since soon the old particles will be replaced with curves.
Will still check on this
Caused by
2fb31f34af
We are now calling
BKE_mesh_orco_verts_transform
not only frompsys_face_mat
andpsys_mat_hair_to_orco
, but now also frompsys_particle_on_dm
>psys_interpolate_face
, so we get double transforms with mirror.But havent thought about this long enough to decide where to call this conditionally (or remove).
Proof of concept though: removing from
psys_mat_hair_to_orco
seems to work in simple tests:CC @JacquesLucke
CC @Sergey
The proposed fix of removing these lines sounds reasonable to me. Applying
BKE_mesh_orco_verts_transform
on the same variable twice does not make sense. I don't see a reason for why this should ever be called conditionally right now.The thing I was wondering about is why we even call it multiple times (even with the patch it gets called twice afaict)
Not sure which two calls you mean right now but note that
BKE_mesh_orco_verts_transform
has an "invert" parameter. So maybe it's called twice to convert the data back and forth?psys_face_mat
andpsys_particle_on_dm
>psys_interpolate_face
both call it inverted, so might be it?From what I can tell right now, it always gets vectors from
orcodata
and then callsBKE_mesh_orco_verts_transform
(withinvert=true
). The fact that it is called twice does not matter, because it's not the case that the output of the first call is passed into the second call, I think.Hm, why does the third call [which the proposed patch removes] cause a double transform then?
Because both calls to
BKE_mesh_orco_verts_transform
get the sameorco
variable passed in afaik.