Texture Displacement Sculpting design #73935

Open
opened 2020-02-17 19:01:40 +01:00 by Pablo Dobarro · 18 comments
Member

Texture Displacement Sculpting

Some things originally in this task have moved to #96223 (PBVH image texture painting technical design) and #96225 (PBVH image texture painting implementation).

The idea here is to build on the above tasks, and make sculpt tools work with displacement textures and normal maps.

For some workflows this is a huge improvement. Game artist that rely on high poly sculpts and baking tools to create details in assets for game engines won’t need any of that anymore. They will be able to use a fully feature sculpting system to add the detail to the textures of the model directly.

This is obviously going to fail and create a lot of artifacts if the sculpted deformation is too big, but that is not the initial idea (that is also going to fail if the the high res sculpt and the low res mesh shape differ too much). The idea is to avoid using high poly sculpts to add surface detail when it is not necessary, and for surface detail, this approach should work fine.

I can’t evaluate the performance of this sculpting mode, but if we add UDIM support to the ##PBVH_TEXTURE## (should not be hard to do, specially if we don’t support faces across different UDIM tiles) and the performance is OK, it could potentially allow to sculpt surface detail on models with a much higher resolution than any other solution based on mesh geometry and vertex deformation.

To implement this, the idea is to add a second buffer that stores the vectors to get the “deformed” 3D coordinates, and its normals. When iterating over the vertices in ##PBVH_ITER_BEGIN##, the ##vd.co## will be calculated by using the original 3D position of the vertex + displacement vector stored in the buffer. It should be possible to write this information to the texture to get a displacement texture and it should also be possible to write the normals calculated when the ##PBVH_UpdateNormals## flag is processed to get a normal map.

Possible Issues

  • I’m still not sure how this is going to work across seams. I think that if we add some extra padding pixels to the node which contains that face as if we were extending the face in 3D space it should be fine, but hard to know without trying it.
  • I’m also not sure what kind of performance we can expect out of this, but even if performance is not the best, we can still try to code it to support some of its features, like sculpting information to the textures.

Technical Requirements

  • Implement the neighbor iterator in the sculpt API
  • Implement the deformed coordinates buffer and the normal map/vector displacement calculations
  • Update the Sculpt API to read data from the coordinates buffer
  • Add the Sculpt Mode UI to support textures
  • Add normal map/displacement support to workbench (If possible, we can use EEVEE instead if that is hard to do)
## Texture Displacement Sculpting Some things originally in this task have moved to #96223 (PBVH image texture painting technical design) and #96225 (PBVH image texture painting implementation). The idea here is to build on the above tasks, and make sculpt tools work with displacement textures and normal maps. For some workflows this is a huge improvement. Game artist that rely on high poly sculpts and baking tools to create details in assets for game engines won’t need any of that anymore. They will be able to use a fully feature sculpting system to add the detail to the textures of the model directly. This is obviously going to fail and create a lot of artifacts if the sculpted deformation is too big, but that is not the initial idea (that is also going to fail if the the high res sculpt and the low res mesh shape differ too much). The idea is to avoid using high poly sculpts to add surface detail when it is not necessary, and for surface detail, this approach should work fine. I can’t evaluate the performance of this sculpting mode, but if we add UDIM support to the ##PBVH_TEXTURE## (should not be hard to do, specially if we don’t support faces across different UDIM tiles) and the performance is OK, it could potentially allow to sculpt surface detail on models with a much higher resolution than any other solution based on mesh geometry and vertex deformation. To implement this, the idea is to add a second buffer that stores the vectors to get the “deformed” 3D coordinates, and its normals. When iterating over the vertices in ##PBVH_ITER_BEGIN##, the ##vd.co## will be calculated by using the original 3D position of the vertex + displacement vector stored in the buffer. It should be possible to write this information to the texture to get a displacement texture and it should also be possible to write the normals calculated when the ##PBVH_UpdateNormals## flag is processed to get a normal map. ### Possible Issues - I’m still not sure how this is going to work across seams. I think that if we add some extra padding pixels to the node which contains that face as if we were extending the face in 3D space it should be fine, but hard to know without trying it. - I’m also not sure what kind of performance we can expect out of this, but even if performance is not the best, we can still try to code it to support some of its features, like sculpting information to the textures. ### Technical Requirements - Implement the neighbor iterator in the sculpt API - Implement the deformed coordinates buffer and the normal map/vector displacement calculations - Update the Sculpt API to read data from the coordinates buffer - Add the Sculpt Mode UI to support textures - Add normal map/displacement support to workbench (If possible, we can use EEVEE instead if that is hard to do)
Pablo Dobarro self-assigned this 2020-02-17 19:01:40 +01:00
Author
Member

Added subscriber: @PabloDobarro

Added subscriber: @PabloDobarro

Added subscriber: @Constantina32

Added subscriber: @Constantina32

Added subscriber: @Andruxa696

Added subscriber: @Andruxa696
Member

Changed status from 'Needs Triage' to: 'Confirmed'

Changed status from 'Needs Triage' to: 'Confirmed'

Added subscriber: @PetterLundh

Added subscriber: @PetterLundh
Member

Added subscriber: @Mets

Added subscriber: @Mets
Member

Sculpt Mode, Texture paint and Vertex Paint will run on the exact same code

Is it fair to assume that this also includes Weight Paint, since it's probably already sharing most code with Vertex Paint?

> Sculpt Mode, Texture paint and Vertex Paint will run on the exact same code Is it fair to assume that this also includes Weight Paint, since it's probably already sharing most code with Vertex Paint?

Added subscriber: @AlRedd-3

Added subscriber: @AlRedd-3

This is a game changer for realistic character workflows!!! Especially texture displacement Sculpting!!

This is a game changer for realistic character workflows!!! Especially texture displacement Sculpting!!

Added subscriber: @kfir

Added subscriber: @kfir

Added subscriber: @SpectreFirst

Added subscriber: @SpectreFirst

Added subscriber: @Grady

Added subscriber: @Grady

@PabloDobarro Would this change make it possible to draw to multiple textures concurrently with different colour values?

Like for example, creating a custom brush for painting "bolts", with textures for albedo, metallic, roughness, specular, displacement, etc, and painting those textures directly onto a surface in one go?

@PabloDobarro Would this change make it possible to draw to multiple textures concurrently with different colour values? Like for example, creating a custom brush for painting "bolts", with textures for albedo, metallic, roughness, specular, displacement, etc, and painting those textures directly onto a surface in one go?

Added subscriber: @SirPigeonz

Added subscriber: @SirPigeonz

Added subscriber: @ivpe

Added subscriber: @ivpe

Added subscriber: @zhouxiang

Added subscriber: @zhouxiang
Brecht Van Lommel changed title from PBVH_TEXTURE Design to Texture Displacement Sculpting design 2022-04-06 19:17:33 +02:00

Added subscriber: @Sergi-Alberca-Santamaria

Added subscriber: @Sergi-Alberca-Santamaria

Added subscriber: @GeorgiaPacific

Added subscriber: @GeorgiaPacific
Julien Kaspar added this to the Sculpt, Paint & Texture project 2023-02-08 10:26:20 +01:00
Philipp Oeser removed the
Interest
Sculpt, Paint & Texture
label 2023-02-10 09:12:36 +01:00
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 Assignees
15 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#73935
No description provided.