Page MenuHome

Object transforms affecting Sculpt Mode Brush behaviour
Needs Triage, NormalPublicDESIGN

Description

This is a design proposal to change some underlying behaviour of the brush system in Sculpt Mode.

The issue:
When scaling or rotating an object and then proceeding to sculpt on it in Sculpt Mode, the brush behaviour is generally affected by the transforms of the object.
So if the scaling is 1 on X & Y but 3 on Z, the brush radius will be 3 times as high.
If the object is scaled down in general, the brush strength will be lower in total.
If the object is also rotated, the brush radius will be as well and rake effects like for the Snake Hook brush will be badly affected since the object rotation is added to the rotation of the brush.

In recent versions the brush radius is at least reflecting the object transforms, which helps spotting these negative influences and reminding the user to apply the object transforms before sculpting.
But there is not benefit to having the Sculpt Mode being affected by the object transforms, so this is just a limitation of the current system.
It's also good to add that on the other hand Edit Mode is not negatively affected by the transforms of the object.

The proposal:

To make the sculpting workflow easier on the user it would be ideal if the brushes are not affected by the local transforms of the object but are instead based on the world scale & orientation.
Only symmetry options should be directly influenced bu the local transforms.

Event Timeline

Julien Kaspar (JulienKaspar) changed the subtype of this task from "Report" to "Design".

Sculpt Mode has all the operations implemented in object space. If the object space is deformed, all the operation results will be deformed. It has a scale factor to compensate for uniform scaling, but this will fail if you use non uniform scaling in the object transform. I'm not sure if we can do something about this without affecting performance/memory, as we will need to calculate and store the global coordinates of all vertices in the mesh and change the PBVH building code. In any case, this needs to be done after refactoring symmetry (which is something I have planned) to support global/local symmetry and custom symmetry origins.

A warning is displayed when entering sculpt mode with non-uniform scale. This case is hard to get working well, and in my opinion is not worth the potential significant performance and code complexity impact.

I think that in general, non-uniform scale of objects should be discouraged. Often this is more an accident, where you scale in object mode because it's convenient, but the same scale could have been applied in edit mode. Modifiers also work poorly with non-uniform scale, and attempting to solve will negatively impact instancing where we do not want to make any assumptions about the object transform. Some other apps actually default to scaling the mesh vertices even when scaling in object mode.

@Brecht Van Lommel (brecht)
Yes I agree that currently it's not ideal or should be advised to work with non-uniform scale on objects.
Transforming the objects in edit mode is extremely slow on high poly objects but luckily we have the transform tools in sculpt mode now too.

The issue is that the common workflow to do the initial blocking of assets/characters is to do it in object mode. Keeping the local transforms is very useful in object mode but when entering sculpt mode these need to always be applied so that the tools work properly.

Applying the scaling is just an inconvenience IMO that a lot of users don't know about and immediately assume that sculpt mode is broken.
But the rotation is very important to keep the symmetry axis intact. Applying this fixes for example the Snake Hook brush but can ruin the current symmetry, which is an issue.
The location of the object doesn't seem to negatively affect any brushes so that's good.

As an alternative proposal if this is too big of a project, it would be good to not have the some Sculpt Tools behaviour being affected by the object rotation at least.
@Pablo Dobarro (pablodp606) What is your opinion on this?

I would even propose to make the warning message about the non-uniform scaling a popover since it's something the user definitely want's to apply before sculpting.
The popover could then prompt the user to either dismiss the issue and continue or to apply the scaling immediately.
But this is something different to discuss with the UI team.

If we want to fix this, I would prefer applying automatically the scale when entering sculpt mode and refactor symmetry to work the other way (use global space in symmetry operations, not in the vertex coordinates).
@Julien Kaspar (JulienKaspar) Rotation should work fine when the scale is applied. If it does not work with some brushes in particular, it may be a bug in the grab delta code.

@Pablo Dobarro (pablodp606) automatically permanently applying the scale will cause significant issues in a scene with animation, drivers or other such setups. We should not do that automatically when just switching modes.

The 'proper' solution I suppose is for sculpting to happen in world space and not object space. But not sure is that's feasible.

I think it's quite reasonable to show a popup when entering sculpt mode, asking to apply scale. It doesn't have to be automatic, and we can stop showing the popup once the user has decide to ignore the problem for that object.

@Pablo Dobarro (pablodp606) I wouldn't apply the scale automatically since users can enter sculpt mode by accident and don't always want the scale applied. A popover to ask the user if they want to apply the scale would be better.

So far the only brush that I found to be negatively affected by the object rotation is the snake hook brush with its rake setting.

Maybe we can close this design task and instead report the snake hook rake settings as a bug and discuss the popover when entering sculpt mode with the UI team.

I agree with @Julien Kaspar (JulienKaspar): a pop-up offering the option of applying non-uniform scale would be convenient and would avoid users forgetting it / not knowing about it.

ZBrush also has a lot of pop-ups, so experienced sculptors are used to it. ๐Ÿ˜‰