Normals' baker from multires mesh #27331

Closed
opened 2011-05-08 18:03:31 +02:00 by Sergey Sharybin · 13 comments

%%%Hi everybody!

Last few weeks Morten Mikkelsen and me were working under baker, which could bake normals directly from mesh with multi-resolution modifier without using much of additional memory. Now, we've got quite usable patch.

To use new baker you should choose "Sculpt baker" in Baker panel, select object with sculpted data on multires modifier, choose subdivision level you want to bake to and hit "Bake". Note, that mesh should be unwrapped and texture should be assigned to this UV map.

Baking happens in "locked" mode, so there'll be no UI refresh during baking (that's the downside of not using additional memory).

Some additional work is needed before we could say "yep, it's finished and could be commited", but you could alreayd have fun!%%%

%%%Hi everybody! Last few weeks Morten Mikkelsen and me were working under baker, which could bake normals directly from mesh with multi-resolution modifier without using much of additional memory. Now, we've got quite usable patch. To use new baker you should choose "Sculpt baker" in Baker panel, select object with sculpted data on multires modifier, choose subdivision level you want to bake to and hit "Bake". Note, that mesh should be unwrapped and texture should be assigned to this UV map. Baking happens in "locked" mode, so there'll be no UI refresh during baking (that's the downside of not using additional memory). Some additional work is needed before we could say "yep, it's finished and could be commited", but you could alreayd have fun!%%%
Author
Owner

Changed status to: 'Open'

Changed status to: 'Open'

%%%ubuntu 11.04 64bits

I gave it a quick try with a sculpted default cube.
Having a good result is easier than with a selected to active workflow.

It does not work correctly when multires preview level is lower or higher than bake level.%%%

%%%ubuntu 11.04 64bits I gave it a quick try with a sculpted default cube. Having a good result is easier than with a selected to active workflow. It does not work correctly when multires preview level is lower or higher than bake level.%%%
Author
Owner

%%%Yep, it was issue with space transformation here.. I was thinking about additional check to prevent baking to higher level. Or this would not good solution?%%%

%%%Yep, it was issue with space transformation here.. I was thinking about additional check to prevent baking to higher level. Or this would not good solution?%%%
Author
Owner

%%%Re-newed patch. Fixed issues with baking to multiplie textures and fixed minor issue with lo-res mesh.%%%

%%%Re-newed patch. Fixed issues with baking to multiplie textures and fixed minor issue with lo-res mesh.%%%
Author
Owner

%%%Patch which is almost ready to commit is attached. Ni functional changes -- just styling.%%%

%%%Patch which is almost ready to commit is attached. Ni functional changes -- just styling.%%%
Author
Owner

%%%Next version of patch: with some minor fixes and implementation of heights baking.

Baker could now switch to job-related work and "Cancel" button would be shown for it, but it still needs object editing (and probably 3dview refresh freeze), so this option is disabled by default.%%%

%%%Next version of patch: with some minor fixes and implementation of heights baking. Baker could now switch to job-related work and "Cancel" button would be shown for it, but it still needs object editing (and probably 3dview refresh freeze), so this option is disabled by default.%%%
Author
Owner

%%%Oops, One uninitialized memory usage issue fixed.%%%

%%%Oops, One uninitialized memory usage issue fixed.%%%
Author
Owner

%%%After Brecht's review some things were changed. fixed, improved:

  • Now baking happens from highest level of multires to current viewport level
  • To bake using sculpt-baker you should:
    1. choose what you want to bake (normals/displacement).
    2. enable "Bake from Multires" checkbox.
  • Baking became thread-safe due to it shouldn't share hi-res mesh used in viewport and holds it's own hi-res and lo-res versions (lo-res doesn't add so many memory overhead). Now you've got progress bar and "Cancel" button.
  • I've found incorrect calculation when using "Smooth Heights" option. Not it should behave correct.
  • Now baking happens for all selected objects (be careful due to hi-res mesh for each of them would be stored in memory at the same time).

Looks like list of major things is over.%%%

%%%After Brecht's review some things were changed. fixed, improved: - Now baking happens from highest level of multires to current viewport level - To bake using sculpt-baker you should: 1) choose what you want to bake (normals/displacement). 2) enable "Bake from Multires" checkbox. - Baking became thread-safe due to it shouldn't share hi-res mesh used in viewport and holds it's own hi-res and lo-res versions (lo-res doesn't add so many memory overhead). Now you've got progress bar and "Cancel" button. - I've found incorrect calculation when using "Smooth Heights" option. Not it should behave correct. - Now baking happens for all selected objects (be careful due to hi-res mesh for each of them would be stored in memory at the same time). Looks like list of major things is over.%%%
Author
Owner

%%%- Fixed incorrect image cleaning when baking multiple objects

  • Fixed incorrect JobData structure which lead to incorrect baking several objects and memory leak%%%
%%%- Fixed incorrect image cleaning when baking multiple objects - Fixed incorrect JobData structure which lead to incorrect baking several objects and memory leak%%%
Author
Owner

%%%Next step in making patch ok to be commited.%%%

%%%Next step in making patch ok to be commited.%%%
Author
Owner

%%%Updating patch,%%%

%%%Updating patch,%%%
Author
Owner

%%%Patch has been commited, closing.%%%

%%%Patch has been commited, closing.%%%
Author
Owner

Changed status from 'Open' to: 'Archived'

Changed status from 'Open' to: 'Archived'
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
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
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#27331
No description provided.