Author Topic: fx node problem/bug?  (Read 1228 times)

I am creating an fx node, where I am using 16 pattern variations. I want want to shade the first patterns dark, with later patterns on top shaded progressively lighter. to do this I am using the number of iterations, and the $number variable. everything works fine, and I can use any ONE of my input patterns. however If I vary the patterns, either randomly or any other method, the outcome is not in line.

Is this a bug, or am I doing something wrong, and is there a way to fix my issue?


Jason B

I may guess what is happening (there is a limitation in the Fxmap node) but I have to check, would you mind sharing your graph ?
Product Manager - Allegorithmic

Thanks for your reply, I've attached a version of my graph here.

As I suspected, the problem comes from the rendering order. It's visible in your example because the blending mode is set to "alpha blend" (there is no Max is color mode, it actually falls back to Alpha blend).

The Pattern color is actually correct but because the patterns are not rendered in the correct order (ie the same as the luminance) the final result looks wrong. In short pattern are rendered by batch (all patterns #1, then all patterns #2..etc). It's unfortunately a technical limitation at the moment (I'm not sure sure if we could change this though..)

If you were rendering the node in grayscale using the Max mode the problem would not be visible.
Product Manager - Allegorithmic

That fixes the immediate problem but does not solve my issue. when I run this with a second fx node which is the same, except with alpha, the order is messed up. And the two don't correspond. You can probably see what I'm trying to do here, layering up patterns with one fx map and trying to create an approximate height map with the other so that I can generate some approximate Ao for the overlapped pieces. Its very frustrating that the fx node doesn't work, intuitively, as expected.

Do you see this as being fixed in the future?

Is there a workaround?

Nevertheless, thanks for taking the time to respond quickly to my problem, Much appreciated.


Jason B

It's not planned to "fix" this in the future as there is really a technical limitation behind.

That's the main reason why we built the "Shape Splatter" node (basically an Fxmap like node based on a Pixel Processor node), have you taken a look ?
Product Manager - Allegorithmic

looks interesting but I am required to supply 16 pattern inputs. Just looking to see if I can modify it, but on first glance it doesn't look so simple.

it'll require some work but it's not impossible.

Another solution is to use the "Atlas Scatter", put all your shapes in a single image and make a binary mask of it, the node will pick them all.
Product Manager - Allegorithmic