Skip to main content
Participant
July 25, 2022
Answered

How to have pattern follow mask?

  • July 25, 2022
  • 4 replies
  • 1807 views

Hello! I've been running into an issue with rivets along edges, and not sure how to solve it. I'd like to have them like in the image. Masking out the edges and using a tile sampler yields random results, tried vector maps and cant get that to work either. Starting to think maybe FX map or pixel processor but I have no idea how either of those work.. Any ideas? Thanks!

This topic has been closed for replies.
Correct answer davescm

This problem got on my mind and another method occured to me.

 

This alternative might help depending on the panel layout and rivet spacing required. Again it's not perfect, in this case it missed a very small panel, but for me it worked slightly better than the last method if fewer rivets with larger spacing is required.

 

It starts with creating a path for each set of rivets (make it is wide enought to capture positions at the next step).

 

Next a flood fill creates a flood fill on each individual rivet path shape and a flood fill mapper is used with a tile sampler making circles (8 x8 and 0.5 offset). Then a distance note to expand the positions and histogram scan. Balance the distance node and histogram position to ensure individual rivet positions are large enough to hold a rivet but do not overlap.

 

Then a flood fill mapper to put a rivet in each position.

 

Cheers

 

Dave

4 replies

davescm
Community Expert
davescmCommunity ExpertCorrect answer
Community Expert
July 29, 2022

This problem got on my mind and another method occured to me.

 

This alternative might help depending on the panel layout and rivet spacing required. Again it's not perfect, in this case it missed a very small panel, but for me it worked slightly better than the last method if fewer rivets with larger spacing is required.

 

It starts with creating a path for each set of rivets (make it is wide enought to capture positions at the next step).

 

Next a flood fill creates a flood fill on each individual rivet path shape and a flood fill mapper is used with a tile sampler making circles (8 x8 and 0.5 offset). Then a distance note to expand the positions and histogram scan. Balance the distance node and histogram position to ensure individual rivet positions are large enough to hold a rivet but do not overlap.

 

Then a flood fill mapper to put a rivet in each position.

 

Cheers

 

Dave

modimistAuthor
Participant
July 29, 2022

Brilliant solutions Dave. Can't thank you enough for the help. Your RivetsB method seems to work the best in my case but until theres something dedicated for this idea I think I will have to compromise on the randomness/panel amount functionality as I need to adjust the Distance node each time. Fantastic work. Thank you!

davescm
Community Expert
Community Expert
July 29, 2022

You're welcome.

Dave

 

davescm
Community Expert
Community Expert
July 28, 2022

I wonder if something like this might get you close. It is far from perfect, but until we get a node that follows a path.

I used edge two edge detect nodes, the first to detect the joins and the second to add a path for the rivets. I then used a tile sampler at 64 x 64 to place a single point wherever that path crossed.

I next took the ouput of that tile sampler and used a vector warp to move it based on a bevel of the panel shapes. This moved the points off the strict grid and toward the edge of the panels giving a better alignment with the curves and angles.I did it that way rather than using the vector displacement in the tile mapper as it gave a finer control.

Then a histogram scan and a shape stroke to enlarge the points and form a circle at each point.

Next a flood fill and flood fill mapper to place a rivet in each of those circles. Keeping that stage separate to the points and warping, kept the rivets circular.

It is far from perfect but hopefully may spark your thinking.

 

Dave

 

modimistAuthor
Participant
July 29, 2022

Very interesting way to go about it and best results I've seen so far, very much appreciated! However I've hit a snag in my own test using your method. I'm not sure if your straight panel seams happen to be placed well for the 64x64 to be "close enough", but mine don't seem to want to get that uniform, and adjusting the Vector Warp makes them move into the panel seams.

 

Ideally panel amount and size would be editable and still have the rivets be aligned somewhat. Hoping it's just an oversight on my part but can't seem to replicate yours. Would be awesome if you could check out the .sbs or share your values maybe? Thanks again!

davescm
Community Expert
Community Expert
July 29, 2022

Hi

As you can see it's not perfect. A couple of differences - in the tile sampler, I used an offset of 0.5 to arrange the dots in a 'diamond' pattern and then adjusted the second edge width . Then I adjusted the bevel distance and warp intensity to bring the offset rows closer together. 

I have added a curve to the bevel in an attempt to bring the rivets closer to a straight line but it needs a bit more work  to achieve that.

With the smaller panels in your example, a tile of 96 x 96 worked better.

 

Dave

Luca Giarrizzo
Community Manager
Community Manager
July 27, 2022

Hello,

 

We do not have a good solution yet to place patterns along shapes borders regardless of the shapes.

 

The technique demonstrated in the material helpfullw linked by @Nicolas3D works well for horizontal and vertical borders. All others cases are challenging though.

 

I have played around with a couple of approaches in the attached Substance 3D file (SBS) you may try, although they require fine-tuning and may break easily.

 

Good luck!

 

Best regards.

 

Luca Giarrizzo | Quality Engineer, 3D & Immersive | Adobe
modimistAuthor
Participant
July 27, 2022

So I've been hearing, hopefully one day it's a one node solution haha. Thank you for the examples! Very clever, will give them a go in mine and see how they work out. Thanks again Luca.

Luca Giarrizzo
Community Manager
Community Manager
July 27, 2022

I am glad! We are also excited at the thought of a robust, simple solution added to our Library.

 

Best regards.

 

Luca Giarrizzo | Quality Engineer, 3D & Immersive | Adobe
Nicolas3D
Adobe Employee
Adobe Employee
July 26, 2022

You can have a look to this material from the Adobe Subtance 3d assets collection:
https://substance3d.adobe.com/assets/allassets/e04e215908c7c01bcacc88fecd1af7fe1e632226?assetType=substanceMaterial&category=Metal
You can download the corresponding .sbs file in order to see how the graph is made.

modimistAuthor
Participant
July 27, 2022

Thanks Nicolas, checked it out and unfortunetely it's essentially what I'm doing now and not having much success. Thinking I might just have to settle for now. Eh, could be worse. Thanks again!