How would you make strips pattern out of a grid?
5244 5 2-
- booger
- Member
- 32 posts
- Joined: Feb. 2015
- Offline
I am using attribtransfer to transfer red boxes to a grid and then trying to delete the red points….but I am wondering would that be a good one to do so because my results are not what I am thought would be…., the red points within the box turned out to be not solid and the delete sop is not delete any red color….wonder why.
Basically, I am trying to make a basic strips pattern out of a grid so I have tried cookie sop and now attribtransfer…..both seems to be not good ways. Later on, I want to create strips along a curvy path but I can't even make out of a straight grid….
Could anyone help me with this?
Basically, I am trying to make a basic strips pattern out of a grid so I have tried cookie sop and now attribtransfer…..both seems to be not good ways. Later on, I want to create strips along a curvy path but I can't even make out of a straight grid….
Could anyone help me with this?
-
- mestela
- Member
- 1853 posts
- Joined: May 2006
- Offline
-
- blackpixel
- Member
- 182 posts
- Joined: April 2009
- Offline
-
- booger
- Member
- 32 posts
- Joined: Feb. 2015
- Offline
Thanks, mestela!
Never thought UVs can help such things….still not wrapping around my head in that area yet but I am liking the approach!
I changed @uv to @uv instead, and it gives a start of a zebra crossing look, would that be the idea?
And it won't be starting at the beginning of the line if I want them to be equal length between, right?
Never thought UVs can help such things….still not wrapping around my head in that area yet but I am liking the approach!
I changed @uv to @uv instead, and it gives a start of a zebra crossing look, would that be the idea?
And it won't be starting at the beginning of the line if I want them to be equal length between, right?
-
- mestela
- Member
- 1853 posts
- Joined: May 2006
- Offline
Yep, using @uv will give you a zebra crossing look.
As you've noticed, this has a problem with the lines going fat and thin, mainly because for this little example the ribbon we're extruding is so wide, the curve has very sharp turns, and the sweep sop tries to orient the cross-sections along the curve, making the resultant shape act like a stretchy rubber surface.
Always many ways to skin many cats in houdini, here's some others…
If you use a copy sop rather than a sweep, as long as you don't include any orientation attributes, the copies will all keep the same orientation, ie, they'll all stay parallel.
Append a skin to convert all those curves into a mesh again, and the rest is basically the same as before. I've also shown that you can vary the width of the stripes vs the width of the gaps by blasting at different colour values. If you visualise a sine wave, it oscillates between 1 and -1, with the center at 0. If you blast values less than 0, the gaps are the same width as the stripes. If you blast at 0.9, you get thin stripes, and wide gaps. If you blast at -0.5, you get wide stripes and thin gaps.
A problem (or feature depending on your needs), is that you're limited by the resolution of the mesh you create. To get nicely evenly separated stripes, I had to increase the number of points on the wiggly curve quite high.
Thinking about it further, an easier way is to just create the stripe you want, and use the sweep to copy the stripes along the curve, where the curve has exactly the number of points you want to create stripes for, with its skin mode set to ‘off’. That's in the attached hip.
You can do the same with a copy, but you have to create the orient information yourself. A sweep gives you that for free.
I've included that in the hip too.
As you've noticed, this has a problem with the lines going fat and thin, mainly because for this little example the ribbon we're extruding is so wide, the curve has very sharp turns, and the sweep sop tries to orient the cross-sections along the curve, making the resultant shape act like a stretchy rubber surface.
Always many ways to skin many cats in houdini, here's some others…
If you use a copy sop rather than a sweep, as long as you don't include any orientation attributes, the copies will all keep the same orientation, ie, they'll all stay parallel.
Append a skin to convert all those curves into a mesh again, and the rest is basically the same as before. I've also shown that you can vary the width of the stripes vs the width of the gaps by blasting at different colour values. If you visualise a sine wave, it oscillates between 1 and -1, with the center at 0. If you blast values less than 0, the gaps are the same width as the stripes. If you blast at 0.9, you get thin stripes, and wide gaps. If you blast at -0.5, you get wide stripes and thin gaps.
A problem (or feature depending on your needs), is that you're limited by the resolution of the mesh you create. To get nicely evenly separated stripes, I had to increase the number of points on the wiggly curve quite high.
Thinking about it further, an easier way is to just create the stripe you want, and use the sweep to copy the stripes along the curve, where the curve has exactly the number of points you want to create stripes for, with its skin mode set to ‘off’. That's in the attached hip.
You can do the same with a copy, but you have to create the orient information yourself. A sweep gives you that for free.
I've included that in the hip too.
-
- booger
- Member
- 32 posts
- Joined: Feb. 2015
- Offline
-
- Quick Links


