Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Flood Fill to Position point data in FXMap ?

Advisor ,
May 22, 2023 May 22, 2023

Hi, how can I use the Flood Fill to Position node to access each point position from this node within a FXMap node. I tried a sampler node within the FXMap functions; by using the correct input image node that being the Flood Fill to Position node in for example input 1 to sample the point positions but I'm not getting any result ?

 

 

TOPICS
How to , Substance Graph
535
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 22, 2023 May 22, 2023

This might help:

An image is connected to Image 0 input of the FX-Map and a Flood fill to position connected to Image 1 input. The idea is to sample the image input at the centre position points of the Flood Fill to Position node, and map them into a grid.

The overall graph looks like this :

2023-05-23_00-42-47.jpg

 

The FX Map looks like this - just creating a grid for the output

2023-05-23_00-43-31.jpg

 

 

The colour/luminosity of the bottom quadrant node is driven by this function.

 

2023-05-23_00-43-58.jpg

 

Reading from the left, the function gets the position of each grid square and uses a sample colour to read the value from input 1 (the Flood Fill Map). It uses the red and green elements as X and Y co-ordinates to sample Image 0 (the picture). So for each grid square it is sampling Image 0 not at the centre of the grid square but at the point dictated by the flood fill position node.

 

I hope that helps explain how you can use it.

 

 

Dave

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advisor ,
May 22, 2023 May 22, 2023

Thanks, so I assume flood fill to index works identically ?

Also could I send you a scene file as I'm unable to get this working using a tile sampler as an input ?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 23, 2023 May 23, 2023

Flood fill to index gives a greyscale value (the index) to each cell in the flood fill map. That can be used within functions or to directly look up values or inputs as I have done in the tile sampler example below.

 

2023-05-23_10-18-19.jpg

 

If you want to attach and sbs file, along with a description of what you want to achieve, I'll take a look at it.

 

Dave

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advisor ,
May 23, 2023 May 23, 2023
LATEST

Thanks, this is helpful; although how would I use these values in a function unless you can share the scene file ?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines