How to create uv along the line vector in Polyexpand2d ?
3239 9 2- dreamerflyer19
- Member
- 54 posts
- Joined: 10月 2017
- Offline
- Konstantin Magnus
- Member
- 670 posts
- Joined: 9月 2013
- Offline
You can activate the edgedist attribute from polyexpand for one UV-direction.
https://procegen.konstantinmagnus.de/ [procegen.konstantinmagnus.de]
- dreamerflyer19
- Member
- 54 posts
- Joined: 10月 2017
- Offline
- krueger
- Member
- 191 posts
- Joined: 10月 2018
- Offline
You can create a “u” attribute on the curves as a point attribute using $PT/($NPT - 1). Then polyexpand2d turning on the edgedist, then promote the u to vertices and in a vertex wrangle use this:
But for another process, how about using a sweep sop? Use your curves for your road with a “u” attribute, then a straight line with a “v” attribute for the road width. And combine them later as the uv attribute.
I did have to make the u a point attribute in both cases and promote it to vertices after doing the polyexpand or sweep…
v@uv = set(f@u, f@edgedist / `ch("../polyexpand2d1/offset")`, 0);
But for another process, how about using a sweep sop? Use your curves for your road with a “u” attribute, then a straight line with a “v” attribute for the road width. And combine them later as the uv attribute.
I did have to make the u a point attribute in both cases and promote it to vertices after doing the polyexpand or sweep…
- dreamerflyer19
- Member
- 54 posts
- Joined: 10月 2017
- Offline
mkpsthanks your idea,but i think , it is hard for outside point to set the “u” attribute according the center curve's point.
You can create a “u” attribute on the curves as a point attribute using $PT/($NPT - 1). Then polyexpand2d turning on the edgedist, then promote the u to vertices and in a vertex wrangle use this:v@uv = set(f@u, f@edgedist / `ch("../polyexpand2d1/offset")`, 0);
But for another process, how about using a sweep sop? Use your curves for your road with a “u” attribute, then a straight line with a “v” attribute for the road width. And combine them later as the uv attribute.
I did have to make the u a point attribute in both cases and promote it to vertices after doing the polyexpand or sweep…
- Konstantin Magnus
- Member
- 670 posts
- Joined: 9月 2013
- Offline
- dreamerflyer19
- Member
- 54 posts
- Joined: 10月 2017
- Offline
- Konstantin Magnus
- Member
- 670 posts
- Joined: 9月 2013
- Offline
Better treat crossings and road segments separately. I haven't seen too many convincing solutions for crossings, though.
https://procegen.konstantinmagnus.de/ [procegen.konstantinmagnus.de]
- rpopovici
- Member
- 31 posts
- Joined: 3月 2017
- Offline
Anyway, in reality you have only a few types of crossings like: X shape, T shape and ring.. If you want quads only, then you can extrude each curve separately which will result in overlaping intersections. Then you can offset intersecting polygons along Y axis a little bit to avoid Z-fighting.
My take on this - quads only, except for crossings.
My take on this - quads only, except for crossings.
- dreamerflyer19
- Member
- 54 posts
- Joined: 10月 2017
- Offline
rpopovicigreat idea! want make better~~,whether can add new point on the triangle at the end of each line ,I think will make a correct uv~ u dir is from middle point ,and outside is v dir .
Anyway, in reality you have only a few types of crossings like: X shape, T shape and ring.. If you want quads only, then you can extrude each curve separately which will result in overlaping intersections. Then you can offset intersecting polygons along Y axis a little bit to avoid Z-fighting.
My take on this - quads only, except for crossings.
Edited by dreamerflyer19 - 2019年5月11日 14:12:28
-
- Quick Links