Skip to main content
StrongBeaver
Legend
May 22, 2023
Question

Flood Fill to Position point data in FXMap ?

  • May 22, 2023
  • 1 reply
  • 593 views

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 ?

 

 

This topic has been closed for replies.

1 reply

davescm
Community Expert
Community Expert
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 :

 

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

 

 

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

 

 

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

 

StrongBeaver
Legend
May 23, 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 ?

davescm
Community Expert
Community Expert
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.

 

 

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