UV coordinates for Mesh primitives #37879
Labels
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
11 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#37879
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Currently UV unwrapping some primitives doesn't work nicely, the option to add meshes with generated UVs would be useful.
Primitives that could have this are sphere, cone, cube, etc.
Changed status to: 'Open'
Added subscriber: @brecht
Added subscriber: @michaelknubben
This would be very, very useful.
Another place where auto-generated UV's make sense is on a path/bezier with Bevel above 0. I often use this for quick pipes, and wish I wouldn't have to convert to a mesh to unwrap. Not only is it destructive, but it's actually a somewhat tedious shape to unwrap perfectly straight.
Added subscriber: @kevindietrich
HI,
What are exactly the files to change ? From looking at the source, changes are to be made to
source/blender/editors/mesh/editmesh_add.c
, right ? I believesource/blender/editors/uvedit/uvedit_unwrap_ops.c
should be referenced at some point too.If someone could point me in the right direction, that'd be lovely.
The option to add such UV coordinates should be added to the operators in
source/blender/editors/mesh/editmesh_add.c
.The actual implementation should be in
source/blender/bmesh/operators/bmo_primitive.c
.For reference on how to add UV coordinates to a mesh,
source/blender/editors/uvedit/uvedit_unwrap_ops.c
can be used, though it probably wouldn't be called directly.Added subscriber: @MarceloVaranda
Added subscriber: @PaoloAcampora
Added subscriber: @tanel58
I tried to figure this out before the Phabricator migration but was stumped after a while.
kevindietrich, if you tackled this task, please tell me what you tried, I would like to try this again.
@tanel58: I don't recall exactly what I tried because I'm currently studying hard for cinema (if that makes sense), I've been for the past weeks between my home and Paris where I am right now with a slow laptop on Windows, so no programming on that one :). And that's the main reason why I placed this task up for grabs.
Anyway, IIRC at first I added a simple if statement to evey operator in
source/blender/editors/mesh/editmesh_add.c
that adds a UV texture to the object upon creation of it. Look at "ensure uvs". By doing so every object had some uvs but every vertex was in the same place.Then, taking
source/blender/editors/uvedit/uvedit_unwrap_ops.c
as reference, I tried to add some conditions to the functions insource/blender/bmesh/operators/bmo_primitive.c
to iter through the vertices of the mesh after those were generated to get the uvs. I don't remember the name of it but I think the main element was BM_MESH_ITER, something like that.Again I didn't really had time to deeply look at it due to my studies in Paris which started beginning of February, so anyway, I hope that this time you'll get it to work :).
Removed subscriber: @MarceloVaranda
Added subscriber: @CommanderCorianderSalamander
Would it be unreasonable to do this by default instead of adding it as an option? I've never done any work on Blender and this seems like it could be an okay place to start over the next couple weeks.
Go ahead, I can't pick this up because I'm busy right now, but I would love to see this in Blender :)
Yes please!
Although eventually, I think the option should be provided when creating a primitive, primitives should have them by default.
Well, in my first attempt and as far as I understood what the option was (an if statement saying "if there is no UVs, add some"), primitives had UVs by default. But I failed at getting descent UVs fore each primitive. So the option is not something you would see in the UI.
I'm not sure what you're saying, sorry. If you're wondering where it would be in the interface, it would be an option in the Operator Panel after primitive creation.
So I've been playing around with it for a few days and managed to get default UVs for cubes working ok (yay! though they could be better... but we'll get there =D) - I guess I'll take this now. Hopefully I can get things working reasonably well in the next couple weeks =) this is my first time doing anything open source at all (much less Blender) so we'll see how it goes 0o
Patch submitted, feel free to check it out: D481 =)
This issue was referenced by
3c6709a63c
Changed status from 'Open' to: 'Resolved'
Added subscriber: @GabrielGazzan
I see UVs for the Sphere primitive are really not very useful.
The idea is very good, but I think you should try to improve the UV layout to really make it useful.
You can check the differences in the following images:
Current Blender UV layout: http://a.edu.uy/blender/UVsphere_blender.png
Maya UV layout: http://a.edu.uy/blender/UVsphere_maya.png
Thanks!!
Added subscriber: @CarstenWartmann
Yep, UV not really usefull for sphere...
Carsten