# Can I create UV in geometry nodes?

**URL:** <https://blenderartists.org/t/can-i-create-uv-in-geometry-nodes/1343499>\
**Category:** Modeling\
**Created:** [December 7, 2021, 9:02am UTC](https://blenderartists.org/t/can-i-create-uv-in-geometry-nodes/1343499 "2021-12-07T09:02:50Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ivagr](https://blenderartists.org/letter_avatar_proxy/v4/letter/i/ecb155/32.png) [@Ivagr](https://blenderartists.org/u/Ivagr)\
**Post date:** [December 7, 2021, 9:02am UTC](https://blenderartists.org/t/can-i-create-uv-in-geometry-nodes/1343499/1 "2021-12-07T09:02:50Z")

</div>

For an extruded curve or for mesh primitive?

---

<div class="post-metadata">

**Author:** ![lacer8](https://blenderartists.org/user_avatar/blenderartists.org/lacer8/32/886462_2.png) [@lacer8](https://blenderartists.org/u/lacer8)\
**Post date:** [February 4, 2022, 11:26pm UTC](https://blenderartists.org/t/can-i-create-uv-in-geometry-nodes/1343499/2 "2022-02-04T23:26:40Z")

</div>

I was coming here hoping to find the answer to the same question. I’m betting that there’s currently no way to do it, but it feels like converting curves to uv’ed meshes should be pretty straightforward.

---

<div class="post-metadata">

**Author:** ![zeroskilz](https://blenderartists.org/user_avatar/blenderartists.org/zeroskilz/32/1089470_2.png) [@zeroskilz](https://blenderartists.org/u/zeroskilz)\
**Post date:** [February 5, 2022, 9:32pm UTC](https://blenderartists.org/t/can-i-create-uv-in-geometry-nodes/1343499/3 "2022-02-05T21:32:16Z")

</div>

Weird… I’m having that weird experience where I’m sure I’ve seen this question answered many times on here, but when I did a search I couldn’t find the answer either.

This is actually pretty straight-forward:

 ![image](https://blenderartists.org/uploads/default/original/4X/5/e/5/5e529fe7bb7644c1c962aeb59c9a0d72bb06b69e.jpeg)  
Capture the curve-parameters into a vector and plug that into an output socket… call it whatever you want, then add a new attribute in the modifier panel and access it with the _Attribute_ input node in the _Shader Editor_ (you still have to manually type the name in (which will hopefully get improved)).

---

<div class="post-metadata">

**Author:** ![lacer8](https://blenderartists.org/user_avatar/blenderartists.org/lacer8/32/886462_2.png) [@lacer8](https://blenderartists.org/u/lacer8)\
**Post date:** [February 10, 2022, 2:28am UTC](https://blenderartists.org/t/can-i-create-uv-in-geometry-nodes/1343499/4 "2022-02-10T02:28:36Z")

</div>

Thank you! I’ll give this a try. 🙂

---

<div class="post-metadata">

**Author:** ![lacer8](https://blenderartists.org/user_avatar/blenderartists.org/lacer8/32/886462_2.png) [@lacer8](https://blenderartists.org/u/lacer8)\
**Post date:** [February 11, 2022, 2:06am UTC](https://blenderartists.org/t/can-i-create-uv-in-geometry-nodes/1343499/5 "2022-02-11T02:06:31Z")

</div>

Hey Zeroskilz, it seems like your name is wrong! Ha ha.  
Anyway, thanks for this, I tried it out last night. Some of my nodes were different, but I was able to find comparable nodes and make it work… with one caveat. It seems like this doesn’t assign uvs to the filled caps. Dunno if that’s possible. I sure hope that we get more uv nodes in future releases!

 ![geoNodesUVs02](https://blenderartists.org/uploads/default/original/4X/7/d/8/7d81171ca4e6c4b5ef6afd8fd45a0ebc2c0da29b.jpeg)

---

<div class="post-metadata">

**Author:** ![zeroskilz](https://blenderartists.org/user_avatar/blenderartists.org/zeroskilz/32/1089470_2.png) [@zeroskilz](https://blenderartists.org/u/zeroskilz)\
**Post date:** [February 12, 2022, 2:28pm UTC](https://blenderartists.org/t/can-i-create-uv-in-geometry-nodes/1343499/6 "2022-02-12T14:28:03Z")

</div>

Hi, thanks…

You’ll actually notice an issue where UVs also get squashed for any cyclic curves you use in curve-to-mesh…

I’ve uploaded a partial fix to this issue here:

> [@Disconnect Cyclic Curves Node-Group for Blender 3.0 (Geometry Nodes)](https://blenderartists.org/t/disconnect-cyclic-curves-node-group-for-blender-3-0-geometry-nodes/1361127):
>
> [Disconnect-Cyclic-Curve (3.0).blend](https://blenderartists.org/uploads/short-url/vPt42S5fazQv8zI7DrlULS48ONe.blend) (125.0 KB) Introducing the amazing Disconnect Cyclic Curves node-group. Works on Cyclic Bezier Curves also. Can help with curve-to-mesh unwraps: [UV-TEST] Easy-To-Use Node-group: [image] Use the built-in Poly To Bezier option to “align” the disconnected end-points so it works with other nodes like Curve-To-Mesh. File includes the Blender 3.0 workaround which helps get rid of the “seam” when smooth-shading by welding a hidden version and transferring the…

The idea is to disconnect any cyclic curves so you get the full UV range for the geometry, but it does mean that with “shade-smooth” you’ll get a obvious seam - I included a modifier-based fix for this issue also as an example.

> **Originional issue discussion here:**
>
> ([Geometry Nodes - #2976 by zeroskilz](https://blenderartists.org/t/geometry-nodes/1264425/2976))

---

<div class="post-metadata">

**Author:** ![Siuan803](https://blenderartists.org/user_avatar/blenderartists.org/siuan803/32/734406_2.png) [@Siuan803](https://blenderartists.org/u/Siuan803)\
**Post date:** [February 18, 2022, 9:51pm UTC](https://blenderartists.org/t/can-i-create-uv-in-geometry-nodes/1343499/7 "2022-02-18T21:51:51Z")

</div>

You’ve got the correct idea, but it doesn’t work porperly when using “closed” curve primitives as a profile (circle, quadrilateral or star ) . I got to work correctly though… more on it in the video [GN uv fix](https://youtu.be/vwAkeLRmcjs)

Does anyone have ideas on how to handle the caps ?

---

<div class="post-metadata">

**Author:** ![zeroskilz](https://blenderartists.org/user_avatar/blenderartists.org/zeroskilz/32/1089470_2.png) [@zeroskilz](https://blenderartists.org/u/zeroskilz)\
**Post date:** [February 18, 2022, 10:58pm UTC](https://blenderartists.org/t/can-i-create-uv-in-geometry-nodes/1343499/8 "2022-02-18T22:58:38Z")

</div>

Hi, check the [previous response](https://blenderartists.org/t/can-i-create-uv-in-geometry-nodes/1343499/6) and the [disconnect-cyclic-curves](https://blenderartists.org/t/disconnect-cyclic-curves-node-group-for-blender-3-0-geometry-nodes/1361127) node-group… Does that for any curve, including Beziers (With option to pre-convert poly-curves to Beziers so the end-points match up with Curve-to-Mesh on cyclic base-curves).

It includes a fix for the seam for smooth-shaded geometry that works in Blender 3.0

---

<div class="post-metadata">

**Author:** ![sozap](https://blenderartists.org/user_avatar/blenderartists.org/sozap/32/443872_2.png) [@sozap](https://blenderartists.org/u/sozap)\
**Post date:** [February 18, 2022, 11:09pm UTC](https://blenderartists.org/t/can-i-create-uv-in-geometry-nodes/1343499/9 "2022-02-18T23:09:37Z")

</div>

I think handling the caps will be far more involved…  
Maybe something along the lines of storing the point position of the profile before the Curve to Mesh,  
Then isolating the caps and adding their position to the UV map…

In the meantime there is this patch : [https://developer.blender.org/D12482](https://developer.blender.org/D12482)  
So there is maybe no need to struggle too much with it , unless you want it right here , right now 😃

---

<div class="post-metadata">

**Author:** ![zeroskilz](https://blenderartists.org/user_avatar/blenderartists.org/zeroskilz/32/1089470_2.png) [@zeroskilz](https://blenderartists.org/u/zeroskilz)\
**Post date:** [February 18, 2022, 11:17pm UTC](https://blenderartists.org/t/can-i-create-uv-in-geometry-nodes/1343499/10 "2022-02-18T23:17:27Z")

</div>

Nice… 👍

For Blender 3.0 there are workarounds - you can capture the profile’s positions in X-Y 2D and you can use that as a separate coordinate in the Shader Editor. This is generally good enough as you seldom use the same texture for the sides as you do for the caps.

---

<div class="post-metadata">

**Author:** ![sozap](https://blenderartists.org/user_avatar/blenderartists.org/sozap/32/443872_2.png) [@sozap](https://blenderartists.org/u/sozap)\
**Post date:** [February 18, 2022, 11:27pm UTC](https://blenderartists.org/t/can-i-create-uv-in-geometry-nodes/1343499/11 "2022-02-18T23:27:28Z")

</div>

Yes thanks ! Seems a bit simpler than what I thought !  
It’s cool that at some point we don’t have to add 7 nodes just to output the UVs 😃  
But in the meantime it’s great to have some workarounds !

---

<div class="post-metadata">

**Author:** ![zeroskilz](https://blenderartists.org/user_avatar/blenderartists.org/zeroskilz/32/1089470_2.png) [@zeroskilz](https://blenderartists.org/u/zeroskilz)\
**Post date:** [February 18, 2022, 11:57pm UTC](https://blenderartists.org/t/can-i-create-uv-in-geometry-nodes/1343499/12 "2022-02-18T23:57:48Z")

</div>

> [@sozap](#):
>
> …7 nodes just to output the UVs 😃

7 nodes… Ha! 🤣

 ![image](https://blenderartists.org/uploads/default/original/4X/f/6/a/f6a359fdb11081169efa398057ae59ddf79e15a2.png)

… That’s what the Blender 3.0 workaround for cap UVs looks like  
To do something like this:

 ![image](https://blenderartists.org/uploads/default/original/4X/b/e/4/be4f701b07c51a467293fe1d08a4c3476a5cb99b.jpeg)

Yeah, I do look forward to it being easier 😮‍💨

In the meantime, I’ll add UV outputs to all my 3.0 curve-to-mesh node-groups with cap UVs and mask… just in-case it doesn’t make it into 3.1. 😅

Fill-Curve-3D would be nice also.

---

<div class="post-metadata">

**Author:** ![sozap](https://blenderartists.org/user_avatar/blenderartists.org/sozap/32/443872_2.png) [@sozap](https://blenderartists.org/u/sozap)\
**Post date:** [February 19, 2022, 12:25am UTC](https://blenderartists.org/t/can-i-create-uv-in-geometry-nodes/1343499/13 "2022-02-19T00:25:00Z")

</div>

Hum, yess @zeroskilz … I was a bit too optimistic…  
Here is is the approach I had in mind, a bit simpler but it won’t work for your case…

 ![image](https://blenderartists.org/uploads/default/original/4X/d/3/4/d345f568c6464c3e6324287dab428c09e02f613e.jpeg)  
[Curve\_Caps\_UV.blend](https://blenderartists.org/uploads/short-url/broqRYOJhY5vqaAsnSDpkVNg2rY.blend) (145.8 KB)

---

<div class="post-metadata">

**Author:** ![zeroskilz](https://blenderartists.org/user_avatar/blenderartists.org/zeroskilz/32/1089470_2.png) [@zeroskilz](https://blenderartists.org/u/zeroskilz)\
**Post date:** [February 19, 2022, 12:30am UTC](https://blenderartists.org/t/can-i-create-uv-in-geometry-nodes/1343499/14 "2022-02-19T00:30:04Z")

</div>

True - as soon as you disconnect the profile you lose the caps, so you then need to manually reattach them (the whole fill-curve-set-position thing like I had to do…)

No reason why I can’t also mix the UVs tho, the mask should be enough to distinguish coordinates in the Shader Editor, so thanks for that tip 👍

---

<div class="post-metadata">

**Author:** ![sozap](https://blenderartists.org/user_avatar/blenderartists.org/sozap/32/443872_2.png) [@sozap](https://blenderartists.org/u/sozap)\
**Post date:** [February 19, 2022, 12:40am UTC](https://blenderartists.org/t/can-i-create-uv-in-geometry-nodes/1343499/15 "2022-02-19T00:40:06Z")

</div>

Damn ! I forgot about it, now I understand better all this necessary evil !!  
It’s fascinating how hard it is to do these simple stuff, but still there is a way by adding an insane amount of nodes…  
I don’t know what to think about it… I’ll ask my therapist …

---

<div class="post-metadata">

**Author:** ![zeroskilz](https://blenderartists.org/user_avatar/blenderartists.org/zeroskilz/32/1089470_2.png) [@zeroskilz](https://blenderartists.org/u/zeroskilz)\
**Post date:** [February 19, 2022, 8:54am UTC](https://blenderartists.org/t/can-i-create-uv-in-geometry-nodes/1343499/16 "2022-02-19T08:54:34Z")

</div>

> [@Siuan803](#):
>
> Does anyone have ideas on how to handle the caps ?

Try this:

> [@Curve-To-Mesh with UVs node-group for Blender 3.0/4.0 (Geometry Nodes)](https://blenderartists.org/t/curve-to-mesh-with-uvs-node-group-for-blender-3-0-geometry-nodes/1362714):
>
> [Curve-To-Mesh UVs (Blender 3.0).blend](https://blenderartists.org/uploads/short-url/k5dOHHJSfsnRmq9CORPZgpCOtJx.blend) (121.5 KB) [CurveToMeshUVs(4.0).blend](https://blenderartists.org/uploads/short-url/fjQz3aGgLWLxdVcWdPJLSOCLU0U.blend) (126.3 KB) Hi. In the included file is a utility node-group that simplifies getting UVs from a curve-to-mesh. This includes the [Disconnect Cyclic Curves](https://blenderartists.org/t/disconnect-cyclic-curves-node-group-for-blender-3-0-geometry-nodes/1361127) node-group (See that file for example for smooth-shaded seam removal) [image] Use like regular curve-to-mesh: [image] … but has additional options to disconnect the curve or profile. Exported UVs can be combined with the CAPMASK like so: [image] …Remember to set …

---

<div class="post-metadata">

**Author:** ![Siuan803](https://blenderartists.org/user_avatar/blenderartists.org/siuan803/32/734406_2.png) [@Siuan803](https://blenderartists.org/u/Siuan803)\
**Post date:** [February 19, 2022, 6:03pm UTC](https://blenderartists.org/t/can-i-create-uv-in-geometry-nodes/1343499/17 "2022-02-19T18:03:01Z")

</div>

Nice work! I was exploring another route for disconnecting by resampling the curve to the curve’s domain size plus 1 and then repositioning all points to their original places and the last one on top of the first. worked out well with cyclic curves but it had trouble handling non cyclic curves whereas this method habdles both whit relative ease 🙂 Had some trouble wrapping my brain arroud how the subdivide curve figures out what to divide, but hei it works…

Anyway this was my attempt at disconnecting curves  
[gn uv fix blend.blend](https://blenderartists.org/uploads/short-url/h0fcPriW1XVVrGbZ2gXlxKgkVoF.blend) (703.4 KB)  
if anyone is interested 😅

---

<div class="post-metadata">

**Author:** ![zeroskilz](https://blenderartists.org/user_avatar/blenderartists.org/zeroskilz/32/1089470_2.png) [@zeroskilz](https://blenderartists.org/u/zeroskilz)\
**Post date:** [February 19, 2022, 6:17pm UTC](https://blenderartists.org/t/can-i-create-uv-in-geometry-nodes/1343499/18 "2022-02-19T18:17:55Z")

</div>

> [@Siuan803](#):
>
> Had some trouble wrapping my brain arroud how the subdivide curve figures out what to divide

Yeah, I needed help with that. Lots of tricks rely on the fact that in Blender GN, _a Boolean **true** auto-converts to a **1 or 1.0** (for integers or floats)_. @Xeofrios pointed out the subdivide trick using the end-point selectors which made the disconnect node-group possible (since the _cuts_ input is a _field_) - didn’t occur to me before then. 🤦‍♂️
