# Copy to quads - how to gradually flatten along edges of a mesh?

## Recommended Posts

Hey all, I have a pretty specific problem here. Basically, I have a pattern that repeats itself along quads. I have a piece of geometry that is copied to each quad in a mesh. I used this tutorial to do it: https://youtu.be/Z3ZkGoa3kZE

Next, I want the pattern to become gradually flatter around the edges. Does anyone know how to do this? See image below:

Here's the hip file. You'll also need the OBJ to import into the "file" node in the hip.

FlowAlongSrf.obj

• 1

##### Share on other sites

Hi,

not quite sure, if I understood you correctly.

But you can try the following:

• extract the border edges from the base geometry (SideFx Labs can do this aswell)
• for each point get the closest point to the base geometry (call it Q or something)
• from Q get the closest distance to the border
• use the distance to the border to define interpolation value between @P and Q

Here is a modification of your file

Edited by Aizatulin
• 1

##### Share on other sites
9 hours ago, Aizatulin said:

Hi,

not quite sure, if I understood you correctly.

But you can try the following:

• extract the border edges from the base geometry (SideFx Labs can do this aswell)
• for each point get the closest point to the base geometry (call it Q or something)
• from Q get the closest distance to the border
• use the distance to the border to define interpolation value between @P and Q

Here is a modification of your file

Luckily you understood me perfectly. Thank you so much! I spent all day yesterday trying to figure this out.

Quick question: how did you learn VEX and really understand it and how to apply it? My background is in design, and I always struggle with how to come up with these vex expressions on my own. Did you take any sort of course?

• 1

##### Share on other sites

Sure always a pleasure

I've started VEX around 5 years ago, after the VEX Attribute Wrangle became popular. I've never visited any courses, but I had already some programming language background before. It is just a hobby for me, but a great resource of pleasure. I'm still learning and probably will never stop, but it is impressive, how many solutions you will get for one problem. It is great place here to learn from the community, even if you don't get a direct solution for your problem sometimes you get a hint into the right direction.

If you want to improve your VEX skills, here are some thoughts (just my personal opinion).

• try to rebuild (obvious) simple stuff, which sometimes turns out not being that simple, but the experience you will earn can be essential to solve harder problems
• if you have a problem, try to divide into smaller parts (divide and conquer), this will also apply for other parts of houdini aswell
• study examples from others and try to rebuild it without looking at the code
• try to discribe your problem with words in a simple (as possible) way
• have fun

You can do alot with VEX, but it is also limited in some aspects. You will also find many great VEX resources, if you are looking for tutorials and if you have specific questions you will usually get feedback within hours except your problem is very exotic.

• 1

##### Share on other sites
On 10/14/2020 at 11:58 AM, Aizatulin said:

Sure always a pleasure

I've started VEX around 5 years ago, after the VEX Attribute Wrangle became popular. I've never visited any courses, but I had already some programming language background before. It is just a hobby for me, but a great resource of pleasure. I'm still learning and probably will never stop, but it is impressive, how many solutions you will get for one problem. It is great place here to learn from the community, even if you don't get a direct solution for your problem sometimes you get a hint into the right direction.

If you want to improve your VEX skills, here are some thoughts (just my personal opinion).

• try to rebuild (obvious) simple stuff, which sometimes turns out not being that simple, but the experience you will earn can be essential to solve harder problems
• if you have a problem, try to divide into smaller parts (divide and conquer), this will also apply for other parts of houdini aswell
• study examples from others and try to rebuild it without looking at the code
• try to discribe your problem with words in a simple (as possible) way
• have fun

You can do alot with VEX, but it is also limited in some aspects. You will also find many great VEX resources, if you are looking for tutorials and if you have specific questions you will usually get feedback within hours except your problem is very exotic.

Okay great! Yeah I think my lack of coding background is what is hurting me with VEX. I'll try and figure out the fundamentals/basics. It's a very different thought process than what is typical for designers/artists. Anyway, thanks again for your help!

## Create an account

Register a new account