Page MenuHome

Voxel Remesh: Edit Voxel Size operator
ClosedPublic

Authored by Pablo Dobarro (pablodp606) on Dec 18 2019, 10:53 PM.
Tokens
"Love" token, awarded by abdo25."Love" token, awarded by Alumx."Love" token, awarded by DiogoX2."Piece of Eight" token, awarded by TheAngerSpecialist."Love" token, awarded by knightknight."Love" token, awarded by realeyez."Pterodactyl" token, awarded by Way."Love" token, awarded by Shimoon."Love" token, awarded by franMarz."Like" token, awarded by Constantina32."Love" token, awarded by lopoIsaac."Like" token, awarded by Debuk."Love" token, awarded by amonpaike."Love" token, awarded by MetinSeven."Love" token, awarded by Kronk."Love" token, awarded by xrg."Love" token, awarded by TheFlow."Love" token, awarded by RC12."100" token, awarded by Frozen_Death_Knight."Love" token, awarded by sam_vh."Burninate" token, awarded by Zino."Love" token, awarded by CobraA."Love" token, awarded by RodDavis."Like" token, awarded by Maged_afra."Mountain of Wealth" token, awarded by Brandon777.

Details

Summary

This operator lets the user control the voxel/detail size of the voxel remesher directly from the 3D view in a similar way the Brush radius and strength are controlled. The shorcut from sculpt mode is Shift + R (similar to Shift + F for brush strength).

It shows a grid that represents the real voxel size of the object. The grid and the text are automatically aligned to the view to avoid rendering all voxels with thousands of lines.

It also has a slow mode when pressing shift that works like the slow mode of the brush radius control.

Diff Detail

Repository
rB Blender

Event Timeline

Pablo Dobarro (pablodp606) edited the summary of this revision. (Show Details)
  • Scale the grid from the center instead of from a corner

I think it looks better this way

This looks great! It would be good to add the units to the number as well though, it could be confusing working at different scales than this.

Hi Pablo, thats great. As the visualization seems placed at the meshes frontfacing boundingbox side rather than the current mouse position. Is it possible that you also enable this visualization while dragging the slider in the toolsettings remesh popup at the top of the viewport? I think it's as helpful if its contolled from there.

And even if it's slightly offtopic I'd find it very useful to have it the same way for radius and strength previews placed at the boundingbox side if brush radius and strength is setup from within the toolsettings.

  • Fix bug when rendering the grid

On architecture side I think it is better to implement this as a gizmo as that will make it usable in other areas of blender.
I also added the UX team as reviewer to comment on the design and usability.

I also would like to mention that right now this is a workaround for an important bug in sculpt mode. When editing the voxel size directly in the mesh property Blender is constantly rebuilding the PBVH as you drag to tweak the value. That makes impossible to tweak the value in high poly meshes as the rebuild usually takes about 3 seconds. When you use this operator that does not happen.

Think this is an awesome feature - a very nice way to visualize what the operator does. I agree with Jeroen though, this should be implemented using gizmos.

@Jeroen Bakker (jbakker) @Julian Eisel (Severin) Is there any other functionality in Blender similar to this that uses gizmos to use as a reference for implementation? The most similar thing I found are the brush radius controls like WM_OT_radial_control and they are implemented the same way as this, they just let you choose a data path for the property to control (I can easily add that to this patch, but I don't think that makes much sense now).

Way awarded a token.Mar 6 2020, 5:00 PM
Jeroen Bakker (jbakker) requested changes to this revision.Mar 10 2020, 1:05 PM

I tried the operator you could improve by using a different input curve. The current one does not feel consistent.
Also I expected to have more the feeling of a scale transform operator.
Perhaps implement it as a radial and wrap around screens.
Limit when reaching small numbers. Currently the grid disappears, but the text still goes down. As this is a visual operator the grid is more important than the text.
Personally I found the text not saying anything useful. perhaps just remove it, or make it less prominent or something else.

source/blender/editors/object/object_remesh.c
243

|| tot_lines_half < 2 can be removed

321

Incorrect string format ("%3.4f%%")

This revision now requires changes to proceed.Mar 10 2020, 1:05 PM
Pablo Dobarro (pablodp606) marked 2 inline comments as done.
  • Rebase
  • Review Update

@Jeroen Bakker (jbakker) One of the main advantages of this operator is its input curve compared to regular UI widget. The relation between the voxel size and the final mesh resolution is cubic, so the operator has more precise control automatically the higher the voxel size is to prevent you for jumping to a unmanageable mesh resolution when working with high poly meshes. The relation between the input and the voxel size does not feel consistent, but the relation between input and final mesh resolution is.
Also, I made the grid disappear when reaching small voxel size because and that point it adds to much noise to the widget and it does not produce any relevant visual information (it looks like a solid white plane). Most users now are used to memorized a set of voxel size values which produced a desired mesh resolution, that is why the number is there.

Would it be an idea to fade out the grid when the number is tiny. Not rendering it may feel like a bug and users will report it.

  • Rebase
  • Fade out grid as the line number increases
Jeroen Bakker (jbakker) requested changes to this revision.Mar 16 2020, 11:37 AM
  • When the grid is fully faded away, banding appear

  • It is possible to get the control in a state where it is not possible to increase the voxel size

This revision now requires changes to proceed.Mar 16 2020, 11:37 AM
  • Enable linear mode when pressing Ctrl, this enables jumping to any voxel size regardless of the initial value.

I don't think the banding issues are related to this patch, as it is an issue in all operators (try the knife tool and move the cursor for a while). The banding does not appear if AA is disabled.

Yes, I solved the banding issue today. So I don't have any objections so far. Finetuning can still be done in master.

This seems alright to me, esp since it is simply additive.

This revision is now accepted and ready to land.Mar 30 2020, 10:15 AM
This revision was automatically updated to reflect the committed changes.

so.. now what is the shortcut to repeat the last action?