Unable to create manual curve to mesh UV with spline parameter #93811

Open
opened 2021-12-07 12:47:14 +01:00 by michael campbell · 27 comments

System Information
Operating system: Windows-10-10.0.19042-SP0 64 Bits
Graphics card: NVIDIA GeForce GTX 1070/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 472.12

Blender Version
Broken: version: 3.1.0 Alpha, branch: master, commit date: 2021-12-02 18:49, hash: 56ff954030
Worked: (newest version of Blender that worked as expected)

Below file is creating uv's from the curve length and profile and then outputting as a custom_UV attribute. There seems to be squashing happening at the beginning and end.

spline parameter fac bug.blend

image.png

**System Information** Operating system: Windows-10-10.0.19042-SP0 64 Bits Graphics card: NVIDIA GeForce GTX 1070/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 472.12 **Blender Version** Broken: version: 3.1.0 Alpha, branch: master, commit date: 2021-12-02 18:49, hash: `56ff954030` Worked: (newest version of Blender that worked as expected) Below file is creating uv's from the curve length and profile and then outputting as a custom_UV attribute. There seems to be squashing happening at the beginning and end. [spline parameter fac bug.blend](https://archive.blender.org/developer/F12704164/spline_parameter_fac_bug.blend) ![image.png](https://archive.blender.org/developer/F12704168/image.png)

Added subscriber: @3di

Added subscriber: @3di

#103908 was marked as duplicate of this issue

#103908 was marked as duplicate of this issue

#93503 was marked as duplicate of this issue

#93503 was marked as duplicate of this issue

only seems to happen on cyclic curves.

only seems to happen on cyclic curves.
Member

Added subscriber: @JacquesLucke

Added subscriber: @JacquesLucke
Member

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

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

Looks like the Spline parameter node does not handle cyclic splines correctly. Note that a fix to the node will probably only work when you also change the domain of the group output to face-corner.

Looks like the Spline parameter node does not handle cyclic splines correctly. Note that a fix to the node will probably only work when you also change the domain of the group output to face-corner.
Member

Added subscriber: @HooglyBoogly

Added subscriber: @HooglyBoogly
Member

Sadly it's not that simple, this is more of a fundamental limitation with the current design of curves. One that I hadn't run into before actually.
{F12704446 size=full}
Since attributes are stored on spline control points, this interpolation from almost 1 to 0 in the last point is inevitable.

Feels like we should design a way around this, but it is not a bug for now. I'm on the fence about known issue vs. archived, but I'll keep it around as a reminder about this.

Sadly it's not that simple, this is more of a fundamental limitation with the current design of curves. One that I hadn't run into before actually. {[F12704446](https://archive.blender.org/developer/F12704446/image.png) size=full} Since attributes are stored on spline control points, this interpolation from almost 1 to 0 in the last point is inevitable. Feels like we should design a way around this, but it is not a bug for now. I'm on the fence about known issue vs. archived, but I'll keep it around as a reminder about this.
Hans Goudey changed title from incorrect attribute values when creating from spline parameter's fac to Unable to create manual curve to mesh UV with spline parameter 2021-12-07 14:56:03 +01:00

Added subscriber: @Chase-Kubesh

Added subscriber: @Chase-Kubesh

For now, here's a workaround. A little hacky but thats life. You end up with duplicate verts at index 0 and 1 of the circle, as thats the only way to fix it for now {F12826647 size=full} ProperUVsHack.blend

For now, here's a workaround. A little hacky but thats life. You end up with duplicate verts at index 0 and 1 of the circle, as thats the only way to fix it for now {[F12826647](https://archive.blender.org/developer/F12826647/image.png) size=full} [ProperUVsHack.blend](https://archive.blender.org/developer/F12826650/ProperUVsHack.blend)

Added subscribers: @Sanctus, @Garek

Added subscribers: @Sanctus, @Garek

Added subscriber: @null

Added subscriber: @null

Added subscriber: @IihT2cWA9xiP30BsYphz3EiEISNoScoe

Added subscriber: @IihT2cWA9xiP30BsYphz3EiEISNoScoe

Added subscriber: @owei

Added subscriber: @owei

Hi there!
Any news on this? Would be a pity NOT to be able to use custom closed curves in Geometry Nodes.
I have to use Houdini instead to get proper UVs on a closed curve?
Thanks!

Cheers,
oliver

Hi there! Any news on this? Would be a pity NOT to be able to use custom closed curves in Geometry Nodes. I have to use Houdini instead to get proper UVs on a closed curve? Thanks! Cheers, oliver
Member

This really needs some research and thought IMO.
One way to solve it that I would be interested in exploring is adding a choice of interpolation methods to the store named attribute and capture attribute nodes, AKA "attribute metadata". That would tell the node the attribute is meant to be used as a UV, so it should move it to the face corner domain (and somehow choose a proper value for the last corner??)

This really needs some research and thought IMO. One way to solve it that I would be interested in exploring is adding a choice of interpolation methods to the store named attribute and capture attribute nodes, AKA "attribute metadata". That would tell the node the attribute is meant to be used as a UV, so it should move it to the face corner domain (and somehow choose a proper value for the last corner??)

maybe until you come up with that you could just add a closed/open curve option to the curve nodes. So the circle node for example would have two points (an end and a start) in the same location.

maybe until you come up with that you could just add a closed/open curve option to the curve nodes. So the circle node for example would have two points (an end and a start) in the same location.

or in the set spline cyclic node you could have an 'align first to last' checkbox?

or in the set spline cyclic node you could have an 'align first to last' checkbox?

@HooglyBoogly have you checked how the standard curve code does it?

Right is a standard curve, left is a geometry node curve. Maybe you could just copy what someone's already done in the standard curves?

image.png

@HooglyBoogly have you checked how the standard curve code does it? Right is a standard curve, left is a geometry node curve. Maybe you could just copy what someone's already done in the standard curves? ![image.png](https://archive.blender.org/developer/F13288805/image.png)
Member

Thanks for the comparison. It's not a question of whether it's possible or how the code would work, it's a question of making the design consistent with elsewhere in geometry nodes and generic enough that we don't need to refactor it in a few months. For example, how would it choose which attributes to interpolate this way?

Thanks for the comparison. It's not a question of whether it's possible or how the code would work, it's a question of making the design consistent with elsewhere in geometry nodes and generic enough that we don't need to refactor it in a few months. For example, how would it choose which attributes to interpolate this way?

Added subscriber: @mod_moder

Added subscriber: @mod_moder

I think the simplest is the vertex domain for the edge
like Edge Corner
But this is a head-on decision that requires huge changes.

You can infer Face Corner with a length factor

You can design nodes that have a FieldContext with multiple values, so that the user himself implements the value mixing function to implemetd field on domain node group

There can be many options, if you want, on RCS you can write the most thoughtful and useful

I think the simplest is the vertex domain for the edge like Edge Corner But this is a head-on decision that requires huge changes. You can infer Face Corner with a length factor You can design nodes that have a FieldContext with multiple values, so that the user himself implements the value mixing function to implemetd field on domain node group There can be many options, if you want, on RCS you can write the most thoughtful and useful

@HooglyBoogly for the uv, you'd just use spline factor to set 1st point = uv 0, last point = uv 1. first and last point would be in the same location for closed curves, which would resolve the issue we have here of not being able to store two uv values on the same point which is leading to a non seamless UV. To my recollection this is how closed splines are able to provide uv's in H (they're not actually closed). Interpolation of the UV's is done in the shader if I understood you correctly, but could be done with a spline factor to get the value of a different attribute at an interpolated point in geometry nodes.

@HooglyBoogly for the uv, you'd just use spline factor to set 1st point = uv 0, last point = uv 1. first and last point would be in the same location for closed curves, which would resolve the issue we have here of not being able to store two uv values on the same point which is leading to a non seamless UV. To my recollection this is how closed splines are able to provide uv's in H (they're not actually closed). Interpolation of the UV's is done in the shader if I understood you correctly, but could be done with a spline factor to get the value of a different attribute at an interpolated point in geometry nodes.

Added subscriber: @Tolkfan

Added subscriber: @Tolkfan

Added subscriber: @Deviner

Added subscriber: @Deviner

Added subscriber: @Leroy-Xie

Added subscriber: @Leroy-Xie
Philipp Oeser removed the
Interest
Nodes & Physics
label 2023-02-10 08:44:20 +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 project
No Assignees
12 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#93811
No description provided.