Improve performance of "Smart UV Project" #76532

Closed
opened 2020-05-08 05:20:47 +02:00 by Campbell Barton · 14 comments

Currently smart uv projection is written in Python which has poor performance for multi-million polygon meshes (see #76527 (Smart UV Project)).

Note that a direct port of this to C may still have performance issues, it may be necessary to re-consider the exact method used, however that doesn't have to be part of the initial version.

Currently smart uv projection is written in Python which has poor performance for multi-million polygon meshes (see #76527 (Smart UV Project)). Note that a direct port of this to C may still have performance issues, it may be necessary to re-consider the exact method used, however that doesn't have to be part of the initial version.
Author
Owner

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

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

Added subscriber: @ideasman42

Added subscriber: @ideasman42
Campbell Barton changed title from Rewrite "Smart UV Project" in C to Improve performance of "Smart UV Project" 2020-05-08 05:23:16 +02:00

Added subscriber: @Jmantastic

Added subscriber: @Jmantastic

Do you recommend other ways to handle large uv mapping tasks with little manual work? In cases like lidar scans I definitely wouldn't be going for best quality, but just something to get the task done in a decent amount of time.

Do you recommend other ways to handle large uv mapping tasks with little manual work? In cases like lidar scans I definitely wouldn't be going for best quality, but just something to get the task done in a decent amount of time.

Added subscriber: @ckohl_art

Added subscriber: @ckohl_art
Member

Added subscriber: @zazizizou

Added subscriber: @zazizizou

Added subscriber: @alether

Added subscriber: @alether

I will try doing this as my first issue, seems like a good way to familiarize myself with blender's C codebase. My plan is to port it straight to C and use the appropriate data structure to try and speed the process up.

I'll give an update in a couple of days on the progress.

I will try doing this as my first issue, seems like a good way to familiarize myself with blender's C codebase. My plan is to port it straight to C and use the appropriate data structure to try and speed the process up. I'll give an update in a couple of days on the progress.

Do we have any example of using 2d dynamic arrays using blender's BLI data structure libraries ?

I need it in order to port getUvIslands and packIslands

Do we have any example of using 2d dynamic arrays using blender's BLI data structure libraries ? I need it in order to port getUvIslands and packIslands

Added subscriber: @xdanic

Added subscriber: @xdanic

Meshroom uses different algorithms for UVing and it's open source. Maybe we could port those methods.

Meshroom uses different algorithms for UVing and it's open source. Maybe we could port those methods.

I think I managed to port most of the existing python algorithm to C. Just need to find a way to use existing functions to pack the UV islands and try out some edge cases.

I'll open up a diff once it's done

I think I managed to port most of the existing python algorithm to C. Just need to find a way to use existing functions to pack the UV islands and try out some edge cases. I'll open up a diff once it's done

Here is the diff,
https://developer.blender.org/D8311

I'm still retaining the old operator in case someone wants to do an arc patch and compare. If you find any bugs or edge cases feel free to notify me

Here is the diff, https://developer.blender.org/D8311 I'm still retaining the old operator in case someone wants to do an arc patch and compare. If you find any bugs or edge cases feel free to notify me
Author
Owner

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'
Campbell Barton self-assigned this 2020-07-26 13:41:46 +02: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 project
No Assignees
6 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#76532
No description provided.